Electronics Design AU
Communications

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:

LevelVoltage at transmitterVoltage 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):

PinSignalDirection (DTE)Description
1DCDInputData Carrier Detect
2RXDInputReceive Data
3TXDOutputTransmit Data
4DTROutputData Terminal Ready
5GNDSignal Ground
6DSRInputData Set Ready
7RTSOutputRequest to Send
8CTSInputClear to Send
9RIInputRing 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

Related Forum Discussions