Knowledge Base
...
Fundamentals
Communications Protocols

RS232 - UART

6min

Lead In

RS232 is a relatively legacy wired protocol that appeared on desktop terminals and it remained available until recent history when it slowly started to be phased on on notebooks. The native interface is still available on a desktop personal computer.

Physical Connection

The basic connection for an RS232 or serial connection has three wires:

  • Transmit, usually indicated as Tx
  • Receive, usually indicated as Rx
  • Ground, usually indicated as Gnd

The RS232 protocol is not natively powered, and neither of the devices would normally power the other. They would share a common ground as this ensures that the RS signal is sent and received in relation to the same ground.

When connecting the PIC, the communication lines swap over. So the MCU TX connects to the modules Rx and vice versa.

Specifications

Voltage Levels: RS232 also used as ground & 5V level. Binary 0 works with voltages up to +5V to +15Vdc. It is called as ‘ON’ or spacing (high voltage level) whereas Binary 1 works with voltages up to -5V to -15Vdc. It is called as ‘OFF’ or marking (low voltage level). Received signal voltage level: Binary 0 works on the received signal voltages up to +3V to +13 Vdc & Binary 1 works with voltages up to -3V to -13 Vdc. Line Impedances: The impedance of wires is up to 3 ohms to 7 ohms & the maximum cable length are 15 meters, but new maximum length in terms of capacitance per unit length. Operation Voltage: The operation voltage will be 250v AC max. Current Rating: The current rating will be 3 Amps max. Dielectric withstanding voltage: 1000 VAC min. Slew Rate: The rate of change of signal levels is termed as Slew Rate. With its slew rate is up to 30 V/microsecond and the maximum bitrate will be 20

Implementation

The physical implementation offers a number of cable configurations.

Document image


Connector Pinouts

There are two common cable connectors, which are wired up depending on the use. The two connectors are interchangeable, and an adapter can be made up for better connection.

Document image


Lead Out

A MAX232 would have provided the voltage signal levels in the past where the -12V | 1 and the +12V | 0. However, with the disappearance of the 9 PIN | 25 PIN adapter from your standard PC, we use the 4 PIN USB Type A connector.

The PC-based driver in conjunction with the USB Uart simulates the various standard coms signals so the MCU if waiting for the DTR signal, will receive one via the CHG340.