DB9 / RS-232 Wiring Guide

DB9 pinout for RS-232 and RS-485, straight and null-modem cables, in 3D

🔒 Your data stays in your browser: nothing you type or upload is sent to a server.

How it works

Rotate the 3D DB9 connector to see the nine pins, choose the RS-232 pinout or a null-modem crossover, and follow the soldering steps. RS-485 is included with an honest caveat: DB9 has no universal pinout for it, so the manual of the devices always decides.

Common questions

How do I make a null-modem cable?

Cross the data lines: pin 2 to pin 3 and pin 3 to pin 2. For full handshaking also cross 7 to 8 and 8 to 7, link 4 to 6 and 1 at the other end, and connect ground 5 to 5. A minimal 3-wire version (2, 3 and 5) works if the software does not use hardware flow control.

Is the PC serial port male or female?

A PC COM port is normally a male DB9 and is wired as a DTE, with TXD on pin 3 and RXD on pin 2. Modems and many serial devices are DCE, with a female DB9 and the lines mirrored, so a straight cable connects them.

What is the RS-485 pinout on a DB9?

There is no universal one. Modbus serial line and PROFIBUS DP both use pin 3 (B, +), pin 8 (A, −) and pin 5 (common), but other devices differ. Follow the manual, and if nothing communicates, try swapping the pair.

Related tools