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 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.
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...
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.
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.