I am having problems getting my basic stamp to read the serial in from my Garmin GPS. I am trying to use the @ symbol as the checksum but when I put in any checksum into my code the program locks up. Here is my code I am trying to use.
Why are you using "@" and what are you trying to do? How about a description of what you're trying to accomplish (with a little detail)?
I know that the Parallax GPS uses "*" as the marker for the checksum. I think that's pretty standard.
All I am trying to do is get data from my Garmin Etrex GPS and debug it to the screen through the basic stamp. I am using the @ for the start bit. When I look at the data on a program that I have called viewport that shows the serial data from my gps on screen all of the lines start with the @ symbol. Isn't that the symbol I want to use as my start bit. Also when I put in anything as my startbit the program locks up on the serin line.
Post Edited (autobus83) : 3/17/2008 12:24:37 AM GMT
Here's a website with a description of the NMEA 0183 data that the Garmin uses: en.wikipedia.org/wiki/NMEA.
As you can tell from that, the initial character of a data item is "$", not "@". Do make sure that you have the Baud mode
constant correct for your GPS receiver. Check the SERIN chapter in the Parallax Basic Stamp Manual for the proper connections
and the proper Baud mode constant. The Garmin receiver puts out RS232 signals and the Baud mode should be for inverted data.
16572 should be 4800 baud inverted. It is really jumpy and when it does show me the value of gps time it is a funky letter y,
th kind you see when the baud is not set correctly.
Just until you get it going, try making your variable "gpstime" an array of several bytes (say 8 or 10) then change your SERIN to read in those 8 or 10 bytes after the "$".
I have tried every thing. I know my gps is outputting at 4800 baud, and I know the start character is the $ symbol. But when I run the program it doesn't get data every time and when it does get data is prints out funny characters like the baud rate is wrong, here is my code.
Comments
I know that the Parallax GPS uses "*" as the marker for the checksum. I think that's pretty standard.
Post Edited (autobus83) : 3/17/2008 12:24:37 AM GMT
As you can tell from that, the initial character of a data item is "$", not "@". Do make sure that you have the Baud mode
constant correct for your GPS receiver. Check the SERIN chapter in the Parallax Basic Stamp Manual for the proper connections
and the proper Baud mode constant. The Garmin receiver puts out RS232 signals and the Baud mode should be for inverted data.
SERIN 0, 16572, 2100, No_Data, [noparse][[/noparse]WAIT("$"),gpstime]
16572 should be 4800 baud inverted. It is really jumpy and when it does show me the value of gps time it is a funky letter y,
th kind you see when the baud is not set correctly.
I checked and the baud on my gps is set to 4800.
The BS2 Stamp value is 188 for 4800 non inverted
The Parallax receiver uses 4800 non baud inverted, as do most Garmin units.
A good reference for GPS NEMA info is at www.gpsinformation.org/dale/nmea.htm
phil
Post Edited (phil kenny) : 3/17/2008 3:41:44 AM GMT
SERIN 0, 16572, 2100, No_Data, [noparse][[/noparse]WAIT("$"),STR gpstime\8]
Use a DEBUG to see what was captured.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
It goes --·$GPRMC,hhmmss.sss, other stuff...
If all you want is the hours, minutes, and seconds:
Post Edit --·If 16572 doesn't work, try 188.· I don't know the details of your·Stamp-to-Garmin inter-connect.
Post Edited (PJ Allen) : 3/24/2008 2:48:14 AM GMT