![Rhydo GSM-1936 Скачать руководство пользователя страница 19](http://html1.mh-extra.com/html/rhydo/gsm-1936/gsm-1936_user-manual_1452969019.webp)
www.rhydolabz.com
SIM900 GSM/GPRS TTL UART Modem - User Manual
W
e
b
r
i
n
g
t
h
e
w
o
r
l
d
t
o
y
o
u
…
…
.
.
Page 19
S
S
S
SA
A
A
AM
M
M
MP
P
P
PL
L
L
LE
E
E
E C
C
C
CO
O
O
OD
D
D
DE
E
E
E –
–
–
– FOR
FOR
FOR
FOR I
II
IN
N
N
NT
T
T
TE
E
E
ERFA
RFA
RFA
RFAC
C
C
CI
II
IN
N
N
NG
G
G
G W
W
W
WI
II
IT
T
T
TH
H
H
H M
M
M
MI
II
IC
C
C
CRO
RO
RO
ROC
C
C
CO
O
O
ON
N
N
NT
T
T
TR
R
R
RO
O
O
OLL
LL
LL
LLE
E
E
ER
R
R
R
/* This program module sends an SMS from the modem to a prefixed number
*/
void main()
{
SerialPortInit();
/* Serial Communication – 9600-N-8-1
*/
Send2Gsm("AT\r\n");
/* Transmit AT to the module – GSM Modem sends
OK */
DelayS(2);
/* 2 sec delay
*/
Send2Gsm("ATE0\r\n");
/* Echo Off
*/
DelayS(2);
/* 2 sec delay
*/
Send2Gsm("AT+CMGF=1\r\n");
/* Switch to text mode
*/
DelayS(2);
/* 2 sec delay
*/
Send2Gsm("AT+CMGS=\"+919447367176\"\r\n");
/* Send SMS to a cell number
*/
DelayS(2);
/* 2 sec delay
*/
Send2Gsm("TEST DATA FROM RhydoLABZ-COCHIN");
/* Input SMS Data
*/
SerialTx(0x1a);
/* Ctrl-Z indicates end of SMS
*/
DelayS(2);
/* 2 sec delay
*/
while(1);
}
Function Description
SerialPortInit
– Module to initialize serial communication parameters
Send2Gsm
-- Module to transmit a string of data through Serial Port
SerialTx
– Module to transmit a byte through serial port