Shop OBEX P1 Docs P2 Docs Learn Events
Nmea 2 lcd — Parallax Forums

Nmea 2 lcd

CellectronicCellectronic Posts: 3
edited 2008-05-04 09:06 in BASIC Stamp
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.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-28 18:58
    You'll have to learn how to program and you'll end up having to write the program yourself or paying someone else to write it for you. There are some excellent tutorials available for free from Parallax. Go to the main Parallax web page and pick the Resources tab. You'll see Nuts and Volts Columns. Follow that link and find column #103 and that will give you some ideas and sample code. Go back to the Resources tab and pick Downloads. Select Basic Stamp Documentation for the BASIC Stamp Syntax and Reference Manual. Select Stamps in Class Downloads where you'll find What's a Microcontroller? and the StampWorks Tutorial. These are all good starting points.
  • CellectronicCellectronic Posts: 3
    edited 2008-04-28 19:05
    Ok, many thanks for the reply, the directions are most usefull.
    Thanks again.
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-04-28 23:42
    What it amounts to is setting up a Stamp to read data in using SERIN and·"WAIT" to get the correct NMEA string.·Then you·use "SKIP" to move to the part of the·string that you want:

    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.
  • CellectronicCellectronic Posts: 3
    edited 2008-05-04 09:06
    Hi, Thanks for the reply, I will now build the circuit and experiment with some code, thanks again.
Sign In or Register to comment.