RS-422 Differential Links
RS-422 uses differential signaling on two wire pairs for full-duplex communication over long distances. It shares the noise immunity and cable length advantages of RS-485 without the complexity of half-duplex bus management. This guide covers how to use mcserial for RS-422 devices.
When you have an RS-422 device
Section titled “When you have an RS-422 device”RS-422 is common in industrial and scientific equipment where you need reliable communication over distances that RS-232 cannot handle:
- Satellite dish controllers — antenna positioners using long cable runs from the control room to the dish
- Industrial sensors — temperature, pressure, and flow sensors mounted far from the data acquisition system
- CNC machines — machine tools with control panels connected via long differential links
- Avionics data buses — aircraft instrumentation using differential serial
- Building automation — HVAC controllers, access systems, and energy monitors spread across a facility
All of these are point-to-point (or point-to-few-receivers) links that need the distance and noise immunity of differential signaling but use full-duplex communication — you send a command and read the response without any direction switching.
Opening a port in RS-422 mode
Section titled “Opening a port in RS-422 mode”Use the mode parameter on open_serial_port to start in RS-422 mode directly:
open_serial_port(port="/dev/ttyUSB0", baudrate=9600, mode="rs422")Or open first and switch:
open_serial_port(port="/dev/ttyUSB0", baudrate=9600)set_port_mode(port="/dev/ttyUSB0", mode="rs422")What changes in RS-422 mode
Section titled “What changes in RS-422 mode”RS-422 mode disables tools that don’t apply to differential links:
- RS-232 modem tools blocked:
get_modem_lines,set_modem_lines,pulse_line,send_break,set_break_condition— these control RS-232 signal lines that have no meaning on an RS-422 link. Your adapter may expose RTS/DTR, but they serve no RS-422 function. - RS-485 bus tools blocked:
set_rs485_mode,rs485_transact,rs485_scan_addresses— these manage half-duplex direction control. RS-422 is full-duplex, so direction control is not needed.
Everything else works normally:
transact— send a command and read the responseread_serial/write_serial— read and write dataconfigure_serial— change baud rate, timeouts, line endingsfile_transfer_send/file_transfer_receive— XMODEM/YMODEM/ZMODEM transfers- All other common tools
Checking adapter support
Section titled “Checking adapter support”Use check_rs422_support to detect your adapter’s RS-422 capabilities:
check_rs422_support(port="/dev/ttyUSB0")This reports the adapter chip family, whether it supports dual differential pairs natively, and any adapter-specific notes. The same USB-serial adapters that work with RS-485 generally work with RS-422 — the difference is in the wiring, not the chip.
Common adapters for RS-422
Section titled “Common adapters for RS-422”Most RS-422 communication uses the same USB-serial adapters as RS-485, with different wiring:
| Adapter | RS-422 Notes |
|---|---|
| FTDI FT2232H / FT4232H | Dual/quad-channel chips. Each channel can drive a differential pair via external transceiver. Native RS-422 support with appropriate breakout board. |
| FTDI FT232R / FT232H | Single-channel. Works with external RS-422 transceiver (MAX490, SN75179). Most common setup. |
| CP2105 / CP2108 | Silicon Labs dual/quad-channel. Each channel supports RS-422 with external transceiver. |
| CH340 / CH341 | Budget adapters. Work with external RS-422 transceiver but timing is less precise at high speeds. |
RS-422 vs RS-485: same wires, different topology
Section titled “RS-422 vs RS-485: same wires, different topology”RS-422 and RS-485 are electrically compatible — they use the same differential signaling levels and the same transceiver chips (like the MAX485/MAX490 family). The difference is topology:
| Aspect | RS-422 | RS-485 |
|---|---|---|
| Wiring | 4 wires: TX+, TX-, RX+, RX- | 2 wires: A, B (shared bus) |
| Direction | Full-duplex (always) | Half-duplex (most common) |
| Transmitters | 1 per pair | Many, taking turns |
| Receivers | Up to 10 per pair | Up to 32 (or 256) |
| Direction control | None needed | DE/RE pin toggling |
| Bus arbitration | None needed | Protocol-dependent (Modbus, etc.) |
If your device uses 4 wires with dedicated TX and RX pairs and doesn’t need bus arbitration, it is RS-422. Use RS-422 mode in mcserial.
If your device uses 2 wires with multiple devices taking turns transmitting, it is RS-485. Use RS-485 mode.
Example: long-distance sensor link
Section titled “Example: long-distance sensor link”A temperature sensor is mounted 500 meters from the control room, connected via RS-422 differential cable:
# Discover the adapterlist_serial_ports(grep="FTDI")
# Open in RS-422 mode at the sensor's baud rateopen_serial_port(port="/dev/ttyUSB0", baudrate=9600, mode="rs422")
# Set line ending for the sensor protocolconfigure_serial(port="/dev/ttyUSB0", line_ending="crlf")
# Query the sensortransact(port="/dev/ttyUSB0", data="READ TEMP", response_terminator="\r\n")
# Check adapter capabilitiescheck_rs422_support(port="/dev/ttyUSB0")The workflow is identical to RS-232 — just transact to send commands and read responses. The difference is entirely at the physical layer (differential signaling over long cable), which the adapter handles transparently.