NMEA CKSUM Calculation ?

Discussion in 'The Projects Forum' started by myztic_man, Jun 14, 2009.

  1. myztic_man

    Thread Starter Member

    Apr 27, 2009
    21
    0
    Hi there.
    I have a system here which is interfacing a GPS to an AT89 Micro. It is working, in that data is coming from the GPS to the Micro via UART and some pointer arithmatic is being done to split the string into each segment.

    however, I am having trouble understanding the CKSUM's and how to use them?

    I am following the datasheet: http://www.usglobalsat.com/download/47/em408_ug.pdf
    which on page 10 shows the structure of commands being SENT to the gps unit. I am trying to make the GPS only give me back $GPRMC every second so I am using the command:
    $PSRF103,04,00,01,01*21<CR><LF>
    And then i am trying to disable all the other data feeds ($GPGGA, GPRSV etc etc) via:
    "$PSRF103,00,00,00,01*21<CR><LF>",
    "$PSRF103,01,00,00,01*21<CR><LF>",
    "$PSRF103,02,00,00,01*21<CR><LF>",
    "$PSRF103,03,00,00,01*21<CR><LF>",
    "$PSRF103,05,00,01,01*21<CR><LF>"

    However, the device still sends me data every second for all data feeds, so I think those final 5 commands are Wrong. Can you please tell me how I go about calculating the CKSUM?

    Thanks!
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Here is a link to a NMEA specification that gives some examples of calculating the checksum using C-language.

    hgmjr
     
  4. myztic_man

    Thread Starter Member

    Apr 27, 2009
    21
    0
    Thank you guys.
    But I found a great website for calculating the values of an NMEA checksum!
    http://www.hhhh.org/wiml/proj/nmeaxor.html

    Simply enter in the data you want to send to the GPS Module and i'll calculate the CheckSum's for you!
     
Loading...