Page 1 of 1

Inverting Serial Data without MAX232.

Posted: Tue Dec 15, 2009 9:46 am
by xnederlandx
Hi,

I'm trying to communicate with a GPS (BR-355 from Global Sat)
I've configured it to send certain NMEA messages (Plain Ascii Strings) at 4800 baud.

I have communicated with other GPSs sending NMEA messages with my program (true, non-inverted) and have checked that this one is compatible with the messages it sends.

It was designed to be plugged directly in to the computer. I want to connect it to my PIC18F2525, but would like to avoid using a MAX232.
I've read the datasheet, and BAUDCON Bit5 should allow me to invert the data. When I change this to either 1 (inverted) or 0 (un-inverted), nothing happens.

When I plug it into the computer, it works, however.

Am I doing something wrong? Or do I need a MAX232?

Thanks in advance.

Posted: Tue Dec 15, 2009 10:08 am
by gramo
Looks like a feature list rather then a complete datasheet, though chances are it is operating at +/-5V RS232 voltage levels.

King Snake from the digital-diy.com forums (he also gets around here at SF) recently had a similar issue, and came up with some solutions

If it is using standard RS232 voltages, then you will need some sort of hardware in between, as they operate with -ve voltage levels

Posted: Tue Dec 15, 2009 8:14 pm
by xnederlandx
I just found the datasheet on the GPS.

It specifies that
"
Protocol
Electical Level: Output Voltage Level: 0V ~ 2.85V
Baud rate: 4800 bps
Output Message: NMEA 0183 GGA,GSA, GSV, RMC, VTG, GLL
"
Checking the 18F2525 datasheet - Page 337 - Input High Voltage - D041A/B
It specifies that on pins RC3 and RC4 (serial data rx and tx), the minimum voltage for a "high" signal is 0.7 x VDD (= 3.5V)

So I assume a problem is too a low a voltage on the input?

Posted: Tue Dec 15, 2009 9:30 pm
by Francis
Dunno, might be. Haven't seen your code or looked at your connections.
Try reducing the supply V to your PIC and try it.
Play... :)

Posted: Wed Dec 16, 2009 1:26 am
by xnederlandx
Solution found...
Had to make a little inverter which also boosts the voltage to 5V with a few resistors, a transistor and a diode.

Works beautifully now.

Thanks for all the suggestions & help. :D

Posted: Wed Dec 16, 2009 5:38 pm
by ohararp
I had a similar problem before switching to 3.3V pics. I am interested in the schematic you used though if you don't mind sharing.

Posted: Thu Dec 31, 2009 7:16 pm
by Francis
Do any of these examples help Ryan?

Image