PDA

View Full Version : Question About eTrex GPS and BS2



SteveMiller10
04-25-2006, 11:38 PM
I just bought an eTrex GPS unit and a connecting serial cable. What is the best way to connect my BS2 to this unit? Specifically, what pins from the GPS's serial cable go to power, ground and the BS2? I read an article in NV about a project involving a car speedo and the eTrex -- so I know it can be done. But I am confused about the physical connections. Thanks!

Pezi_Pink!
04-26-2006, 12:02 AM
Check out this excellent Nuts 'n' Volts column - GPS with eTrek. Perfect!

www.parallax.com/dl/docs/cols/nv/vol3/col/nv83.pdf (http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv83.pdf)

SteveMiller10
04-26-2006, 12:31 AM
Yes -- I've read that article. But I have a BS2, not a BS2p. Is there a program that I can use that will read data into the BS2 from the eTrex? And I still don't understand which pins need to be connected. Any ideas?

Pezi_Pink!
04-26-2006, 12:41 AM
Well I don't have one myself - I pointed that article out as it seems to have a section on how to connect to a BS2 (I note a BS2p is mentioned later in the article so it must be possible)

I haven't read through the whole article again, but that diagram and the relevant text seems to show the eTrex cable/connector simply has a ground (black) and a data (white) conenction. The white lead is data which seems to simply goto an input pin on the BS. Looking at the top of the program list halfway down the article, the code declares one pin for the data input, and reads data straight away in main: using SERIN

Do you not just connect the white lead to a pin on the BS2p, and ground the other lead? That seems to be all that's required.

What have you tried so far?

Pezi_Pink!
04-26-2006, 12:45 AM
Sorry I mis-read your post and thought you HAD a BS2p. The article states they use a undocumented SPSTR serial modifer on the BS2p as you know.

Perhaps there is a workaround to this, Jon or Chris should be able to help if so...

Paul Sr.
04-26-2006, 01:11 AM
Jon provided a BS2 solution for the Garmin eTrex here: http://forums.parallax.com/showthread.php?p=578244

SteveMiller10
04-26-2006, 01:27 AM
Good. That program looks like it should work. Still does anyone know which pins on the serial coming out of the eTrex correspond to ground and data out? Thanks.

Paul Sr.
04-26-2006, 01:30 AM
SteveMiller10 said...
Good. That program looks like it should work. Still does anyone know which pins on the serial coming out of the eTrex correspond to ground and data out? Thanks.


Standard DB9 RS232 wiring

If you want ALL the gorey details, try this: www.garmin.com/specs/pcwiring.pdf (http://www.garmin.com/specs/pcwiring.pdf)

Post Edited (pwssr) : 4/25/2006 6:42:38 PM GMT

SteveMiller10
04-28-2006, 01:18 PM
Ahh it's not working. I am using John's program http://forums.parallax.com/forums/attach.aspx?a=6444 on my bs2. I have the eTrex connected by serial to the stamp with >>> DB2 (Rx) going to P0 on the bs2 and DB5 going to ground. What am I missing? Shouldn't I be seeing GPS data in the debug window?

Jon Williams
04-28-2006, 01:46 PM
You need to use pin 3 of the DB-9.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax

SteveMiller10
05-02-2006, 09:09 AM
pin3 on the db9 goes to p0 on the stamp
pin5 on the db9 goes to ground!

help! it's not working

Forrest
05-02-2006, 09:42 AM
Did you set your Garmin GPS to 2400 baud Text Output?

SteveMiller10
05-02-2006, 09:57 AM
no i didn't... how do i do that...

SteveMiller10
05-02-2006, 12:42 PM
okay i figured that out... but now that i have data coming in i don't know how to process it.

i am trying to do something like this:

if alt > 1000 then: LIGHTON
if alt < 300 then LIGHTOFF

but it doesn't treat alt like a number?

SSteve
05-02-2006, 01:41 PM
Looking over the code it seems like alt should be a number. Try inserting a "DEBUG DEC alt, CR" statement right before your IF/THEN statements. What value do you see in the debug window?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows

Bruce Bates
05-02-2006, 01:59 PM
Steve Miller -

I don't see what program you're using, but I suspect I may see the problem. The variable "ALT" MUST be defined as a WORD, if its to have values greater then 255 in it. A byte can only contain values from 0 ==> 255.

If "ALT" is an input variable (from a SERIN) then it must be read in as alt.highbyte and alt.lowbyte, as asynchronous serial data is transmitted on a BYTE basis, and it take 2 BYTES to make a WORD.

Regards,

Bruce Bates

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->

SSteve
05-02-2006, 08:50 PM
I believe he's using the code Jon wrote that was referred to earlier: http://forums.parallax.com/showthread.php?p=578244. It reads alt from the string of ASCII sent by the eTrex.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows