Inverted signal on RS232

Hey,

After spending hours trying to buy a cheap convertor for an inverted RS232 signal I thought posting the official software trick here will help.

Hidden in the original documentation on SoftSerial, namelijk here:
http://arduiniana.org/libraries/NewSoftSerial/

I found this text (and it works very well)


Signal Inversion

“Normal” TTL serial signaling defines a start bit as a transition from “high” to “low” logic. Logical 1 is “high”, 0 is “low”. But some serial devices turn this logic upside down, using what we call “inverted signaling”. As of version 10, NewSoftSerial supports these devices natively with a third parameter in the constructor.

NewSoftSerial myInvertedConn(7, 5, true); // this device uses inverted signaling
NewSoftSerial myGPS(3, 2); // this one doesn't

__

So instead of spending bucks, simply add 'true' to the init call NewSoftSerial

Only works if you have inverted TTL-level signals (a very unusual thing to have), don't try it with real RS-232 voltage levels.


Rob