RS232 serial cable layout and pin assignment

RS232 serial cable layout
Almost nothing in computer interfacing is more confusing than selecting the right RS232 serial cable. These pages are intended to provide information about the most common serial RS232 cables in normal computer use, or in more common language "How do I connect devices and computers using RS232?"
RS232 serial connector pin assignment
The RS232 connector was originally developed to use 25 pins. In this DB25 connector pinout provisions were made for a secondary serial RS232 communication channel. In practice, only one serial communication channel with accompanying handshaking is present. Only very few computers have been manufactured where both serial RS232 channels are implemented. Examples of this are the Sun SparcStation 10 and 20 models and the Dec Alpha Multia. Also on a number of Telebit modem models the secondary channel is present. It can be used to query the modem status while the modem is on-line and busy communicating. On personal computers, the smaller DB9 version is more commonly used today. The diagrams show the signals common to both connector types in black. The defined pins only present on the larger connector are shown in red. Note, that the protective ground is assigned to a pin at the large connector where the connector outside is used for that purpose with the DB9 connector version.
The pinout is also shown for the DEC modified modular jack. This type of connector has been used on systems built by Digital Equipment Corporation; in the early days one of the leaders in the mainframe world. Although this serial interface is differential (the receive and transmit have their own floating ground level which is not the case with regular RS232) it is possible to connect RS232 compatible devices with this interface because the voltage levels of the bit streams are in the same range. Where the definition of RS232 focussed on the connection of DTE, data terminal equipment (computers, printers, etc.) with DCE, data communication equipment (modems), MMJ was primarily defined for the connection of two DTE's directly.
RS232 DB9 pinout

DEC MMJ pinout

RS232 DB25 pinout


RS232 DB25 to DB9 converter
The original pinout for RS232 was developed for a 25 pins sub D connector. Since the introduction of the smaller serial port on the IBM-AT, 9 pins RS232 connectors are commonly used. In mixed applications, a 9 to 25 pins converter can be used to connect connectors of different sizes. As most of the computers are equipped with theDB9 serial port version, all wiring examples on this website will use that connector as a default. If you want to use the example with a DB25, simply replace the pin numbers of the connector according to the conversion table below.
RS232 DB9 to DB25 converter
RS232 DB9 to DB25 converter

DB9 - DB25 conversion
DB9 DB25 Function
1 8 Data carrier detect
2 3 Receive data
3 2 Transmit data
4 20 Data terminal ready
5 7 Signal ground
6 6 Data set ready
7 4 Request to send
8 5 Clear to send
9 22 Ring indicator