I'm new to serial communication, can anyone tell me what does the 34,34,13 do in the below syntax???
serout portb.6,t300,["at+cpms=",34,"me",34,13]
and whats the difference between above and
serout portb.6,t300,["at+cmgr=1",13]

also please tell me does oops block get executed if + is not received ???
SERIN portb.7,t300,1000,oops,["+"],buffer[0],buffer[1]


Quote Originally Posted by zaliko View Post
It's not tested but try this one:

include "modedefs.bas"
DEfine OSC 4

buffer var byte[20]
z var byte
x var byte
TRISB= %10001000


portb.4=0
portb.2=0
portb.1=0



serout portb.6,t300,["atz",13]
pause 2000

serout portb.6,t300,["at+cpms=",34,"me",34,13]
pause 2000

serout portb.6,t300,["at+cmgr=1",13]

; wait + sign for 1 second and then store next 2 signs in buffer[0] and buffer[1]
SERIN portb.7,t300,1000,oops,["+"],buffer[0],buffer[1]

portb.1=1 ; port be is high beqause + sign already detected
if buffer(0) ="C" then
portb.2=1
endif
if buffer(1)="M" then
portb.4=1
endif
goto dasasruli
oops: ;no answer from the phone
; do something if there is no answer
dasasruli:
end

Best Regards
Jamshid Dastur