Shop OBEX P1 Docs P2 Docs Learn Events
GPS pinout configuration — Parallax Forums

GPS pinout configuration

DiabloDiablo Posts: 11
edited 2006-01-28 01:54 in BASIC Stamp
Hi everyone,

I hope someone who play GPS receiver before who can help me.· I have bought GoPasss GPS-201 GPS receiver recently.· I want to connect my GPS receiver to BS2p 24.· After reading the User's manual, I still don't know how to make the connection.

The pin configuration of GPS-201:

PS/2 Connector
Color······Function··········· CN1
Yellow···· TTL TX··············· 6·············· ** Mini Din: 6 pin male connector
Green·····RS-232 TX··········5
White·····RS-232·RX··········4
Blue······· TTL RX·············· 3
Red··········· Vcc················ 2
Black·········Gnd·················1

Question:
1. What is the difference between TTL TX and RS-232 TX?· How to connect those pin?
2. Can I share 5V and Gnd from BOE? or seperate Vcc and Gnd pin from BOE?


Happy New Year

Comments

  • steve_bsteve_b Posts: 1,563
    edited 2005-12-29 12:10
    Hi Diablo,

    1) TTL levels are known as logic levels.. As you know, computers and all other digital devices operate on 1's and 0's.
    A Logic 1 is equal to +5Vdc in TTL....and a Logic 0 is equal to 0Vdc in TTL.
    Now, computers, and other serial devices, use RS232....it's just a "WAY" to send those logic 1's and 0's.
    A Logic 1 in RS232 is equal to -10Vdc and a Logic 0 in RS232 is equal to +10Vdc (these are common voltage levels, but you'll sometimes find them ranging from 5-12V in either direction).

    Your stamp can output RS232 on any of its pins, but it cheats a little bit. If you use the programming port, you'll get proper +10/-10 levels, but on the other I/O ports you'll only get +5 and 0Volts...this is fine as most things just look for a voltage over/under a certain threshold (usually 2.5volts -- I think it's different on a stamp). But as you guessed, a Logic 1 coming out of a stamp is at 0volts and a Logic 0 is at +5volts.
    Conversely, your stamp can 'ingest' RS232 (not just on the programming port)....but you need a current limiting resistor (22kohms??) so as not to zap the inputs. the 12volts from RS232, taht your stamp will see, will get clipped (internal to the stamp) by some diodes...this will limit the voltage coming in to the 5volts it can handle at the processor.

    2) when you connect your GPS to your stamp, you need more than that single wire coming from the GPS's TX line. When you measure voltage, its always in reference to a common point...typically ground! So you need to connect the grounds together too!
    However, I wouldn't be connecting the power sources together....I can't explain myself on this one...my personal choice is not to.

    Also, when you connect to TTL TX....be aware that your baudmode value will NOT be inverted (as a TTL 1 is the same as a logic 1) but when you use RS232 TX you WILL need to use the INVERTED value (In the help file under SERIN/SEROUT)....

    good luck!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • DiabloDiablo Posts: 11
    edited 2005-12-30 08:16
    Hi Steve,

    Thanks for the detail explainaton. As I know I need to connect Vcc(+5V from somewhere) and Gnd(tie to BOE gnd). But I don't know that should I use all TTL Tx,Rx, RS232 Tx,Rx or just use TTL Tx,Rx or just use RS232 Tx,Rx. Coz I tried to pull data from GPS's pin 3 & 6 with a 220ohm resistor connect to I/O pins. It wasn't success. I am not sure my connection is right or wrong.
    You said need more than that single wire coming from the GPS's TX line, what does it mean. Could you give a diagram or tricks how to connect those pins.

    Thanks
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-12-30 10:46
    Diablo -

    You have two choices here, you just need to be consistant. Here are those choices:

    Choice 1 - Use TTL Levels

    Pin 6 --> Tx pin on Stamp (you choose the exact pin port number)
    Pin 3 --> Rx pin on Stamp (you choose the exact pin port number)
    Pin 1 --> Ground on Stamp

    Choice 2 - Use RS-232 Levels

    Pin 5 --> Tx pin on MAX-232 input line, MAX232 output line -->Tx pin on Stamp (you choose the exact pin port number)

    Pin 4 --> Rx pin on MAX-232 input line, MAX232 output line --> Rx pin on Stamp (you choose the exact pin port number)

    Pin 1 --> Ground on the Stamp

    If you opt to use Choice 1, then DO NOT use an inverted baudmode. If you use Choice 2 DO USE an inverted baudmode. If you don't have or can't get a MAX232, just say so as there are other alternatives here.

    The pin port numbers you have arbitrarily chosen for Tx and Rx will need to be used in the respective SERIN and SEROUT commands in your program. Copy them down as you assign them during the wiring process, so you will have them handy later for programming.

    In all cases you will need to bring the appropriate Vcc voltage to Pin 2, and Pin 1 should already be connected to the Stamp's ground. Most GPS units I've seen generally use 4800 baud, but you should check that to be sure.

    That should get you started.

    Regards,

    Bruce Bates
  • steve_bsteve_b Posts: 1,563
    edited 2005-12-30 13:22
    Diablo,
    Is this the GPS antenna you're using? ( http://www.softwareandstuff.com/CES10542.html·)· If not, please provide a link to it.
    You asked me for pictures, I'm asking for the same in return.· I don't know if you're using a GPS antenna or a GPS decoder engine....
    IF it is, then you need to apply power to it....so you would want to know the current draw of the antenna.· IF it is low enough (can't remember what the BOE can supply...1A is what rings a bell) then you should connect the antenna's Vcc to the Stamps Vdd....also, you would connect the antenna's Gnd to the stamps Vss.·
    Then you can just connect a wire FROM the GPS antenna's TTL Txdata to, say...., pin1 on your stamp.

    Do you know the baudrate of the gps?· Are you going to need to 'talk' to the gps?· Then you'll need a 2nd line to send info to it....
    You can use either the TTL or RS232 lines.· How long of a distance do you have the antenna away from your stamp?· RS232 will go further than TTL....
    ·I've attached a couple of stamp programs that Jon Williams has put together.
    Diablo said...
    Hi Steve,

    Thanks for the detail explainaton. As I know I need to connect Vcc(+5V from somewhere) and Gnd(tie to BOE gnd). But I don't know that should I use all TTL Tx,Rx, RS232 Tx,Rx or just use TTL Tx,Rx or just use RS232 Tx,Rx. Coz I tried to pull data from GPS's pin 3 & 6 with a 220ohm resistor connect to I/O pins. It wasn't success. I am not sure my connection is right or wrong.
    You said need more than that single wire coming from the GPS's TX line, what does it mean. Could you give a diagram or tricks how to connect those pins.

    Thanks
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • DiabloDiablo Posts: 11
    edited 2006-01-28 01:54
    Thank you Steve and Bruce. Your suggestion is really helpful, especially Bruce. After a lots of trial and error, finally my "GPS device" works! Both transmit and receive can communicate with each other. But I still have question at my receive side. Since I have design using a GUI(Visual Basic) at Rx, I can get data exactly as what I want but the processing time is quite slow (about 1 min) when put it on text box. If I just display it on hyperterminal, it shows the data quite fast (because it didn't do any data sorting). I want to know how can I revise the subroutine(Timer1) of my VB program in order to make the text box (get exact data with Instr$, Right$, Left$ or Mid$ function) update 1 sec each time when receive new data.

    Here I attach my VB and BS2p program and pics to show what I said.

    Thank you
Sign In or Register to comment.