RS232 Connectors

This page sets out some basic information about serial connectors used for RS232-level asynchronous serial communications.

Protocol and signal levels

When TXD and RXD lines are in the IDLE state (and for a Logic 1 on these lines):

TTL logic lines are at +5V

RS232 lines are at -VE voltages

Current is flowing in current loops

Here are two diagrams showing TTL and RS232 voltage levels:

Pinouts: DB25 and DE9

DE9 and DB25 connectors usually have the pin numbers embossed on them in tiny lettering. Often it is very difficult to read however.

The diagram on the right shows the pin number of DE9 connectors. Click on the image for a better view of it.

DB25 connectors follow the same numbering convention, and have their Pin 1 in the same position.

The full description of the DB25 pinouts (including rarely used signals) is shown in the table about one-quarter of the way down this page -> RS232 on DB25 Pinout (RS-232C)

The table below shows the serial port pinout on some devices I have needed to make cables for.

This image shows the pinouts of the DB25 connector from a DTE’s perspective -> V.24/RS-232 Interface

Computer / Device Connector TXD RXD DTR DSR DCD RTS CTS GND Notes
IBM PC 25-Pin DB25 M 2 3 20 6 8 4 5 7 Pin 22 = Ring Indicator input.
IBM PC 9-Pin DB9 M 3 2 4 6 1 7 8 5 Pin 9 = Ring Indicator input.
VT320 DB25 M 2 3 20 6 8 4 5 7  
Cromemco CS-1 DB25 F 3 2           7  
Ferguson Big Board I DB25 F 3 2 8 6 20 5 4 7 See Note 1 below.

Note 1 (Ferguson Big Board I):

  • This configuration assumes the “Modem” (not “Terminal”) jumpers are installed. On JB3 or JB4, this means the first 13 jumpers are (starting from PCB edge): O, O, C, O, C, O, C, O, C, O, C, O, C.
  • Pin 6 is hardwired to +12V via a 4.7K resistor.
  • ROM 5.2 assumes 7 data bits, 1 stop bit, odd parity. Auto speed detect. Lowest speed supported is 300 baud (110 baud fails).

DTE/DCE Information

This section is largely adapted from Wikipedia’s Data Terminal Equipment page.

Usually the DTE device is the terminal (or a computer emulating a terminal), and the DCE is a modem or another carrier-owned device.

A general rule is that DCE devices provide the clock signal (internal clocking) and the DTE device synchronizes on the provided clock (external clocking). D-sub connectors follow another rule for pin assignment.

  • 25 pin DTE devices transmit on pin 2 and receive on pin 3.
  • 25 pin DCE devices transmit on pin 3 and receive on pin 2.
  • 9 pin DTE devices transmit on pin 3 and receive on pin 2.
  • 9 pin DCE devices transmit on pin 2 and receive on pin 3.

The signal names used in most diagrams are usually named from the perspective of the DTE device.

IBM PC DB25 Pinout (including current loop)

This section is largely adapted from a posting on Vintage Computer Forums by “vwestlife”.

The original IBM 8-bit ISA serial port card (and exact clones) supported current loop, using some of the pins not normally used by RS-232C. As Wikipedia says, “The original IBM PC serial port card had provisions for a 20 mA current loop”, and “on the original IBM PC, a male D-sub was an RS-232-C DTE port (with a non-standard current loop interface on reserved pins)”.

Pin Signal
1 Chassis/Frame Ground (GND)
2 Transmitted Data (TX or TD)
3 Receive Data (RX or RD)
4 Request To Send (RTS)
5 Clear To Send (CTS)
6 Data Set Ready (DSR)
7 Signal Ground (GND)
8 Data Carrier Detect (DCD or CD)
9 Transmit + (Current loop) (TD+)
11 Transmit – (Current Loop) (TD-)
18 Receive + (Current Loop) (RD+)
20 Data Terminal Ready (DTR)
22 Ring Indicator (RI)
25 Receive – (Current Loop) (RD-)

Current loop technology was supported on the PC and XT interfaces.

Current loop was discontinued when the AT interface was introduced.

Transmitted and receive data are referenced from the data device and not the modem.

Pinouts: DEC-423 MMJ/MMP

vt320-mmj

DEC used a 6-pin modular connector extensively on computers, terminals and printers. These are easily recognised by the offset locking tab, as pictured here.

Each piece of equipment was fitted with a 6-pin female Modified Modular Jack (MMJ). A 6-conductor flat cable with a 6-pin male Modified Modular Plug (MMP) crimped on each end was used to connect two pieces of equipment together. Every device had identical pinout (eg TX and RX was on the same pin on every device). The cable was constructed as a “crossover cable” (to achieve the swapping of TX and RX signals) by having the wiring reversed at each end.

DEC’s part number for the cables was BC16E-xx, where “xx” is the length of the cable in feet (eg – a 10 foot long cable was BC16E-10).

The pins are numbered 1 to 6. Pin 1 is furthest from the locking tab.

The pinouts are as follows (signal names are relative to the device):

Pin 1: Data Terminal Ready

Pin 2: Transmit Data (TX+)

Pin 3: Transmit Data GND (TX-)

Pin 4: Receive Data GND (RX-)

Pin 5: Receive Data (RX+)

Pin 6: Data Set Ready

Lammert Bies website has lots of useful information about the MMJ/MMP connectors and adapters.

MMJ to DE9 Null Modem Cable

mmp-to-de9f

It is relatively easy to construct a cable to connect a DEC device (with a female MMJ socket) to a PC or USB-to-RS232 adapter that has a male DE9 connector on it

You’ll need a short length of 6-pin flat cable with a MMP crimped to one end, and a DE9 female connector.

The interconnections required are shown in the table below. The signal names shown in brackets are relative to the device at that end of the cable. When viewing the DE9F from the rear (solder side) with the 5-pin row at the top, pin 1 is top-left, pin 5 is top-right, pin 6 is bottom-left and pin 9 is bottom-right. On the MMP connector, pin 1 is furthest from the locking tab.

MMP end DE9F end
1 (DTR) 1 (DCD), 6 (DSR), 8 (CTS)
2 (TX+) 2 (RXD)
3 (TX-), 4 (RX-) 5 (GND)
5 (RX-) 3 (TXD)
6 (DSR) 4 (DTR)

Pinout: DEC DLV11-J

The DLV11-J (M8043) is a 4-channel Serial Line Unit for a QBUS PDP-11.

Along the top edge of the DLV11-J there are four 10-pin box headers (one for each channel).

The pin numbering of the box header pins is shown in the diagram on the right, which is Figure 1-1 from the DLV11-J User’s Guide. Pin 6 is usually removed on the DLV11-J, to accommodate a blanking key in the plug in this location.

Figure 4-13 in the DLV11-J User’s Guide (as shown on the right here) gives us a guide to the functionality at the 10-pin connector.

The DLV11-J supports both single-ended (RS232C) and differential (RS422) serial communications, depending on the status of the array of “M” and “N” numbers in the two top corners of the DLV11-J PCB. For RS232 usage, all 8 jumpers should have a link between “X” and “3”. Other changes may also be required. See the DLV11-J User’s Guide for full configuration details.

As can be seen in this diagram there are no handshaking lines (DTR, DSR, RTS, CTS, etc), but the DLV11-J does provide a +12V output that can be used to drive the handshaking lines (DSR, CTS, etc) at the peripheral, if required.

Although not shown in this diagram, Pins 2, 5 and 9 are permanently connected to GND.

DLV11-J to DE9 Null Modem Cable

Shown to the right here is the full pinout of the 10-pin connector on the DLV11-J. This is Table 1-1 from the DLV11-J User’s Guide.

It is relatively easy to construct a cable to connect a DLV11-J serial port to a PC or USB-to-RS232 adapter that has a male DE9 connector on it

I usually run a short length of 10-pin ribbon cable from the IDC 10-pin header, and a length (2 to 5 metres) of 4-way data cable from the DE9 female connector. Those two lengths of cable can then be soldered together as necessary (see the table below). Each individual soldered connection should have a heatshrink sleeve over it, and use another short length of larger diameter heatshrink to cover the overall join.

The interconnections required are shown in the table below. The signal names shown in brackets are relative to the device at that end of the cable. When viewing the DE9F from the rear (solder side) with the 5-pin row at the top, pin 1 is top-left, pin 5 is top-right, pin 6 is bottom-left and pin 9 is bottom-right. On the 10-pin header, pin 1 is in the top-right corner when looking into the housing on the edge of the DLV11-J.

DLV11-J end DE9F end
3 (TD+) 2 (RXD)
8 (RD+) 3 (TXD)
2 (GND) 5 (GND)
7 (RD-) to 9 (GND) N/C

In addition to the above connections, I often connect Pin 4 of the DLV11-J connector to the CTS pin (Pin 5 on a DB25F, Pin 8 on a DE9F). I do this because the DLV11-J can be jumpered to provide a TTL-level “Reader Run” output signal on Pin 4, and I may one day use this.

I always leave the shield un-connected at the DLV11-J end of the cable. I sometime connect the shield to Pin 1 on a DB25 connector.

Note: DEC also made a bulkhead with 4 x DB25M connectors on it, which can be used to connect up all 4 ports on a DLV11-J. The part is called a “DLV11-J Filter Panel”. The DEC Part Number is 5415221 (the “21” is however hidden beneath the 40-pin Berg header), and the PCB is marked “5015220”. The schematic for this panel are available here -> CKDLVJ1 Field Maintenance Print Set, DEC Part Number MP00990-01. Page 13 of the MP00990 Field Maintenance Print Set shows how DEC connects between the DLV11-J and a DB25M plug.

Not also that there are other similar-looking panels that are NOT compatible with the DLV11-J, so check the part number or PCB number before using it. For example there is a H3173A (with PCB number 50-15599-01), which appears to be designed for use with DHV11 (terminal multiplexer).

DLV11-J to DB25M Cable

This cable is useful if you want to use a DB25F-DB25F null-modem cable to connect the DLV11-J to a terminal (and therefore need an adapter to convert between the DLV11-J’s 10-pin header and a DB25M connector).

The interconnections required are shown in the table below. The signal names shown in brackets are relative to the PDP-11. When viewing the DB25M from the rear (solder side) with the 13-pin row at the top, pin 1 is top-right, pin 13 is top-left, pin 14 is bottom-right and pin 25 is bottom-left. On the 10-pin header, pin 1 is in the top-right corner when looking into the housing on the edge of the DLV11-J.

DLV11-J end DB25M end
3 (TD+) 2 (TXD)
8 (RD+) 3 (RXD)
2 (GND) 7 (GND)
7 (RD-) to 9 (GND) N/C

Sometimes it is handy to make use of the +12V from pin 10 of the DLV11-J’s 10-pin connector. This provides fused +12V to a peripheral connected to the DLV11-J (in my case, an Arduino-based ODT bootloader). The question is which pin of the DB25 should it be connected to? The options are:

  • Pin 14 (which is “Secondary Transmit Data”). I say this because a DLV11-J to DB25M cable that I encountered already had this configuration.
  • Pin 9 (which is TD V+). This was historically part of a current-loop configuration (pins 9 and 10) but is generally unused in more modern implementations of the DB25 connector, so there seems little chance of conflict in using this pin for +12V.

FTDI USB-to-TTL-Serial Adapters

Here is the pinout of these relatively-common adapters.

The signal names below are relative to the FTDI chip (ie – TXD and RTS are outputs from the FTDI chip):

Pin Colour Signal
1 Black GND
2 Brown CTS
3 Red VCC
4 Orange TXD
5 Yellow RXD
6 Green RTS

RS232 over existing Ethernet cabling

Sometimes I re-purpose existing CAT5/CAT6 Ethernet cabling in my house to run an RS232 connection.

Both ends of my existing cabling is wired as T-568A (no T-568B) at all patch panels and wall plates, and all my Ethernet patch cables are “straight-through” (not crossover). I avoid using Pins 1, 2, 3 and 6 for RS232, as these are used for 10BASE-T and 100BASE-T Ethernet.

My wiring scheme is as follows:

DE9F Pin Colour Ethernet RJ45
Pin (T-568A)
DB25F Pin
2 (RXD) Brown 8 2 (TXD)
3 (TXD) Blue 4 3 (RXD)
5 (GND) BLU/WT & BRWN/WHT 5 & 7 7 (GND)

The above wiring scheme effectively implements a “null-modem” cable between the DE9F and DB25F. One nice thing about using these RJ45 pins (4, 5, 7 & 8) is that they should be connected “straight through” even if your installation using a mix of T-568A and T-568B, or uses a mix of straight-through and crossover patch cables. In saying that, I’ve only looked at 10BASE-T and 100BASE-T. Things may not be so simple if you are using 1000BASE-T or if you are running PoE. Of course none of this will matter unless you accidentally have one end of a cable connected to an Ethernet device (a switch for example) and the other end connected to an RS232 device.

Sample code to implement serial terminal on a PC

Listed below are some links to projects that implement serial communications on a PC. I have found these to be useful for my own projects.