Overview: While UART defines how bytes are framed into asynchronous serial bits (Start bit, Data bits, Parity, Stop bit), RS-232 (TIA/EIA-232) and RS-422 (TIA/EIA-422) are Physical Layer (OSI Layer 1) electrical standards. They specify the voltage levels, line impedance, single-ended vs. differential signaling, cable length, and pinouts used to transmit those UART bits reliably across physical wires.
1. Core Electrical Difference: Single-Ended vs. Differential
The fundamental distinction between RS-232 and RS-422 lies in how they represent binary 1 (Mark) and 0 (Space) electrically over a wire:
- RS-232 (Single-Ended / Unbalanced): Measures the voltage of a single data wire (
TXorRX) referenced against a shared common ground wire (GND). Because long cables suffer from ground potential shifts and electromagnetic interference (EMI) coupled equally into the wire, RS-232 is limited to short distances (~15 meters) and lower speeds (~115.2 kbps). - RS-422 (Differential / Balanced): Uses a twisted pair of two wires for each signal (e.g.,
TX+andTX-). The receiver ignores the voltage relative to ground and instead measures the voltage difference between the two lines (V_diff = V+ - V-). Any external electromagnetic noise affects both twisted wires equally (common-mode noise) and cancels out when subtracted at the receiver, enabling distances up to 1,200 meters (4,000 ft) and speeds up to 10 Mbps.
2. What is RS-232 and How Does It Work?
Introduced in 1960 by the Electronic Industries Alliance (EIA), RS-232 (Recommended Standard 232) was originally designed to connect a computer terminal (DTE — Data Terminal Equipment) to a modem (DCE — Data Circuit-terminating Equipment).
Voltage Levels (Inverted Negative Logic)
Standard microcontrollers operate at TTL/CMOS levels (0V = Logic 0, 3.3V/5V = Logic 1). Transceiver ICs like the classic MAX232 use internal capacitive charge pumps to step up and invert TTL signals into bipolar RS-232 voltages:
RS-232 Voltage Specification (TIA/EIA-232-F):
┌──────────────────────┬───────────────────────────┬──────────────────────────┐
│ Logic State │ Transmitter Output │ Receiver Input Threshold │
├──────────────────────┼───────────────────────────┼──────────────────────────┤
│ Logic 0 (SPACE) │ +5V to +15V (Typ. +9V) │ +3V to +25V │
│ Undefined (Deadband) │ -5V to +5V (Transition) │ -3V to +3V (Noise Mar.)│
│ Logic 1 (MARK / Idle)│ -5V to -15V (Typ. -9V) │ -3V to -25V │
└──────────────────────┴───────────────────────────┴──────────────────────────┘
Note that when an RS-232 line is idle (no data being sent), it stays held at a negative voltage (Logic 1 / Mark, typically -9V to -12V). A frame begins when the line transitions high to a positive voltage (Start Bit = Logic 0 / Space).
DB-9 (DE-9) Standard Pinout
| DE-9 Pin | Signal | Name | Direction (at DTE/PC) | Function |
|---|---|---|---|---|
| 1 | DCD | Data Carrier Detect | Input | Modem connected to remote carrier |
| 2 | RXD | Receive Data | Input | Incoming serial data stream |
| 3 | TXD | Transmit Data | Output | Outgoing serial data stream |
| 4 | DTR | Data Terminal Ready | Output | DTE is powered and ready |
| 5 | GND | Signal Ground | Common | 0V reference for all signals |
| 6 | DSR | Data Set Ready | Input | DCE is powered and ready |
| 7 | RTS | Request To Send | Output | Hardware flow control output |
| 8 | CTS | Clear To Send | Input | Hardware flow control input |
| 9 | RI | Ring Indicator | Input | Telephone line ring detection |
3. What is RS-422 and How Does It Work?
RS-422 (TIA/EIA-422) was developed to overcome the distance, speed, and noise limitations of RS-232 in industrial and instrumentation environments. Instead of large ±12V swings referenced to ground, RS-422 uses low-voltage differential signaling (0V to 5V rails) across dedicated twisted pairs.
Differential Voltage Operation & Common-Mode Rejection
An RS-422 driver splits a single UART signal into two complementary lines: Non-Inverting (+ or B) and Inverting (- or A):
- When transmitting a Logic 1 (Mark): Line
B (+)is driven low and LineA (-)is driven high, creating a negative differential voltage (V_B - V_A ≤ -2Vat the transmitter). - When transmitting a Logic 0 (Space): Line
B (+)is driven high and LineA (-)is driven low (V_B - V_A ≥ +2Vat the transmitter). - High Receiver Sensitivity: Even after 1,200 meters of cable attenuation, the RS-422 receiver only requires a differential threshold of ±200 mV (0.2V) to cleanly distinguish a
1from a0. - Noise Immunity (CMRR): If a nearby high-voltage motor induces a +3V spike onto the cable, both wires in the twisted pair rise by +3V. The receiver calculates
(V+ + 3V) - (V- + 3V) = V+ - V-, completely eliminating the noise spike.
4-Wire Full-Duplex & Multi-Drop Topology
Typically, RS-422 uses 4 signal wires (two twisted pairs plus an optional shield/ground reference) to achieve simultaneous Full-Duplex communication:
- Pair 1 (Transmit):
TX+andTX-from Master to Slave(s)RX+andRX-. - Pair 2 (Receive):
RX+andRX-at Master from SlaveTX+andTX-. - Unidirectional Multi-Drop (1 Driver, up to 10 Receivers): Unlike RS-232 (which is strictly 1-to-1 point-to-point), a single RS-422 Master transmitter can broadcast simultaneously to up to 10 RS-422 receivers connected in parallel along the bus.
Line Termination (R_T = 120 Ω)
At high baud rates or over long cable runs, electrical signals reflect off the open end of a cable like waves hitting a wall, causing bit corruption. RS-422 requires a termination resistor (typically 100 Ω to 120 Ω, matching the characteristic impedance of twisted-pair cable) placed across the RX+ and RX- terminals at the far receiver end of the line.
4. Complete Comparison: RS-232 vs. RS-422 vs. RS-485
Engineers frequently compare RS-232 and RS-422 alongside RS-485 (which extends RS-422 with tri-state drivers to allow true multi-point networks where up to 32+ nodes can both transmit and receive on a single 2-wire pair):
| Parameter | RS-232 (TIA/EIA-232) | RS-422 (TIA/EIA-422) | RS-485 (TIA/EIA-485) |
|---|---|---|---|
| Signaling Type | Single-Ended (Unbalanced) | Differential (Balanced) | Differential (Balanced, Tri-state) |
| Network Topology | Point-to-Point (1 Driver, 1 Receiver) | Multi-Drop (1 Driver, up to 10 Receivers) | Multi-Point (32 Drivers, 32 Receivers) |
| Duplex Mode & Wires | Full-Duplex (3 wires min: TX, RX, GND) | Full-Duplex (4 wires: TX+, TX-, RX+, RX-) | Half-Duplex (2 wires) or Full-Duplex (4 wires) |
| Max Cable Distance | ~15 meters (50 ft) at 19.2 kbps | 1,200 meters (4,000 ft) at ≤100 kbps | 1,200 meters (4,000 ft) at ≤100 kbps |
| Max Data Rate | 115.2 kbps (up to 1 Mbps short range) | 10 Mbps (at 12 meters) | 10 Mbps (at 12 meters) |
| Driver Output Voltage | ±5V to ±15V | ±2V to ±6V differential | ±1.5V to ±5V differential |
| Receiver Sensitivity | ±3V | ±200 mV | ±200 mV |
| Typical Transceiver IC | MAX232, SP3232 | MAX490, MAX3490, AM26LS31/32 | MAX485, SN75176 |
5. Real-World Applications & Use Cases
Where RS-232 is Used
- Laboratory & Benchtop Equipment: Programmable power supplies, oscilloscopes, multimeters, and analytical balances located on the same desk as the control PC.
- Networking & Server Console Ports: Out-of-band management ports (RJ45-to-DB9 Cisco console cables) on enterprise routers, managed switches, and firewalls.
- Embedded Debugging & Bootloaders: Point-to-point diagnostic consoles and firmware flashing interfaces.
- POS & Commercial Peripherals: Receipt printers, barcode scanners, and industrial weighing scales over short cables.
Where RS-422 is Used
- Industrial Rotary & Linear Encoders (SSI / Incremental): High-speed position feedback in CNC machines, servo drives, and robotics (using differential
A+/A-,B+/B-,Z+/Z-RS-422 line drivers to survive heavy motor VFD noise). - Marine & Avionics Navigation (NMEA 0183 v2.0+): Modern shipboard GPS, gyrocompasses, sonar, and autopilot systems mandate RS-422 differential wiring so a single talker (GPS) can feed up to 10 listeners (radar, chartplotter, AIS) across the hull of a vessel.
- Broadcast Video & PTZ Cameras (Sony 9-Pin Protocol / VISCA): Studio video decks and long-range Pan-Tilt-Zoom surveillance cameras use full-duplex RS-422 for zero-latency real-time joystick control.
- Long-Distance RS-232 Point-to-Point Extension: Using a pair of RS-232-to-RS-422 converters to transparently extend a legacy full-duplex RS-232 connection across a 1 km factory floor without changing software or adding half-duplex direction control (RTS/DE toggling).