Shop OBEX P1 Docs P2 Docs Learn Events
GPS connection — Parallax Forums

GPS connection

HughHugh Posts: 362
edited 2009-10-26 20:58 in Propeller 1
Hi,

I'm using Perry James Mole's GPS IO objects to parse some NMEA data from a rather elderly Garmin GPS 45. My problem is that it only works for a few seconds (i.e., a few NMEA sentences) before the Prop freezes. Watching the data received by the uart object the NMEA sentence becomes 'scrambled' at some point with the high-end ASCII characters (i.e "|||", etc.,) being displayed instead of the expected alphanumeric data. I've played around with buffer sizes, stack sizes, etc., to no avail and it occured to me that it is probably down to my very naughty [noparse][[/noparse]slap's own wrist] connection of the Garmin's 'DATA OUT' wire directly to the Prop pin.

Does my theory sound likely, or am I barking up the wrong tree? (the wrong forest?). If it is down to that, what could I do about it?!

The same code worked fine on a Prop demo board, but not on on a protoboard...

[noparse][[/noparse]Insert 'pulling-own-hair-out' smiley here]

Thanks

Hugh

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Hugh - the thinking woman's Geoffrey Pyke.

Comments

  • James LongJames Long Posts: 1,181
    edited 2009-10-26 20:09
    Hugh said...
    Hi,

    I'm using Perry James Mole's GPS IO objects to parse some NMEA data from a rather elderly Garmin GPS 45. My problem is that it only works for a few seconds (i.e., a few NMEA sentences) before the Prop freezes. Watching the data received by the uart object the NMEA sentence becomes 'scrambled' at some point with the high-end ASCII characters (i.e "|||", etc.,) being displayed instead of the expected alphanumeric data. I've played around with buffer sizes, stack sizes, etc., to no avail and it occured to me that it is probably down to my very naughty [noparse][[/noparse]slap's own wrist] connection of the Garmin's 'DATA OUT' wire directly to the Prop pin.

    Does my theory sound likely, or am I barking up the wrong tree? (the wrong forest?). If it is down to that, what could I do about it?!

    The same code worked fine on a Prop demo board, but not on on a protoboard...

    [noparse][[/noparse]Insert 'pulling-own-hair-out' smiley here]

    Thanks

    Hugh

    Hugh,

    Although I haven't played with GPS, I know there is some variable length statements in the NMEA sentence. It sounds like your data is becoming un-synchronized. Like the information expected to be read is not exactly what is being received.

    You should have some kind of current limiting resistor on the pin, no matter if it works or not.

    Your code and items being used (GPS unit) would be needed to find the culprit. I figure you are getting information scrambled when the NMEA sentence changes with the variable length statement.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-10-26 20:22
    Hugh,

    do you happen to have Viewport, or some other way to monitor the incoming data stream?

    - H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • HughHugh Posts: 362
    edited 2009-10-26 20:50
    Thanks.


    James,

    I was expecting things to remain fairly synchronised as the code looks for the start and end of the sentences, but I may need to play further.


    CRP,

    I was using an LCD display to review the data.


    Interestingly, things change depending on how close my hand is to the protoboard - I may not have a GPS display, but a GPS-based Theramin must be a first! I'll check all the grounds and see what happens...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
  • James LongJames Long Posts: 1,181
    edited 2009-10-26 20:58
    Hugh said...
    Thanks.


    James,

    I was expecting things to remain fairly synchronised as the code looks for the start and end of the sentences, but I may need to play further.


    CRP,

    I was using an LCD display to review the data.


    Interestingly, things change depending on how close my hand is to the protoboard - I may not have a GPS display, but a GPS-based Theramin must be a first! I'll check all the grounds and see what happens...

    Hugh,

    I think velocity is one of the items that is a variable length. I'm going from memory on this...it has been a while since I did any reading on GPS. I know one item in a sentence is (or possibly was) a variable length statement. This causes the sentence to be longer or shorter depending on the situation.

    If the data being received changes length...that will definitely mess up your conversion of it. One bit off, and you will see a corruption like I think you are seeing.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Sign In or Register to comment.