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?
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
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?
Re: Trouble Reading Binary or BCD from a GPS