RS-232#

The legacy industrial UART. Same framing as UART but shifted onto bipolar voltages (±5 to ±15 V) and inverted, so the operator cannot tie an RS-232 line directly to an MCU pin without a level shifter. Still on factory-floor PLCs, network-gear console ports, and serial-attached scientific instruments.

Wires#

Signal

DB9 pin (DTE)

Direction

Purpose

TXD

3

Out

Transmit data.

RXD

2

In

Receive data.

GND

5

Reference

Signal ground.

RTS

7

Out

Request to send.

CTS

8

In

Clear to send.

DTR

4

Out

Data terminal ready.

DSR

6

In

Data set ready.

DCD

1

In

Data carrier detect.

RI

9

In

Ring indicator.

Wire format#

Framing is identical to UART (start, data, parity, stop), but the electrical layer is inverted and bipolar.

  • Mark (logical 1) is -3 to -15 V.

  • Space (logical 0) is +3 to +15 V.

  • Idle is mark (negative voltage).

  • Common baud rates match UART; the slow end (300, 1200, 2400, 9600) shows up more often than on bare-MCU UART.

A MAX232-family level shifter bridges between RS-232 voltages and CMOS UART; without one, the operator’s USB-UART adapter does not survive contact with an RS-232 port.

Pads#

DB9 is the dominant connector. RJ45 is the second variant, introduced by Cisco; the pinout is vendor-specific.

  • DTE (Data Terminal Equipment) is the host (laptop, PC).

  • DCE (Data Communications Equipment) is the modem or the device the operator is talking to.

  • A straight cable connects DTE to DCE; a null-modem cable swaps TXD / RXD and other pairs so two DTEs can talk directly.

Tools#

Tool

Effect

USB-to-RS-232 adapters (MOSCHIP, Prolific, FTDI)

Provide /dev/ttyUSBN with proper RS-232 voltages.

MAX232, MAX3232

Level shifter ICs; turn a 3.3 V UART into RS-232 and back.

picocom, minicom, screen

Same terminal emulators as UART.

Multimeter

Read line voltages before plugging in; mistakes here fry adapters.

Vendor pinout sheet

Cisco, HP, and Sun publish their own RJ45 console pinouts; the operator confirms before crimping.

References#

  • TIA/EIA-232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange.

  • man 1 picocom, man 1 stty.

  • UART for the bare-CMOS variant on which RS-232 framing rides.

  • RS-485 for the differential industrial successor.