SPLat Logo

RS232 pinouts: a primer

NOTICE: Our web site is being updated, but is currently experiencing extreme slowness due to host issues. Please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

RS232 pinouts: a primer

RS232 pinout designations can be extremely confusing! The origin of RS232 was as an interface between (old fashioned) computer terminals and modems. Modems provide communications, and are referred to a Data Communication Equipment (DCE). Terminals are, well, terminals, and are referred to as Data Terminal Equipment (DTE).

Traditionally the modem was regarded as a 'service', a bit like a power utility, so the connector on a modem is a female, just like a power outlet.

The signal names are all derived from this mental model. Hence:

Transmit Data (TxD) is data being transmitted via the modem. It comes out of the terminal (DTE) and goes in to the modem (DCE)

Receive Data (RxD) is data being received by the modem. It comes out of the DCE and goes in to the DTE.

Request To Send (RTS) is something the DTE must do. Hence RTS is an output from the DTE and an input to the DCE.

Clear To Send (CTS) is something the DCE may grant. Hence CTS is an output from the DCE and an input to the DTE.

Data Carrier Detect (DCD or just CD) is generated by the modem when it has an incoming signal (carrier) from the 'phone line. Hence it is an output from the DCE and an input to the DTE.

In many systems, RTS and CTS form the basis of a hardware handshaking system. Imagine a modem that cannot transmit and receive data at the same time (such was the case at least in the "bad old days" of 1200 baud modems, before the Internet fueled the development of 14.4K, 28K 34K and 56K modems). If that's hard to imagine, try instead thinking of a pair of single frequency walkie talkies where you have to press a button to transmit. This is called a half duplex system because you can only communicate in one direction at a time. RTS and CTS are then needed to help sort out when the terminal is allowed to transmit data. In such a case, when the DTE needs to transmit it "raises" RTS. The DCE then turns on its transmitter, which may take some finite time to get up and running, and then "raises" CTS. The DTE sees CTS and sends its data, and when done "drops" RTS. Finally the DCE drops CTS.

The DCD signal alerts the DTE to an incoming carrier. In some systems this may presage some incoming data, and should certainly bar the DTE from attempting to send anything in a half-duplex system.

Two other common signals are static ready signals. These are:

Data Set Ready (DSR). This is an output on the DCE and input on the DTE. More often than not DSR is simply a positive voltage (+5V or +12V) brought out of the modem via a current limiting resistor, so it comes on when power is on.

Data Terminal Ready (DTR). This is an output on the DTE and input on the DCE. Like DSR, DTR is usually just +5V or +12V fed via a current limiting resistor.

Finally there is Gnd, which is simply the common return for all signals.

When RS232 was first introduced by IBM, there were many other signals needed (forget about learning that detail!) and a 25 way connector was used. When IBM introduced the PS2 PC, they saw fit to change the standard they first invented and went to a 9 way connector. And in the process they changed the pin numbers all around, including actually reversing RxD and TxD pin number assignments. Naturally this has been a source of perpetual confusion ever since!

Where does all this leave us with SPLat?

When we designed SPLat we decided to use a pinout that would be as easy as possible to connect to a PC. Now, the connector on a PC is a male 9-way (called a DB9P plug) and is wired as a DTE (terminal device). Therefore, we made the SPLat "look like" a DCE to the extent we could without making it cost more. Hence a SPLat has a female connector (DB9S socket). SPLat only needs RxD (an output from a DCE) and TxD (an input to a DCE). It doesn't need RTS in, and has no interest in turning CTS on and off. Instead we generate CTS and DSR signals as permanent high levels, just to be "nice". All this means we keep the price down and you only need a plain vanilla DB9 cable to connect a SPLat to your computer.

On first generation SPLat boards we saved some cost by not having an onboard negative voltage supply (RS232 needs positive and negative voltages on the interface) Instead, we rely on the computer "giving" us a negative level on the RTS line. SPLat/PC ensures that RTS is low (negative). By the time we started designing 2nd generation SPLat boards, we had customers using SPLats over modem links and data radio links, so we incorporated a genuine onboard negative voltage source to make it easier to interface to a modem.

Here are the most important signals in summary form:

Name Direction DB9 DB25
TxD DTE --> DCE 3 2
RxD DTE <-- DCE 2 3
RTS DTE --> DCE 7 4
CTS DTE <-- DCE 8 5
DTR DTE --> DCE 4 20
DSR DTE <-- DCE 6 6
DCD DTE <-- DCE 1 8
Gnd   5 7