If the GPS works connected to a PC, it means its output is inverted.
You need to modify yourReread the manual for SerIn2 - your mode value is incorrect.Code:serin2 portc.4,4800,[WAIT("$GPRMC"),STR sms\35]
If the GPS works connected to a PC, it means its output is inverted.
You need to modify yourReread the manual for SerIn2 - your mode value is incorrect.Code:serin2 portc.4,4800,[WAIT("$GPRMC"),STR sms\35]
Thanks for the input but could you help me advising what baud should I use, I am little confused about this. The datasheet of the module does says 4800 is default (Datasheet attached) and manual also has only one option for 4800 baud.
I also want to say that I connected the gps module via MAX232 to the PC.Thanks
___________________
WHY things get boring when they work just fine?
I always wondered why the manual does not list all of the modes??? Save some paper???
http://www.melabs.com/resources/ser2modes.htm
Dave
Always wear safety glasses while programming.
Thanks for the info. I added the statement:
baud1 con 16572
and changed the following statement:
serin2 portc.4,baud1,[WAIT("$GPRMC"),STR sms\35]
Still no luck. Please help.
___________________
WHY things get boring when they work just fine?
Which is the value of baud1?Code:serin2 portc.4,baud1,[WAIT("$GPRMC"),STR sms\35]
When you use wait string, remember that they are case sensitive "$GPRMC" is different from "$gprmc"
I already suggested you, in another thread, to use a timeout sequence. Your serin2 instruction will wait for the identifier and then it will wait for a string of 35 characters. If your GPRS will send only 34, serin2 will remain there waiting forever.
One turn around is the use of the timeout:
Al.Code:GPRSLoop: sms[0]=0 serin2 portc.4,baud1,500,GPRSTest,[WAIT("$GPRMC"),STR sms\35] GPRSTest: If sms[0]<>0 then goto label ?? ' here you check byte[0] for data presence goto GPRSLoop
Last edited by aratti; - 23rd October 2009 at 02:28.
All progress began with an idea
Thanks guys. Itīs up and running now. Love this Forum
Last edited by financecatalyst; - 23rd October 2009 at 18:03.
___________________
WHY things get boring when they work just fine?
Bookmarks