It never enters label two as I assume there is somthign wrong in the communication part of PIC with the modem
Code:main: Serout2 tx,baud,["AT+CMGF=1",13] gosub one Serin2 rx,baud,5000,main,[wait("OK"),i] gosub two goto main
Remove the GOSUB One instruction! When you send an AT command to the modem, then you MUST immediatly switch to the SERIN2 instruction otherwise there is a high chance that the modem answer will be lost.
Edited:
Looking to the PBP manual the correct setting for 9600 bauds is 84 not 16468baud con 16468 ' baud rate = 9600 Inverted
Did you use the MAX232 for connecting Pic to modem?
Al.




Bookmarks