PDA

View Full Version : Sending SMS



tacbanon
- 2nd March 2013, 10:26
Hello there..I'm trying to send an SMS..phone number to be use is in array



TELNO var byte[11]' array for phone number
'* * * * * * LOAD ARRAY WITH STRING VALUE
TELNO[0]= "0"
TELNO[1]= "9"
TELNO[2]= "9"
TELNO[3]= "9"
TELNO[4]= "4"
TELNO[5]= "4"
TELNO[6]= "x"
TELNO[7]= "x"
TELNO[8]= "x"
TELNO[9]= "x"
TELNO[10]="x"

My code for sending..


;SEROUT2 PORTD.6, 84,["AT+CMGS=",34,"099944xxxxx",34,13,10]
SEROUT2 PORTD.6, 84,["AT+CMGS=",34,str TELNO\11,34,13,10]
PAUSE 2000
SEROUT2 PORTD.6, 84,["This is my text message!"]
SEROUT2 PORTD.6, 84,[26] ' >
LCDOUT $fe,ln4," >> "
PAUSE 2000
I'm not able to make the above code work but when using SEROUT2 PORTD.6, 84,["AT+CMGS=",34,"099944xxxxx",34,13,10] --this works... what am I doing wrong?

Thanks in advance,
Tacbanon

tacbanon
- 2nd March 2013, 16:24
..I don't remember what I did but it's working fine now.

SEROUT2 PORTD.6, 84,["AT+CMGS=",34,str TELNO\11,34,13,10]