bs2 and ps/2 GPS-unit
Jon Loldrup
Posts: 14
Hi
I'm trying to interface my ps/2 GPS-unit to my bs2. The GPS is a dumb thing that justs spits its NMEA-information out its TX-line once it has power. I have splitted the ps/2-stick so I feed it power directly. My question is - can I just connect the TX-line from the GPS to the line-receiver (pin 2) of the BS2 or will it fry things? (I'm thinking: if the signal voltage is 12 volts, it might be bad?). The GPS power supply is only 5 volt though
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
/jon
I'm trying to interface my ps/2 GPS-unit to my bs2. The GPS is a dumb thing that justs spits its NMEA-information out its TX-line once it has power. I have splitted the ps/2-stick so I feed it power directly. My question is - can I just connect the TX-line from the GPS to the line-receiver (pin 2) of the BS2 or will it fry things? (I'm thinking: if the signal voltage is 12 volts, it might be bad?). The GPS power supply is only 5 volt though
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
/jon
Comments
On our GPS the data is only sent out when the /RAW line is driven low. Otherwise it sends its data to the SX on the bottom for parsing. If you want to send the data directly to the BS2, then just drive the /RAW line low. What is it you’re trying to do?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I'm trying to use SERIN to take the NMEA-commands so I can parse them and thereby extract my position.
The documentation for my GPS says that it only uses 4 of the 6 pins in the ps/2-connector. Theese are:
pin 2: Power
pin 1: Ground
pin 4: RX
pin 5: TX
no /RAW-thing..
What is this /RAW-line? Never heard of it.
What do you mean with "on the bottom" in "Otherwise it sends its data to the SX on the bottom for parsing"?
I just tested using Windows Hyperterminal with just three lines: power, ground and TX. It works! (ie. it spits out NMEA-info). So I guess I don't need to drive anything high/low to make it work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
/jon
I apologize…I thought you were talking about the Parallax GPS unit which does have a /RAW line. You didn’t really specify so I assumed it was our product. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
/jon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Why didn't I think of THAT!!!!
Post Edited (Wynand) : 5/22/2007 12:15:12 PM GMT
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
/jon
If the ps/2-gps delivers 5 volt on its TX-line, and the BS2 accepts 5 volts on its input-pins, why then do I need to put a 22 k ohm resistor in between? (the BS2 manual says that I should do so, and indeed I do so). This resistor will obviously reduce the voltage to something lower than 5 volt. I don't get why it can't just connect directly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
/jon
How come the BS2 can communicate with a PC when placed on a board like this: http://www.zerko.ch/images/02b8e6987008e560c.jpg , when there is no MAX232-unit present on that board? Normal rs232 as found on the PC's serial ports uses +5 to +12 volt for logic 1 and -5 to -12 for logic zero - highly incompatible with the bs2's TTL-requirements (0v logic low, 5v, logiv high).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
/jon
The answer to your second question is that the BASIC Stamp 2 has on-board level converters for the programming port. You can see these components in the schematic listed on the product page. The transistors reduce the level the BASIC Stamp sees at its programming pins. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
The input resistance of the PIC chip (that the BS2 uses) is pretty high -- 10 Megohm, I believe. So putting an additional 22 Kohm resistor in there does not diminish a 5 volt signal very much.
However, if you DO put a +- 12 volt signal on the 'far end' of the 22 Kohm resistor, something interesting happens. It turns out the input pin on the BS2 has "protection diodes", which will try to 'clip' an incoming signal to the point where it won't damage the BS2 input transistor. But, these "protection diodes" can't handle a whole lot of current. The 22 Kohm resistor drops the resulting current to the point where it won't burn-out the protection diodes.
The result is, when you feed +12 volts to the 'far-end' of the 22 Kohm resistor, the high-side protection diode 'clips' that signal to 5 volts inside the BS2 -- and you get a 'high'. When you feed -12 volts, the low-side protection diode 'clips' that signal to 0 volts inside the BS2 -- and you get a 'low'. So everything works as you need it to, nothing is damaged, and all for adding a simple 22 Kohm resistor. Pretty neat, eh?
Does that mean that I can always skip using max232 chips when doing SERIN from normal rs232-devices? (SEROUT will obviously need conversion to rs232 voltage levels as the output from the BS2 will be at TTL-levels)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
/jon