I have a strange problem, I hope I'm just missing something simple. I have a GPS unit that spits out NMEA data at 4800 baud, N-8-1. I have no problem reading the data on a PC running Putty:
and
I've made several attempt to read the data but each time I end up with garbage input.
I've tried different combinations of baud rates, but nothing seems to change the fact that I'm not getting valid input. I've tried several pairs of input pins, etc.
Here is some sample code that I was most recently using, but other example sketches also failed:
Looks like it should work. Might help to know a little more about the hardware setup. What kind of electrical output does the GPS have (RS-232, 5V TTL serial, or 3.3V TTL serial), and how do you have it connected?
billroy:
Looks like it should work. Might help to know a little more about the hardware setup. What kind of electrical output does the GPS have (RS-232, 5V TTL serial, or 3.3V TTL serial), and how do you have it connected?
-br
Basically just TX out of the GPS going to to RX in on the Arduinio Duemilenove, plus ground. I tried lifting ground, thinking maybe there was a loop issue, but nothing changed.
Standard rs-232. If I'm reading the docs correctly, I don't need hardware ttl/rs-232 decoding using softserial, correct?
Voltage is voltage, yes? Standard RS-232 is +/- 12 volts and extremely toxic to Arduino inputs, which are rated 0-5V max. You need level shifting. Search the forums, this is a well-worked topic.
It's possible you have damaged the inputs on your Arduino, but you might have gotten lucky. If you see weird results once you've resolved the voltage level situation, try moving to other pins.
billroy:
Voltage is voltage, yes? Standard RS-232 is +/- 12 volts and extremely toxic to Arduino inputs, which are rated 0-5V max. You need level shifting. Search the forums, this is a well-worked topic.
It's possible you have damaged the inputs on your Arduino, but you might have gotten lucky. If you see weird results once you've resolved the voltage level situation, try moving to other pins.
Good luck!
-br
Ahh, ok, so I did misunderstand! BAH! Thank you....I wasn't thinking this one through. I should have known that.....
billroy:
Voltage is voltage, yes? Standard RS-232 is +/- 12 volts and extremely toxic to Arduino inputs, which are rated 0-5V max. You need level shifting. Search the forums, this is a well-worked topic.
Today is my lucky day, I just found a max232 in the parts bin!