Nmea 2 lcd
Cellectronic
Posts: 3
Hello Everyone.
·I hope this post is in the right area as I am new on here. I have a BS2 which i would like to put to use with an OEM GPS board and LCD. I am ok with the electronics involved, but I am not a programmer which is where i need help. I would like to parse the NMEA string and display it on the LCD as time long and lat. Reason for this is·I want a very accurate clock and coordinates display to incorporate into a seismic receiving station. Any help would be greatly appreciated.
·I hope this post is in the right area as I am new on here. I have a BS2 which i would like to put to use with an OEM GPS board and LCD. I am ok with the electronics involved, but I am not a programmer which is where i need help. I would like to parse the NMEA string and display it on the LCD as time long and lat. Reason for this is·I want a very accurate clock and coordinates display to incorporate into a seismic receiving station. Any help would be greatly appreciated.
Comments
Thanks again.
GPSData········ VAR Byte(10)·
' Time:
SERIN GPSPin, Baud, [noparse][[/noparse]WAIT ("$GPGGA"), GPSData(0), GPSData(1), GPSData(2), GPSData(3), GPSData(4), GPSData(5), GPSData(6), GPSData(7), GPSData(8)]
DEBUG CRSRXY, 0, 0, "UTC Time : "
DEBUG CRSRXY, 11, 0
DEBUG GPSData(1), GPSData(2), ":", GPSData(3), GPSData(4), ":", GPSData(5), GPSData(6), CR
' Latitude:
SERIN GPSPin, Baud, [noparse][[/noparse]WAIT ("$GPGGA"), SKIP 8, GPSData(0), GPSData(1), GPSData(2), GPSData(3), GPSData(4), GPSData(5), GPSData(6)]
DEBUG CRSRXY, 0, 2, "Latitude : "
DEBUG CRSRXY, 11, 2
DEBUG GPSData(0), GPSData(1), ":", GPSData(2), GPSData(3), ":", GPSData(5), GPSData(6), CR
Et cetera.
To display these values on an LCD you use SEROUT per the instructions here:
http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/SerialLCD-v2.0.pdf
Notice that the code reuses the same·array to hold each type of data, rather than having one array for the time data, one for latitude, one for longitude, etc. There's a trade-off between memory and speed, of course. You could, I suppose,·read all of the data into different variables in one·"SERIN" rather than reading them in once for time, displaying that, then reading them into the same·memory for latitude, displaying that, then reading them in for longitude, and displaying that. It seems pretty unlikely that speed is going to be the limiting factor, though, while variable memory may well be.