Shop OBEX P1 Docs P2 Docs Learn Events
BS2p24 and Garmin eTrex Venture, data retrieval — Parallax Forums

BS2p24 and Garmin eTrex Venture, data retrieval

KewpieKewpie Posts: 13
edited 2005-07-22 13:25 in BASIC Stamp
Hi guys,
currently on·a final year project, need help !!

i want to extract certain data from my garmin etrex venture, i tried the simple_gps program provided by parallax and manage to got the GPRMC string but no the individual values for each field. on the debug window it return me a "?" after each field title.

what are the settings i need to set for my garmin and is the program compatible with my hardwares.

what position format should i set to?
and serial data format i set to nmea in and out..

anyone able to help me thanx !
looking forward for your replies =)

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-16 04:44
    Make sure your eTrex is set to NMEA out at 4800 baud to use Simple_GPS.BSP. I wrote that program quite some time ago, and it could stand an update, but there's not reason the code shouldn't work for you as it is. You are using a BS2p or BS2pe, right?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • KewpieKewpie Posts: 13
    edited 2004-08-16 06:45
    hi... yes its set to baud rate 4800 and nmea out already.
    and i change the GPSpin to pin 8 and connected a wire to the specified pin to pin 2 of the serial cable.
    And using BS2p. i manage to get the top part the whole gps string but its not parse out into individual components where its suppose to be data i recieve a question mark
    =)
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-16 13:49
    The version of SIMPLE_GPS.BSP that I had on my system hadn't been updated in over two years, so I grabbed my eTrex, connected it, and updated the code to PBASIC 2.5 syntax.· I've attached the updated program and a screen shot of my DEBUG window to show you that it does work.

    Check position 7 in the string -- this should be "A" if the GPS data is valid (note this is highlighted in my screen shot).· If it is not "A" the program will assume the rest of the string is bad and not display the data.· You can, of course, code around this.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office


    Post Edited (Jon Williams) : 8/16/2004 2:09:55 PM GMT
    681 x 510 - 65K
  • frasencifrasenci Posts: 34
    edited 2004-08-16 15:41
    hi kewpie ...

    I got this doc from somwhere in the webspace.... maybe it will help you.

    ·yeah.gif I hope so.

    Francisco
  • KewpieKewpie Posts: 13
    edited 2004-08-16 17:58
    Thanks a lot for your help guys !
    I'll work on it ! And hopefully could get it right...
    cheers
  • KewpieKewpie Posts: 13
    edited 2004-08-17 08:56
    i tried the program with my garmin etrex venture
    settings for my gps are
    baud rate - 4800
    serial data format - NMEA in/NMEA out
    position format - hddd mm ss.s
    map datum - WGS 84
    when my gps manage to track its position already i somehow got and "error - no gps data detected message"
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-17 12:39
    What happened? Did you change your cabling? Yesterday you were getting the string, but not valid data; at least then you were getting data. Check your connections, because the error message you cited only shows up when there is no signal detected from the eTrex.

    I don't think the units setting affect the NMEA output strings, but here are the settings from my eTrex that I used in yesterday's test (screen shot above):

    UNITS page
    -- Position Format: hddd.ddddd
    -- Map Dataum: WGS 84
    -- Units: Statute

    INTERFACE page
    -- I/O Format: NMEA Out
    -- Baud: 4800

    I have used the code I posted yesterday with a standard eTrex, as well as the eTrex Summit -- it works with both.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • KewpieKewpie Posts: 13
    edited 2004-08-18 01:34
    hmmm ok ... it seem that software and hardware configuration are alright ... cones down to the hardware.
    wat are the pins needed to connect to BS2p24 ?
    how everything is suppose to be rightfully connected ?
    i connect the stamp with the pc and use the demo board to connect the GPS.
    wish to clarify the part whereby GPS is connected to the stamp demo board..
    =)
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-18 02:58
    Now you have me confused.... You should have some kind of cable from your eTrex (plugs into that odd connector on the back). From this cable you only need Ground and the Serial Out signal (the eTrex manual will tell you which wires are which). Connect the ground connection to Vss on the demo board, and the serial output signal to the BASI Stamp IO pin you want use to receive the data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • KewpieKewpie Posts: 13
    edited 2004-08-18 05:22
    yeah ... thats what i've done...
    hmm alright i'll try it again
    Thanx !
    =)
  • KewpieKewpie Posts: 13
    edited 2004-08-18 05:41
    i've got it ! Thanx ... now i got to work around with the program to coordinate with my project !
    By the way if i need to define a certain area (range of longitude and latitude) and name them. Section the singapore map into areas.
    Is it possible with BS2p24 P.Basic ?
    any example or guideline for me to follow ?
  • cwolffcwolff Posts: 24
    edited 2004-08-20 06:40
    Hello,

    Thank you for updating the code, it's wonderful.· How could i get this code functioning on a BS2SX?· Please advise, thank you.

    Regards,
    Christopher
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-20 13:38
    That code is NOT compatible with the BS2sx as it requires the BS2p/BS2pe Scratchpad RAM to serve as a buffer.

    But ... if you have one of Garmin's eTrex models you can set it to text output at 2400 baud and use the attached program (it will work on any BS2-family module).· I've tested it on a BS2 and it works great.

    For anyone that does have an eTrex, I encourage you to explore the Garmin text output as it's easier to parse, and it comes out every second.· When using NMEA mode, the $GPRMC string is only available every two seconds.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office


    Post Edited (Jon Williams) : 8/20/2004 1:41:59 PM GMT
  • cwolffcwolff Posts: 24
    edited 2004-08-20 18:11
    Ok, I'm overnighting a BS2p24 to solve that problem [noparse]:)[/noparse]

    But in retrospect you couldn't do this with a BS2SX using the GET and PUT commands into the BS2SX's 64 Byte scratchpad?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-20 19:14
    Sorry, I wasn't very clear. The BS2p/BS2pe program relies on the SPSTR input modifier to move data from SERIN to the scratchpad, and SPSTR is not available in the BS2sx. If you have an eTrex, the Easy_GPS program is a cleaner way to go anyway, no matter what BASIC Stamp module you have.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • cwolffcwolff Posts: 24
    edited 2004-08-20 19:19
    Hi John,

    Thank you for the reply.· One thing i've noticed is that I can pull 9600 baud into the BS2SX but if I make my string size larger than·25 bytes I lose the rest of the characters.· For example,

    GPSpin··· CON··········· 5
    N9600···· CON··········· 240··········· ' 9600 baud 8N1 for trimble
    serStr··· VAR··········· Byte

    SERIN GPSpin, N9600, [noparse][[/noparse]WAIT("GPRMC,"), STR serStr\25]

    produces

    191612.00,A,3217.0349,N,11

    but if I increase my STR serStr to a value greater than 30 I get nothing.· It seems like the BS2SX can handle having 25 bytes of data crammed into it at 9600 baud and then chokes.

    I do like this trimble lassen SQ however and hope to get the kinks worked out.· Thank you for your assistance.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-20 19:40
    You can't fool the BS2sx into thinking it has more RAM than it does. The BS2 family only has 26 bytes of RAM, when you specify \30 in your code you've created an impossible situation.

    And don't think that just because the Memory Map is showing one byte used (serStr) that you're okay.· The way your program works, the first byte received by SERIN is going into serStr, the second into serStr + 1, etc.

    What you're doing, in effect, is:

    serStr  VAR  Byte(25)
    


    If you change 25 to 30 the compiler will complain.· What you probably need to do is multiple SERINs to grab all the information you want.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office


    Post Edited (Jon Williams) : 8/20/2004 7:45:20 PM GMT
  • Cinci_CapCinci_Cap Posts: 5
    edited 2005-04-19 02:08
    Hey Guys....
    I do not know if this is active or not, but a lot of reading, interesting one....
    I have one question; I have a Homework board... Is it compatible with all of this?
    I'll appreciate your comments....
    As you can see, I'm new to this.
    Thanks

    Cinci_Cap
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-19 04:34
    The Homework board uses a stock BS2 -- any GPS program written for a stock BS2 will work with it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Cinci_CapCinci_Cap Posts: 5
    edited 2005-04-20 03:20
    Hey Jon!!
    Thanks for your response, and sorry to ask the same things all over again...
    When I tried to load your Easy GPS program, first of all, the editor recognized that it was written for other stamp mode. When I run thr program it stops od the Serin command and highlights the SPSTR command and an error occurs saying "Expected Variable".
    Am I doing something wrong?
    Thanks again for your comments and knowledge!!

    Cinci_Cap
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-04-20 03:35
    Cinci_Cap -

    Add the following directive to the beginning of your program:
    ' {$PBASIC 2.5}

    Regards,

    Bruce Bates
  • ForrestForrest Posts: 1,341
    edited 2005-04-20 03:37
    Easy_GPS.BS2 from here works fine on a regular BS2 groups.yahoo.com/group/basicstamps/files/
  • Cinci_CapCinci_Cap Posts: 5
    edited 2005-04-20 03:38
    Jon,
    I have downloaded your Easy_GPS of 8/20/2004 and it seems to be working....
    gona get to it and see how it works...

    Cinci_Cap
  • Cinci_CapCinci_Cap Posts: 5
    edited 2005-04-20 03:40
    Thanks Forrest!!
    At this moment the Easy GPS is connecting.. It only updates hours... 19:01:01 to 19:00:01 Thats it, I'll check my connections and see how it comes out. Thanks Again!!

    Cinci_Cap
  • Cinci_CapCinci_Cap Posts: 5
    edited 2005-04-20 23:58
    Bruce,
    I have done that, thanks!!!


    Cinci_Cap (Gab)
  • NehaNeha Posts: 2
    edited 2005-07-18 20:40
    I have been trying to connect Etrex Legend GPS with basic stamp BS2p and am using simple_gps program available on this website. When I try to run the code I get error "No GPS data detected".· I am using Etrex cable and am connecting data out white wire to P0 and Ground black wire to VSS and have also set up the GPS to NMEA out and baud to 4800.

    It seems pretty simple and am not able to figure out why it is not working. Please help!
  • n1iicn1iic Posts: 19
    edited 2005-07-22 03:22
    I think the four colors in that cable are red, black, white and brown. Make sure you are using the white and brown for the serial data AKA not the red or black.

    Jason

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sick and tired of our media and the cheesy radio DJ's in the US? http://www.opieandanthony.com
  • NehaNeha Posts: 2
    edited 2005-07-22 13:25
    Thanks Jason for the reply. However, please note that I am using Garmin etrex standard PC interface connector·(rectangle shape·whose··one end is connected to·the back side of GPS) . The other end has 3 wires coming off and they are black (GND), white(Data out)·and yellow (Data in)·in color...so pls. clarify what cable are you talking about...also in nuts & volts column # 83·, it is given that you have to connect white wire (dataout) to BS I/O pin and black (GND) to VSS pin of Basic stamp. I have been following that.

    Also, one more interesting thing happened yesterday. Previously, I was testing the stamp with GPS in lab without getting satellite signal and my debug screen was· displaying msg "No GPS data detected"....yesterday I tried the same set up in open ground with valid signal and instead of getting error msg I got the screen with labels (speed, signal, latitude..etc.) without any data numbers. Is it the case that simple GPS code available on parallax web is running with valid satellite signal?

    Looking forward to your reply!
    Neha

    ·
Sign In or Register to comment.