Serial Communication: RS-232, RS-422 and RS-485

How a serial character is built, the three electrical standards, DB9 pinouts and null modems, and a correct RS-485 bus.

Why serial still matters

Serial links are old, slow and everywhere. A meter, a drive, a barcode reader, a temperature controller or a PLC programming port very often speaks RS-232 or RS-485, and a USB adapter plus a free program is often the quickest way to find out whether a device is alive. Serial is also the easiest network to understand completely: one pair of wires, one character at a time. If you can troubleshoot serial, the habits (match the settings, check polarity, terminate properly, work from the cable up) carry to every other network.

How a serial character is built

A serial line sends one bit at a time at a speed called the baud rate. There is no clock wire, so each character is wrapped in markers the receiver uses to find the bits: the line idles at logic 1; a start bit (0) announces a character; then the data bits follow, least significant bit first; an optional parity bit allows a simple error check; and one or two stop bits (1) return the line to idle. Both ends must agree on all of these.

One character, 8E1: byte 0x03, sent at 9600 baud (each bit lasts 104 us)0start1D01D10D20D30D40D50D60D70parity1stop1 (idle)011 bits x 104 us = 1.146 ms per characterThe data bits go out least significant bit first, so 0x03 (binary 00000011) is sent as 1 1 0 0 0 0 0 0.Even parity makes the number of 1 bits (data plus parity) even: two 1 bits in the data, so the parity bit is 0.Both ends must agree on baud rate, data bits, parity and stop bits, or the receiver mis-reads the bit boundaries.
One character at 9600 baud, 8 data bits, even parity and one stop bit (8E1): 11 bits and 1.146 ms.
SettingMeaningCommon values
Baud rateBits per second9 600, 19 200, 38 400, 115 200
Data bitsBits of data per character8 (Modbus RTU), 7 (ASCII protocols, some PLC links)
ParityNone, even or odd: an extra bit that makes the count of 1 bits even or odd; catches a single flipped bitEven (Modbus default), none
Stop bitsIdle time after each character1; 2 when parity is none (Modbus)
Flow controlHardware (RTS/CTS) or software (XON/XOFF) handshakeNone for most industrial links

Character times

Baud rateOne bit8N1 character8E1 characterCharacters per second (8N1 / 8E1)Modbus RTU gap (3.5 characters)
1 2000.833 ms8.333 ms9.167 ms120 / 10932.08 ms
2 4000.417 ms4.167 ms4.583 ms240 / 21816.04 ms
4 8000.208 ms2.083 ms2.292 ms480 / 4368.02 ms
9 6000.104 ms1.042 ms1.146 ms960 / 8734.01 ms
19 2000.052 ms0.521 ms0.573 ms1 920 / 1 7452.01 ms
38 4000.026 ms0.260 ms0.286 ms3 840 / 3 4911.75 ms
57 6000.017 ms0.174 ms0.191 ms5 760 / 5 2361.75 ms
115 2000.009 ms0.087 ms0.095 ms11 520 / 10 4731.75 ms

Worked example: how long does a 256-byte message take?

  • At 9 600 baud, 8N1, each byte is 10 bits, so 256 bytes are 2 560 bits: 2 560 ÷ 9 600 = 266.7 ms.
  • At 19 200 baud the same message takes 133.3 ms. Doubling the baud rate halves the time of the data, but the fixed gaps and the device’s processing time do not shrink, so the whole poll improves by less than half.
  • The maximum Modbus RTU frame is 256 bytes, so no single message ever takes more than about 267 ms at 9 600 baud. A timeout of one second is safe for most devices.

RS-232, RS-422 and RS-485 compared

These are electrical standards: they say what voltages represent bits and how many devices may share the wires. They do not define the message format; Modbus, DF1, Host Link and the rest sit on top.

RS-232: one wire against groundRS-485: the difference A – B0 V+15 V+3 V-3 V-15 VLogic 1 (mark): -3 to -15 VLogic 0 (space): +3 to +15 VBetween: undefined.Noise adds to the single wire, sodistance and speed are limited (15 m).0 V+5 V-5 VA – B above +200 mV: one logic stateA – B below -200 mV: the otherNoise hits both wires equally and cancels.Two wires carry opposite voltages; the receiver onlylooks at the difference (the shaded band is undefined).
RS-232 swings a single wire between about +12 V and −12 V; RS-485 sends opposite voltages on two wires and looks only at the difference.
RS-232RS-422RS-485
SignalingSingle-ended, about ±3 to ±15 V against a common groundDifferential, one pair for each directionDifferential, one shared pair (2-wire) or two pairs (4-wire)
Receiver threshold±3 V±200 mV difference±200 mV difference
Devices2 (point to point)1 driver, up to 10 receiversUp to 32 unit loads (256 with 1/8-load transceivers)
WiresTXD, RXD, ground (plus handshake lines)4 wires and a reference, full duplex2 wires half duplex, or 4 wires
Maximum lengthAbout 15 m at 9 600 baudAbout 1 200 mAbout 1 200 m
Maximum speed115 kbit/s typical (up to 1 Mbit/s short)10 Mbit/s at 12 m10 Mbit/s at 12 m
Noise immunityPoorGoodGood
Typical useProgramming ports, barcode readers, instruments, PC to PLCPoint-to-multipoint, older drives and PLC linksModbus RTU, PROFIBUS DP, meters, drives, sensors

RS-232 in practice

DB9 male port1234567891 DCD2 RXD3 TXD4 DTR5 GND6 DSR7 RTS8 CTS9 RIPins 2, 3 and 5 are all that many PLC links need.Straight-through cablePC (DTE)Device (DCE)2 RXD2 RXD3 TXD3 TXD5 GND5 GNDComputer to modem-style device: pin 2 to pin 2, 3 to 3.Null modem cable (two computers, or a PC and a PLC port that is also wired as a computer)PCPLC port2 RXD3 TXD3 TXD2 RXDTransmit must always meet receive. With twodevices of the same type, the cable has to crosspins 2 and 3 (a null modem), plus ground on 5.If nothing arrives, swap to the other cable typeor use an adapter: this is the commonestserial fault. Check the PLC manual: some portsare wired DTE, some DCE.Hardware flow control (RTS/CTS) is rarely used with PLCs; if the device asks for it, wire 7 and 8 too.
The DB9 pins used by RS-232, with a straight-through cable and a null-modem cable.
DB9 pinSignal (DTE, a PC)DirectionUsed for
1DCD, carrier detectinModems; usually unused
2RXD, receive datainData from the other device
3TXD, transmit dataoutData to the other device
4DTR, data terminal readyoutHandshake; sometimes used to power or reset
5GND, signal groundThe reference for all the signals
6DSR, data set readyinHandshake
7RTS, request to sendoutHandshake; also RS-485 direction control on some adapters
8CTS, clear to sendinHandshake
9RI, ring indicatorinModems; sometimes carries +5 V on special ports
  • A PC is a DTE (data terminal), a modem is a DCE. A DTE talks to a DCE with a straight cable (pin 2 to 2, 3 to 3). Two DTEs need the transmit and receive lines crossed: a null-modem cable. Many PLC programming ports are wired as DTEs, which is why a PC needs a crossed cable to some and a straight cable to others. If nothing arrives, try the other type of cable first.
  • Only three wires matter for most links: RXD, TXD and ground. Handshake wires are used only when the device manual asks for them.
  • RS-232 does not need terminators or bias. It does need a common ground, and it is limited by cable capacitance: about 15 m at 9 600 baud, less at higher speeds.
  • Not every DB9 is RS-232. Some PLC ports are RS-485 or RS-422 on a DB9 and carry 5 V or 24 V on spare pins. Read the manual before you connect a PC adapter, or you may damage one of the two ports.
  • Connector gender. The PC end is usually a male DB9 (pins) and the device end female, but not always. A gender changer fixes the fit and changes nothing electrically.
  • Long RS-232 runs. Past 15 m, convert to RS-485 (an RS-232 to RS-485 converter at each end), use a lower baud rate, or move to Ethernet with a serial device server.

RS-485 in practice

RS-485 carries a bit as the voltage difference between two wires, usually called A and B (or D− and D+). Noise that hits both wires equally cancels out, which is why RS-485 works over long cables next to motors. A line driver turns the signal on and a receiver reads it; on a shared pair only one driver may be on at a time, so each device switches its driver off when it is not sending (direction control).

2-wire, half duplex (usual for Modbus RTU)ABMasterSlave 1Slave 2Slave 3One pair; the master and slaves take turns. The driver of every device must switch off when it is not sending(direction control: automatic in most converters, or by the RTS signal).4-wire, full duplex (RS-422 style, master-to-slave and slave-to-master pairs)MasterTx pair, Rx pairSlave 1Slave 2Slave 3master Tx pairslaves Rx pair
Two-wire half duplex (all devices share one pair) and four-wire full duplex (separate transmit and receive pairs).
ModeWiresHow it worksTypical use
2-wire half duplexA, B (+ reference)One pair; the master sends, then listensModbus RTU, PROFIBUS, most drives and meters
4-wire full duplexTX pair, RX pairThe master has a transmit pair to all slaves and a receive pair from them; slaves still take turns replyingOlder equipment, some serial PLC networks (RS-422 style)
Point to pointA, BTwo devices only; still terminateDrive to PLC, instrument to PC
  • Direction control. A converter or port must enable its driver only while sending. Good USB-RS485 adapters do this automatically; some PLC ports use the RTS line or a configuration setting. A driver left on blocks every other device on the bus.
  • Turnaround. After sending, the master must switch to receive quickly enough to catch the reply; a slow adapter or a software delay causes lost responses at high baud rates.
  • A and B are not standard. Some makers call the same wire A and others B, and +/− is used as well. If nothing works, swapping the pair on one device is the first test.

Wiring an RS-485 bus

A (−)B (+)commonMaster (PLC)RS-485 portSlave 1drive, address 1Slave 2meter, address 2Slave 3sensor, address 3120 Ωend 1120 Ωend 2bias: pull-up to +5 V on B,pull-down to 0 V on A (once)One daisy chain, two terminators, one bias point. No stars, no long stubs.Use twisted-pair cable, 120 Ω impedance. Keep stubs under about 1 m at 9600 baud. Up to 32 unit loads, 1200 m at 9600 baud.
One daisy chain, a 120 Ω terminator at each end only, a single bias point and a common reference.
  • Daisy-chain, never a star. Run the cable from device to device. Any branch (stub) should be as short as possible: under about 1 m at 9 600 baud, shorter at higher speeds.
  • Twisted, shielded pair with 120 Ω characteristic impedance (for example Belden 9841). The twist is what makes the noise cancel; do not use untwisted bell wire or two wires from a multicore cable.
  • Terminate both ends, and only the ends, with a resistor equal to the cable impedance (120 Ω) across A and B. Many devices have a switchable terminator; check that exactly two are on.
  • Bias once (next section), at one point, so the idle line has a defined level.
  • Common reference. Connect the signal grounds of the devices through the third conductor (or the shield through a resistor) so that every receiver sees the signals within its common-mode range (−7 V to +12 V).
  • Shield at one end, or through a bond. See the grounding section below and Cabling, Grounding and Noise.
  • Keep it away from power cables and VFD motor leads.
  • Repeaters extend a bus past the node or distance limit and isolate segments; each segment has its own terminators.

Termination and bias

Two resistors do two different jobs. Termination (120 Ω across the pair at each end) matches the cable’s impedance so that fast edges are absorbed and do not reflect back along the cable and corrupt later bits. Bias (a pull-up resistor from B to +5 V and a pull-down from A to ground) makes the idle line sit at a clear logic level, so receivers do not read noise as data when nobody is transmitting. Termination is needed on both ends; bias is needed once on the whole bus (usually at the master or in the converter).

Worked example: the idle voltage with bias

  • Bias resistors of 680 Ω to +5 V and to ground, and two 120 Ω terminators in parallel (the load seen across A and B is 60 Ω).
  • The pull-up, the load and the pull-down form a divider: VAB = 5 × 60 ÷ (680 + 60 + 680) = 0.211 V.
  • That is above the receiver threshold of 0.2 V, so the idle line reads as a definite logic 1. With 470 Ω resistors the idle voltage is 0.300 V: stronger, but it loads the drivers more.
  • Without bias, the idle difference is close to 0 V, inside the undefined band, and noise produces random characters.
  • Many modern transceivers have built-in fail-safe (they read an open or idle line as a defined state), which makes external bias unnecessary; check the datasheet. Never put bias in more than one place: the resistors add in parallel and overload the drivers.
Measurement (power off, bus disconnected from the master)ReadingMeaning
Resistance across A and BAbout 60 ΩTwo 120 Ω terminators: correct
Resistance across A and BAbout 120 ΩOnly one terminator
Resistance across A and BVery high (open)No terminator
Resistance across A and BBelow about 40 ΩMore than two terminators, or a short
Voltage A to B (power on, idle)About +0.2 V to +5 V with B positiveBiased and idle; a reading near 0 V means no bias

Distance, speed and the number of devices

1 k10 k100 k1 M10 M10 m100 m1000 mModbus RTU, 9600 baud: 1200 m1 Mbit/s: about 120 m10 Mbit/s: about 12 mData rate (bits per second)Maximum cable length (rule of thumb for good twisted-pair cable)
Rule-of-thumb maximum RS-485 cable length against data rate.

Cable length falls as speed rises, because the cable’s capacitance rounds the edges until the bits blur together. At 9 600 baud the practical limit is the 1 200 m of the standard; at 1 Mbit/s it is around 120 m; at 10 Mbit/s a few tens of meters. Most Modbus RTU systems run at 9 600 or 19 200 baud, which leaves plenty of margin.

Unit loads

The “32 devices” limit counts unit loads, a measure of how much each receiver loads the line. A classic transceiver is 1 unit load, so 32 fit on a bus. Modern transceivers are rated 1/2, 1/4 or 1/8 unit load, allowing 64, 128 or 256 devices; but the cable resistance and capacitance still limit the practical number. Add up the unit loads from the datasheets.

Worked example: is the bus within limits?

  • A bus has 10 older devices at 1 unit load each, and 40 modern devices at 1/8 unit load each.
  • Total load = 10 × 1 + 40 × 0.125 = 15 unit loads. That is under 32, so the receivers are within the standard.
  • The master driver must also drive two 120 Ω terminators and the cable. The standard’s driver is rated for 32 unit loads plus the terminators; check the master’s datasheet for any derating, and use a repeater if the bus is long or the baud rate is high.
  • Fifty devices at 9 600 baud is allowed by the numbers, but a poll cycle of 50 devices (see the Modbus page) is slow: split into two buses if you need speed.

Grounding, isolation and surge protection

Two panels often have a different ground potential: a few volts is common, and tens of volts occurs near large drives and welders. A cable that joins their signal grounds carries the difference as a current, adding noise, and a difference above about 7 V puts the signals outside the receivers’ common-mode range, which can destroy the ports.

Without isolationWith isolated transceiversPanel 1RS-485 portPanel 2RS-485 port+ 4 V differencePanel 1RS-485 portPanel 2RS-485 port+ 4 V differencecommon wireisolation barrier cuts the loopThe 4 V difference between the two grounds drives current along the common wire (and the shield), whichadds noise or exceeds the transceivers’ common-mode range (-7 to +12 V). Fix: isolated converters or ports,a common reference through a 100 ohm resistor, or fiber between buildings.
A ground potential difference between two panels, without and with isolated transceivers.
MeasureWhat it doesWhen to use it
Isolated transceivers or convertersSeparate the signal ground of each device with a barrier (typically 1 to 3 kV)Whenever two panels, or a laptop and a panel, are joined: the safe default
Common reference through 100 ΩJoins the signal grounds through a resistor that limits ground currentNon-isolated ports on the same bonded system
Shield grounded at one endStops hum without a ground loopLow-frequency noise; short runs
Shield bonded at both endsBlocks radio-frequency noise; needs equipotential bonding so that ground current does not use the shieldHeavy drives, long cables, with a bonding conductor beside the cable
Surge protectors (TVS or gas tubes)Clamp lightning and switching spikes on long outdoor runsCables between buildings; use fiber where possible
Fiber optic linkNo electrical connection at allBetween buildings and across large ground differences

Settings that must match

SettingWhy it mattersIf wrong
Baud rateThe receiver samples at its own clock; the speeds must agree to within a few percentGarbage characters, framing errors
Data bits7 or 8 data bits change where the stop bit fallsGarbage or shifted data
ParityAn even-parity receiver rejects characters from an odd or no-parity senderParity errors; frames ignored
Stop bits1 or 2; usually tolerated if the sender uses more than the receiver expectsOccasional framing errors
ProtocolRTU against ASCII; Modbus against DF1 or Host LinkNo reply
Station addressUnique on the bus; valid range for the protocolNo reply, or two devices answering at once
Timeout and retriesHow long the master waits and how often it tries againFalse alarms, or a slow recovery

Write the settings of every device on a table beside the drawings. A good habit when a link does not work is to put the device back to its factory defaults and use those.

Converters and adapters

DeviceWhat it doesBuying notes
USB to RS-232 adapterGives a laptop a COM port (DB9)FTDI or Silicon Labs chips; avoid counterfeit Prolific chips; isolated versions for plant use
USB to RS-485 / RS-422 adapterScrew terminals for A, B and groundAutomatic direction control; isolation; a terminator switch
RS-232 to RS-485 converterExtends or joins networksIsolation, DIN-rail power, bias and terminator options
Serial device serverPuts a serial device on Ethernet (a COM port over TCP)Raw TCP, Modbus gateway and virtual COM modes; power and surge protection
Repeater / isolatorExtends a bus or splits groundEach side has its own terminators
Protocol gatewayTranslates, for example Modbus RTU to Modbus TCP or EtherNet/IPCheck the register mapping and the poll model

The Sniffers, Analyzers and Serial Tools page explains how to use adapters to test and sniff a serial link.

Common mistakes

MistakeWhat you seeFix
Straight cable where a null modem is needed (or the reverse)No data at allSwap pins 2 and 3, or fit a null-modem adapter
A and B swapped on one deviceNo reply, or the line seems deadSwap the pair on one device
Wrong baud rate or parityGarbage characters, framing errorsMatch the settings at both ends; scan the baud rates
Terminators missing or in the middleErrors rising with baud rate or cable lengthExactly two terminators, at the two ends
Star wiring or long stubsRandom errors, some devices failDaisy-chain; shorten stubs
Two devices with the same addressGarbled replies or noneGive each its own address
Bias in several placesDrivers overloaded, weak signalsBias at one point only
No common referenceWorks one day, fails the nextConnect the reference or use isolated ports
Different ground potentials with no isolationIntermittent faults, burnt portsIsolated converters; bond the panels
USB adapter not set to the right COM portTerminal shows nothingCheck Device Manager and the software setting

Related

FAQ

What baud rate should I use?

Start with 9 600 or 19 200. Higher speeds work on short, clean buses, but long cables, many devices and noise favor lower rates. Every device on the bus must use the same setting.

Do I always need a terminator on RS-485?

On a long cable or at high speed, yes, at both ends. A short bench setup at 9 600 baud may work without, but adding the terminators is good practice and costs nothing.

Can I run RS-485 in a star?

Not reliably. Stubs cause reflections. Use a daisy chain, or put a repeater or hub in each branch so that each branch is its own bus.

Why does my RS-232 cable stop working over 20 meters?

The cable’s capacitance rounds the edges, and RS-232’s single-ended signal picks up noise. Convert to RS-485 or use a lower baud rate and a low-capacitance cable.

What is the difference between RS-422 and RS-485?

RS-422 has one driver and up to ten receivers on separate pairs. RS-485 allows many drivers on a shared pair, and its drivers can be switched off. A device with RS-422 can often be connected to an RS-485 bus in 4-wire mode.

Why do some adapters need an RTS signal?

To switch the driver between transmit and receive. Good adapters do it automatically; with a simple one, the software must raise RTS while sending.

References

  • TIA/EIA-232-F, Interface between Data Terminal Equipment and Data Circuit-Terminating Equipment.
  • TIA/EIA-485-A, Electrical Characteristics of Generators and Receivers for Use in Balanced Digital Multipoint Systems; TIA/EIA-422-B.
  • Texas Instruments, The RS-485 Design Guide (application report SLLA272) and RS-485 Basics: Termination and Bias.
  • Modbus Organization, MODBUS over Serial Line Specification and Implementation Guide V1.02 (settings, timing, wiring).
  • Belden, Industrial Cable Technical Data: RS-485 and PROFIBUS cables.

Last reviewed: October 2026. Speeds, lengths, node counts and menu names are typical: confirm against the specification and the manufacturer’s documentation for the devices you use.