Trouble Reading Binary or BCD from a GPS


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Posts
    53

    Post Trouble Reading Binary or BCD from a GPS

    Hi All,

    I am having trouble reading data from a GPS which has been set to a Binary Output which I assume is in BCD. If I read the info coming from the GPS in NMEA it reads 100% and I can display all the info on my LCD. Once the GPS is set in binary I can't seem to display any information and if I look at the "GPS Viewer" on the PC it shows me all the text info in Longs/Lats exactly what I want to receive on my PIC. I assume they have some conversion from BCD to ASCII in their software, does anyone know how to convert this data so I can display something readable?

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Trouble Reading Binary or BCD from a GPS

    Here is a pretty good link about BCD & Packed BCD, might be helpful, you can mask upper or lower nibble and save into an array or just some variables, or convert to DEC and display as ASCII.
    http://en.wikipedia.org/wiki/Binary-coded_decimal
    Last edited by Archangel; - 7th August 2011 at 04:42.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Sep 2005
    Posts
    53


    Did you find this post helpful? Yes | No

    Default Re: Trouble Reading Binary or BCD from a GPS

    Hi Archangel,

    Many Thanks for the reply,

    I am just trying to see how I could do that, how could I convert it it Dec?

    If I use the Serin command to receive the data on serin2 portc.7, 84, [B0, B1, B2, B3, B4, B5]
    I could then see the Dec Value if I use lcdout $FE,1,DEC B0, DEC B1, DEC B2 etc, etc, but how could I then convert it to ASCII?, could I save the DEC Value of B0 and then recall it to display the ASCII value?, if I could how would I be able to "save" the DEC value of B0?

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Trouble Reading Binary or BCD from a GPS

    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 1

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