Shop OBEX P1 Docs P2 Docs Learn Events
/RAW mode — Parallax Forums

/RAW mode

oopoop Posts: 28
edited 2009-01-29 09:25 in General Discussion
sir,
how to use the "/RAW" pin existed in gps receiver manufactured by parallax and explain broadly .

Comments

  • sylvie369sylvie369 Posts: 1,622
    edited 2009-01-29 09:25
    You connect the /RAW pin to ground, as you probably knew. Once you do that, the GPS will use RAW mode.

    In that mode, it transmits NMEA strings GGA, GSV, GSA, and RMC in serial format at 4800 Baud 8N1, noninverted out the data SIO pin. You can read these strings and parse them to take out the information that you want. Here is a link to a page that will explain the strings to you:

    home.mira.net/~gnb/gps/nmea.html

    Most of what you're likely to want is in the $GPGGA string:

    $GPGGA,hhmmss.ss,ddmm.mmm,a,dddmm.mmm,b,q,xx,p.p,a.b,M,c.d,M,x.x,nnnn

    So you set up your microcontroller to read data in (SERIN), have it wait until it sees "$GPGGA", and then skip forward however many bytes it takes to reach the information you want, then read that into a variable. For example, if you want to know the latitude in degrees, skip forward over the 8 time bytes and the "." and two "," (so 11 bytes in all*), and read the next two bytes (latitude degrees *10, latitude degrees) into your latitude variable(s).

    * Test it out - I may be counting something wrong. It's pretty easy to figure out once you hook it up and see what you're getting.
Sign In or Register to comment.