What Is RS-232?
Last updated 28 June 2026 · 5 min read
Direct Answer
RS-232 (EIA/TIA-232) is a serial communication standard that defines the electrical characteristics, timing, and connector pinout for point-to-point asynchronous serial communication. It uses ±3 V to ±15 V single-ended voltage levels — with logic 0 (SPACE) driven between +3 V and +15 V, and logic 1 (MARK) between −3 V and −15 V — rather than the 3.3 V/5 V logic levels used by a microcontroller UART, requiring a level converter to interface the two.
Detailed Explanation
RS-232 is one of the oldest surviving electrical standards in electronics, originally published in 1960 and still widely used in industrial, medical, and test-and-measurement equipment. It predates microcontrollers and was designed for communication between a Data Terminal Equipment (DTE) device — historically a computer terminal — and Data Circuit-Terminating Equipment (DCE) — historically a modem. Despite its age, RS-232 remains the physical layer for console ports on networking equipment, debug ports on industrial PLCs, and many laboratory instruments.
Electrical characteristics
RS-232 uses single-ended voltage levels far outside the logic levels of modern microcontrollers:
| Level | Voltage at transmitter | Voltage at receiver |
|---|---|---|
| Logic 0 (SPACE, mark for control signals) | +5 V to +15 V | +3 V to +15 V |
| Logic 1 (MARK, space for control signals) | −5 V to −15 V | −3 V to −15 V |
| Undefined (transition zone) | −3 V to +3 V | ±3 V (reject) |
Note the polarity inversion relative to standard digital logic: logic 0 is positive voltage, logic 1 is negative voltage. This means an RS-232 line is idle (logic 1) at a negative voltage. A level converter IC generates these voltages from a 3.3 V or 5 V supply using a built-in charge pump.
Connectors: DB9 and DB25
RS-232 is most commonly seen with the DE-9 connector (commonly called DB9), a 9-pin D-subminiature connector. DB9 pinout for DTE (Data Terminal Equipment, i.e. a computer or MCU side):
| Pin | Signal | Direction (DTE) | Description |
|---|---|---|---|
| 1 | DCD | Input | Data Carrier Detect |
| 2 | RXD | Input | Receive Data |
| 3 | TXD | Output | Transmit Data |
| 4 | DTR | Output | Data Terminal Ready |
| 5 | GND | — | Signal Ground |
| 6 | DSR | Input | Data Set Ready |
| 7 | RTS | Output | Request to Send |
| 8 | CTS | Input | Clear to Send |
| 9 | RI | Input | Ring Indicator |
Most embedded RS-232 implementations use only pins 2, 3, and 5 (RXD, TXD, GND). The remaining signals are tied off or looped locally when full modem control is not needed.
Null modem vs straight-through cable
A straight-through cable connects pin 2 to pin 2 and pin 3 to pin 3. This is used when connecting DTE to DCE (computer to modem). Connecting two DTE devices (computer to computer, or MCU to MCU) requires a null modem cable that crosses RXD and TXD (pin 2 to pin 3 and vice versa), along with appropriate handshaking signal crossovers. Most modern terminal-to-device cables are null modem cables; many commercial USB-to-RS-232 adapters are wired as DTE and require a null modem cable to connect to the serial port of another DTE device.
Level conversion
Interfacing a microcontroller UART to RS-232 requires a level converter IC:
- MAX232 / SP232: classic 5 V level converter with internal charge pump. Two transmitters and two receivers. Requires four 1 µF capacitors for the charge pump. Supports baud rates to typically 120 kbps.
- MAX3232 / SP3232: 3.3 V supply compatible version. Suitable for direct connection to 3.3 V MCU UART pins. The most common choice for modern MCU RS-232 interfaces.
- MAX3221 / SP3221: low-power auto-shutdown version with enable pin. Useful for battery-powered equipment where the RS-232 port is used infrequently.
Practical Examples
A PLC (Programmable Logic Controller) in an industrial cabinet uses RS-232 for its programming port. A maintenance technician connects a laptop (via USB-to-RS-232 adapter) to upload a new ladder logic program. The RS-232 physical layer provides enough noise immunity for short cable runs within an enclosure, and the low baud rate (9600 or 19200 baud for legacy PLCs) makes the short cable length limitation unimportant.
In a laboratory data acquisition system, a temperature controller communicates with a PC over RS-232 using a proprietary serial protocol. The MCU inside the controller uses a MAX3232 to translate between its 3.3 V UART and the RS-232 port. The PC reads process temperatures and adjusts setpoints via a software dashboard.
Design Considerations
- RS-232 vs UART voltage levels: the most common engineering error with RS-232 is connecting an MCU UART directly to an RS-232 port without a level converter. Always check the voltage levels on both sides and use a level converter IC.
- Ground reference: RS-232 is single-ended — pin 5 (signal ground) must be connected between the two devices. A floating ground causes unreliable communication even if the signal lines are correctly connected.
- ESD protection: RS-232 lines are exposed to the outside world at connector edges and are common victims of ESD events. Add TVS protection diodes on the RS-232 lines between the connector and the level converter IC, or use a level converter with built-in ESD protection (MAX3221E, SP3232E).
- RS-232 vs RS-485 for your application: RS-485 is almost always the better choice when cable length exceeds 10–15 m, when multiple nodes need to share a bus, or when the environment is electrically noisy. RS-232 remains appropriate for short-range point-to-point connections, especially to legacy equipment that already has RS-232 ports.
Common Mistakes
- Connecting MCU UART directly to RS-232: RS-232 expects −12 V for logic 1; a 3.3 V logic line driving into an RS-232 receiver will typically be detected as logic 0 (SPACE) constantly, producing no valid communication. Always use a level converter.
- Forgetting to cross TX and RX for DTE-to-DTE: when two DTEs connect directly (MCU to PC without a modem), TX must connect to RX on the other side. A straight-through cable connecting TX to TX produces no communication.
- Omitting signal ground: RS-232 is referenced to signal ground. Without the ground conductor connected, the receiver's common-mode rejection is undefined and communication is unreliable.
- Using RS-232 for multi-node communication: RS-232 is strictly point-to-point (one transmitter, one receiver). For multi-node bus communication, RS-485 or CAN bus are the correct choices.
Frequently Asked Questions
- What is the maximum cable length for RS-232?
- The TIA-232 standard specifies a maximum cable capacitance of 2500 pF, which at typical cable capacitances of 50–150 pF/metre limits the cable to approximately 15–50 m depending on cable quality. In practice, most RS-232 installations run reliably at 9600 baud over tens of metres with standard shielded cable. At higher baud rates (115200), maximum reliable distance is significantly shorter — often under 5 m. For longer cable runs, RS-485 differential signalling is the appropriate upgrade.
- Can I connect a microcontroller UART directly to an RS-232 port?
- No, not without a level converter. A 3.3 V MCU UART outputs 0 V and 3.3 V; RS-232 expects −12 V (MARK) and +12 V (SPACE). Connecting an MCU UART TX line directly to an RS-232 input will typically not communicate reliably and may damage the MCU or the RS-232 interface depending on ESD protection. A level converter IC such as the MAX232 (5 V) or MAX3232 (3.3 V) is required to translate between logic-level UART and RS-232 voltages.
- What are the RTS and CTS signals used for?
- RTS (Request to Send) and CTS (Clear to Send) are hardware flow control signals in the RS-232 standard. The transmitting DTE asserts RTS to indicate it wants to send data; the receiving DCE asserts CTS to indicate it is ready to receive. Modern point-to-point RS-232 connections often tie RTS to CTS locally (null modem loopback) when hardware flow control is not required. Many embedded RS-232 implementations omit hardware flow control entirely and use only TX and RX.
References
Related Questions
What Is UART (Universal Asynchronous Receiver-Transmitter)?
UART sends serial data asynchronously over TX and RX with no shared clock. Learn how framing, baud rate, RS-232 voltage levels, and common UART pitfalls work.
What Is RS-485?
RS-485 is a differential multi-drop bus for up to 32 nodes over ~1200 m cable runs. Learn how half-duplex wiring, termination, and Modbus RTU work.
What Is CAN Bus?
CAN bus is a differential, multi-master serial bus where nodes arbitrate by message ID priority. Learn how frames, error confinement, and CAN FD work.
What Is a Microcontroller (MCU)?
A microcontroller (MCU) combines a CPU, flash, RAM, and peripherals on one chip. Learn how MCUs work and how they differ from microprocessors and FPGAs.
SPI vs I2C vs UART: Which Protocol Should You Use?
SPI suits high-speed transfers, I2C minimises pins for multi-device buses, and UART suits point-to-point links. Learn which to choose for your embedded design.
What Is Modbus?
Modbus RTU uses a master/slave model over RS-485. Learn the register model, function codes, frame structure, and how to implement Modbus in embedded firmware.
Related Forum Discussions
STM32F401 UART printing garbage after switching to 84 MHz PLL — same 115200 baud in CubeMX and PuTTY
Got a WeAct Black Pill (STM32F401CCU6) project that's been running happily on the default HSI clock at 16 MHz. Using USART1 on PA9/PA10 thro
SPI reads all returning 0xFF — logic analyser shows MISO activity, W25Q32 not responding to commands
Been staring at this one for a day and a half. I'm trying to read the JEDEC ID from a W25Q32JV SPI flash chip on a custom STM32L432 board. T
I2C bus scan finding nothing — NACK on every address despite pull-ups
Working through my first proper I2C project — hooking up a BME280 temp/humidity sensor to an ESP32 devkit. Wired SDA to GPIO21 and SCL to GP
STM32 USB not detected by Windows after jumping to bootloader mode
Working on a custom STM32F411 board, trying to jump into the built-in USB DFU bootloader from application code instead of holding BOOT0 on p