Creating Checksum in PBP


Results 1 to 9 of 9

Threaded View

  1. #7
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Tom,

    I have dealt with NMEA a few times in the past.

    The checksum is optional, and you do not really need it
    (as long as your wires aren't too long and the environment isn't too "noisy")

    What the example does is pretty simple:

    -----
    Num_To_ASCII:
    Dec_lat1 = 119
    C[7] = Dec_lat1 DIG 2+"0" ' element c[7] = ASCII 1
    -----

    DIG2 of Dec_lat1 in this example is decimal 1 (or $01)
    the ASCII value for the character "1" is 31, so you need to add 30
    (which equals the the decimal value of the ASCII character "0")
    to get the ASCII value for this character

    You could also use this:
    -----
    C[7] = Dec_lat1 DIG 2+30 ' element c[7] = ASCII 1
    -----

    (hope it is not too confusing)
    Last edited by NavMicroSystems; - 14th March 2005 at 17:10.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 13:55
  2. Checksum
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th October 2009, 05:09
  3. Calculate Byte Value Checksum in PBP Pro
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 8th July 2009, 23:50
  4. Replies: 1
    Last Post: - 10th May 2006, 16:17
  5. Checksum problem!
    By atomski in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd November 2004, 08:21

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts