GPS on LCD display!
electrosys
Posts: 212
Hello everyone
I have a GPS·PMB-648 module,·Board of Education + BS2 & 4x20 LCD display,·(all from Parallax)·I would like to make LCD to display GPS data "NMEA"·or at least·"Lat/Lon" data, any help would be appreciate·it, if anyone has done·something like that before, I would be happy to have a link.
I come from a good electronics background, but I am not very good at programming BS2, &·I need help, mostly by coding.
Thanks·
I have a GPS·PMB-648 module,·Board of Education + BS2 & 4x20 LCD display,·(all from Parallax)·I would like to make LCD to display GPS data "NMEA"·or at least·"Lat/Lon" data, any help would be appreciate·it, if anyone has done·something like that before, I would be happy to have a link.
I come from a good electronics background, but I am not very good at programming BS2, &·I need help, mostly by coding.
Thanks·
Comments
So, what have you done so far to achieve your goal?
Its always easier for us to help you get over individual hurdles rather than try to imagine what problems you might run into.
In general, you'll do three things:
1. Hook up the GPS and get the data to read out on the the Debug screen.
2. Hook up the LCD and prove to yourself you can put data onto the screen.
3. Now combine the two previous steps by reading the GPS and put its data onto the LCD.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
You might be able to handle just the latitude and longitude information. Read the chapter in the "BASIC Stamp Syntax and Reference Manual" on the SERIN statement, particularly the portions showing the WAIT item.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
At the end, everything will became Electron...!
SERIN <pin>,<Baudmode>,[noparse][[/noparse] WAIT("!GPGGA"),WAIT(","),WAIT(","),STR stringValue\10\"," ]
This would wait for "!GPGGA" and the comma following it, skip to the next comma, then accept up to 10 characters terminated by a comma. stringValue is declared as a byte array and, if the string is shorter than 10 characters, would be terminated by a zero byte. Once you have the string in a byte array, you can pick it apart for display.
I did once upon a time manage to parse out quite a few of the parts of the $GPGGA string with a BS2pe Mobo, though not all at once. You can read the string once to get the time, read it again to get the longitude, and again to get the latitude, and so on. You WAIT for "$GPGGA", then SKIP X number of bytes (the commas separating the string elements, and the data in the elements you're not looking for) to get to the bytes that make up the element that you're trying to read. You read those bytes into your variable, and display it, and then WAIT for it to come around again (...on guitar...) to get the next element.
You'll have to reuse your variables, because of the limited variable space in a BS2, but you can still do a lot with it. You're not getting simultaneous lat, long, time, etc., but you're getting them within a few seconds of each other, which is fine for playing around with GPS.
Post Edited (sylvie369) : 2/16/2010 6:21:56 PM GMT
The BS2pe has the advantage of having scratchpad RAM which can save on variable space. I think the latitude and longitude items total less than 26 bytes in length, so you could read both, then break them apart. It would also work to read the latitude first then the longitude and process them separately.
I didn't know enough to use the scratchpad RAM when I put together my little gizmo - it was one of the first things I played around with. I was pretty amazed at being able to build a GPS that displayed time, lat, long, heading, and speed on a 4x20 LCD on my car's dashboard - and a little less pleased at how it sucked batteries dry in no time.
I have find a short (few pages) pdf. file - Easy GPS Reading for Basic Stamp Chip (BS2),·and program code for BS2,·which I have attached·the pdf file here.
The code was developed to read in GPS data from a NMEA 0183 statement using the BS2 chip. I guess that is something I could start from, for now on, however the programmig code is for·typical debug window in the Basic Stamp Software Package, not for LCD display.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
At the end, everything will became Electron...!
Post Edited (electrosys) : 2/16/2010 11:09:27 PM GMT
Just serial in from the GPS, and serial out to the LCD.
cb
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
At the end, everything will became Electron...!
It sounds like you were using a Parallax 28146. Is that correct? The GPS (GPS·PMB-648) that electrosys is using does not have a "Smart Mode" setting on it.
Jim
Using the Forum 'Search' (upper right button), entering "$GPGLL" and 'Any Date', I found:
http://forums.parallax.com/showthread.php?p=597444