Camola, try the following:
Use a larger array in such a way that you can accomodate the calling string in the initial part of the array:
Arry[0]=65
Arry[1]=84
Arry[2]=43
Arry[3]=67
Arry[4]=77
Arry[5]=71
Arry[6]=83
ArrY[7]=43
The above sequence contains the string AT+CMGS=+
Than you tranfer the sender number (12 bytes) in Arry[8] to Arry[19]. Remember that last byte should always be Arry[20]=13
At this point you can make the call:
For A0=0 to 20
serout Mtx,T9600,[Arry[A0]]
Next A0
Immediatly after the call you have to wait the modem acknowledge ">". Here an example of code:
Flag=0
WSend:
Flag=Flag+1
if Flag>20 then NoSMS
Serin MRx,T9600,500,WSend,[ ">"] , A0
If A0=32 then SendTxt
serout Mtx,T9600,[27]
pause 5000
goto NoSMS
The code above will jump to label "SendTxt" if the modem answer corectly, otherwise it will abort the call with ascii 27 and jump to label "NoSMS"
At label "SendTxt" you will wite your code to send your string.
Naturally you should change Serin/Serout to fit your code
Al.




Bookmarks