By the way, can someone tell me the expected voltages across 232 pins and modem Rx & Tx pin. I just have a funny feeling that problem is with the hardware part instead of software.
Voltages shoul be about +/-10V.
There no reason why i used serout.Originally Posted by financecatalyst
0 is used to set bondrate to 2400T.
Set cursor to serout and pres F1, and everything is in help.
Program is working. I used to check conection with modem for my call & sms controller.
Code with status led:
Led will flash every second if modem is'n connected.Code:Init: toggle led1 serout tx,0,["AT",13] serin2 rx,396,1000,init,[WAIT("OK")] serout TX,0,["at&f",13] pause 500 toggle led1 serout TX,0,["at+cmgf=1",13] pause 500 toggle led1 serout TX,0,["at+clip=1",13] pause 500 led1=1 Start:....
While setting up modem led will flash every 0.5s.
When device is ready led stay on.
After all day breaking my head - I have to say Many Thanks to all who have tried to help me and especially you for the code and Aratti (for hardware correction).
It is working now.
BUT as usual few questions to understand it better.
1) Why is it only working with serout & serin2 combination. I tried it with serout+serin & serout2+serin2 but it didn't work in this combination.
2)What is the actual difference between 0 & 396 when they BOTH are true baud 2400?
Thanks again
It should be work with serout and serout2.
0 and 396...
look in help in mcs!!
396 is for serout2 and serin2
0 is for serin, serout...
you have tables in help...
Tray to introduce a pacing value in the SEROUT2 command. See page 140 PBP manual.Why is it only working with serout & serin2 combination. I tried it with serout+serin & serout2+serin2 but it didn't work in this combination.
Al.
All progress began with an idea
Hi Everyone
I am now able to send text messeges. New Problem, I am unable to read an sent sms. Here is my code:
rea:
gosub one
serout2 tx,baud,["AT+CMGF=1",13]
Serin2 rx,baud,5000,rea,[WAIT("OK")]
pause 5000
gosub one
serout2 tx,baud,["AT+CMGR=1",13]
Serin2 rx,baud,5000,rea,[WAIT("REC UNREAD"),skip 3, STR num\12,skip 27,STR sms\10] 'CODE NEVER MOVES FORWARD FROM HERE
portc=255
pause 3000
portc=0
if sms[0]="t" and sms[1]="e" and sms[2]="s" and sms[3]="t" then
goto done
ELSE
goto rea
ENDIF
done:
serout2 tx,baud,["AT+CMGF=1",13]
Serin2 rx,baud,5000,main,[WAIT("OK")]
gosub two
gosub two
gosub two
serout2 tx,baud,["AT+CMGS=",34,"+44798XXXXXXXX",34,13]
Serin2 rx,baud,5000,main,[WAIT(">")]
PAUSE 500
SEROUT2 tx,baud,["done",26]
goto rea
Last edited by financecatalyst; - 1st October 2009 at 00:56. Reason: CORRECTION
Bookmarks