Inverted UART signals on Oscilloscope

I used the RS232 DB9 connector based on CH340 just to check the ASCII characters received. I used the tera term and transmitted the character 'A'. I received the character but the signals found were neither standard RS232 +12/-12 nor were they standard UART. They were inverted. What is the reason behind this? The image from Oscilloscope is shown below:


The detected device is:
image

The CH340 runs from +5V and GND(0V) so it does not use 12V. The RS-232 standard does transmit inverted characters and the receiver inverts them again.

The reason dates back to teletype days. Using break pulses to signal instead of a closed circuit allows the steady state signal to be a (wired) loop closure, so that if the communications channel is lost, the printer will show an error condition.

Not that it matters much in 2023. :slight_smile:

1 Like

That was borrowed from the telegraph system where you break the loop to send your message. It also notifies of a broken wire.

The main reason is broken wires, since wire was the first implementation.

RS-232 is a bipolar signal, so by the time you get to that, the polarity is basically arbitrary.

"Up" or "on" don't have to represent a "1". Not in signalling.

Is this true only for the ch340 IC. That it gives inverted out and then inverted rx. This means I have to attach a not gate at the inputs before giving to microcontroller if that is the case...

Beats me. What does the data sheet say?

1 Like

RS-232 transmits inverted characters so the receiver will also invert them so they will be understood. Using standard hardware solve that.

Well, that is sort of like, "because it's a standard". Which is true. They had to choose one polarity or the other, not a lot of choices. :slight_smile:

If there is software running, for example software serial, it should of course follow the standard, not expect an external hardware inverter to change it.

Some modern "rs232" converters simply provide invert TTL signals.
That usually works; even in the old days I had successful connections to "real rs232" drives where I powered the transmitter with 5V and GND instead of the +/-12V that would have been correct. Hopefully the receiver has some input protection to protect it from "real" rs232 voltages. (Even the classic MC1489 rs232 receiver does not have any power supplies other than on the logic side.)

For a non-critical receiver, you can use an NPN transistor in the common emitter configuration with the proper base resistor. It will provide the signal inversion and can provide voltage level conversion, if necessary.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.