THE COMPUTER NETWORK OPTIMIZATION EXPERTS !

 

DB-25 Connection     

Compendium Index Up

THE PHYSICAL CABLE CONNECTOR

The original "standard" connector for RS-232 is the DB-25. A DB-25 is a trapezoidal shaped, 25 pin connector. The DTE (the computer) uses the male connector (with the pins sticking out) and the DCE (the modem) uses the female connector. (The previous topic discusses the differences between DTE AND DCE).  The trapezoidal shape of the connector keeps the user from plugging it in upside down.

The female end of an RS-232 cable

You'll notice that you are viewing the connector with the shorter side of the trapezoid at the bottom. In this orientation, Pin 1 is in the upper right. The pins count up across the top row and then start over on the bottom right, continuing the count across the bottom row to the left. Pin 25 is on the lower left.

A brief note on the convention used in the diagrams in this book: the fact that this is a female connector is represented by the pins being shown as white dots. If this were a male DB-25 the diagram would show the pins as black dots.

Mirror Image Connectors

If you think about the pinout of the DCE side of the connection (as shown above) then you'll realize that the DB-25 male connector has a mirror image of the pinout of the female connector. In order for the two connectors to plug together it's necessary for the male connector to be exactly opposite in its pinout from the female connector. Pin 1 on the male connector is in the upper left (when viewed horizontally). In this drawing you are looking at the DTE DB-25 port on the back of a computer (the DB-25 on the right). You are holding the DCE cable so that you are looking at the end of the connector. The two faces that are shown in the picture will plug into each other. Compare the two pinouts. You see that when you plug the female end (on the left) into the male connector (on the right) you'll have to mate the trapezoid shape connector -- Pin 1 will mate with Pin 1, and so on.

Locating Pin 1 on a DB-25 Connector

As an engineer responsible for working with RS-232 connections it is critical that you can immediately identify the pinouts on a connector. My wife helped me know where Pin 1 was located. She told me, "Men always think they're right, but they're not." Now, if men think they are always right, but they're not, then they must be left, and women must be right. Right? The male connector has Pin 1 on the left, the female connector has Pin 1 on the right. Hopefully, now, you'll never forget.

A description of the pinouts on the 25 line RS-232 cable will help explain why there is such an important distinction between DCE and DTE. You see, the definitions of the RS-232 signals are defined with relation to the DCE side of the connection. The RS-232C standard describes a 25 wire interface with a DB-25 connector on each end. A newer (and, today, the most prevalent RS-232 connector is a DB-9, nine pin connector. Let's look at the original connector first, for perspective). The pins on the DB-25 connector are attached to wires with the pin assignments described in the following table.

Line/Pin Number Circuit Description
1 Protective ground
2 Transmitted data (TD)
3 Received data (RD)
4 Request to send (RTS)
5 Clear to send (CTS)
6 Data set ready (DSR)
7 Signal ground
8 Primary carrier detect
9 Test circuit
10 Test circuit
11 Unassigned
12 Secondary carrier detect
13 Secondary clear to send
14 Secondary transmitted data
15 Transmission signal timing
16 Secondary received data
17 Receiver signal timing
18 Unassigned
19 Secondary request to send
20 Data terminal ready (DR)
21 Signal quality detector
22 Ring indicator
23 Data signal rate selector
24 Transmit signal timing
25 Unassigned

 

The first thing you should observe about the table of RS-232 pin assignments is that there are a number of pins that are usually not discussed. Functions like the "Secondary received data" are, for all intents and purposes, obsolete -- you won't encounter them in the field. The RS-232 standard defines a primary and a secondary data channel. Associated with them are the primary and secondary set of control lines.

When a control line indicates a "true" condition, it is set to the space voltage (+3 to +15 volts). When the control line indicates that the condition is not occurring it is set to the mark voltage (-3 to -15 volts). This is different from the typical use of a binary '1' to mean true and a '0' to mean false.  The encoding of bits is discussed in detail in the earlier topic, BIT ENCODING.

Since a space represents a binary 0 it is important to remember that when space voltage appears on a control line it means 'true' and not 'zero'. You might say that '0' is the asserted state of the RS-232 control line. To be Asserted means that the signal indicates a True condition. To be De-Asserted means that the signal indicates a False condition.

You will also notice that the "Ring indicator" and "Signal quality detector" lines have specific reference to interfacing to a telephone system. If we revisit the table from the perspective of RS-232 as it is implemented in today's interconnection environment it might look like the following.

 

 

Line/Pin Number Circuit Description
1 Protective ground
2 Transmitted data (TD)
3 Received data (RD)
4 Request to send (RTS)
5 Clear to send (CTS)
6 Data set ready (DSR)
7 Signal ground
8 Primary carrier detect
20 Data terminal ready (DR)

 

You can see that the secondary circuitry has been, essentially, eliminated. It would be very rare, indeed, to encounter an RS-232 interface that implemented a secondary transmission channel. Also, the telephone related circuits have been removed. It would be reasonable to think that some current modem interface used the ring circuit but, from a field troubleshooting standpoint, the pins shown are the critical ones.

The standard specifies that the number 2 wire is for "Transmitted data". The implication is that it is data transmitted from the DCE. The DCE receives data on line 3. Since wire number 2 is carrying data that is transmitted from the DCE we realize that pin number 2 on the DCE interface connector is the transmit pin. On the DTE side, however, pin number 2 is used to receive data. DTE can connect directly to DCE, pin for pin, because the purpose for the individual connector pins on a DTE can have a different function than on the DCE. One side of the circuit is used to send a signal, the other side receives it.

 

Line/Pin Number Circuit Description Circuit Abbreviation Signal Direction Signal Function
2 Transmitted data TD From DCE: Data transmission
3 Received data RD To DCE: Data transmission
4 Request to send RTS To DCE: DTE wants to transmit
5 Clear to send CTS From DCE: Transmission approved
6 Data set ready DSR From DCE: Unit is operational
8 Primary carrier detect CD From DCE: Modem carrier present
20 Data terminal ready DR To DCE: Unit is operational

 

The two ground wires (pins 1 and 7) provide two different grounding functions. The Protective Ground (Pin 1) connects the two chassis of the DTE and DCE to protect the user from electrical shock. Pin 1 is similar to the third prong on the electrical plug for an electrical appliance. Pin 7, the Signal Ground, is the reference point for zero volts between the two circuits. The Signal Ground is not tied directly to the Protective Ground. When shielded cable is used, Pin 1 is designed to be tied to the shielding in the cable. This might be implemented when a high level of background environmental noise is present.

It should be noted that an RS-232 interface could be implemented using only a Receive Data (RD) line and a Signal Ground (on Pin 7). This is not uncommon when a data backup cable and software are provided with a handheld PDA (Personal Data Assistant) or palmtop computer. A Signal Ground wire is always used in every implementation of RS-232. Without a properly connected Signal Ground the interface will not work. This should be considered whenever you are troubleshooting an RS-232 connection.

It is possible for the Signal Ground to be some number of volts above, or below, the actual earth ground. Earth ground is derived from the metal stake driven into the ground near the point where the electric wires enter the building. It is derived from the third prong in a grounded receptacle. Signal Ground is derived from the ground point in the circuit boards. It is the zero volt reference. Sometimes the effect of circuit design is that earth ground and signal ground are the same value. In a two-wire RS-232 interface there is only a common Signal Ground and a data wire. There is no shared protective ground with a 2-wire interface.

The pin and lead assignments reference the DCE end of the connection. In the typical case of an external modem connected to a computer, the DCE connector on the modem is extended, pin for pin, by an interconnect cable. The connector on the back of the modem is a DB-25 female (which is common for implementing the DCE side). The pinout on the end of the cable is identical to that on the back of the modem. Consider the fact that the pin assignments on the DTE end must be the 'mirror image' of the DCE cable end. When you are thinking about Who is the DCE and who is the DTE, it is often easier to think of yourself as the computer, as opposed to the modem. Doing this will help you remember the direction of the transmitted data (TD) and received data (RD) lines. TD (Pin 2) is the data transmitted FROM the computer (DTE) TO the modem (DCE).

Previous Topic ] Next Topic ] 
Compendium Index ] Up ] Compendium Contents ] Search ]

OTHER TOPICS AT THIS OUTLINE LEVEL:
General Overview ] RS-232 Standard ] Bit Encoding ] Character Encoding ] Data Errors ] Physical Circuit ] DTE and DCE ] [ DB-25 Connection ] Control Signals ] Break-Out Box ] Directional Signals ] Connecting DTE's ] Async & Sync ] Other Signals ] Custom IC's ] RS-423 ] RS-422 ] Modems ]

{Revision F-1} All Content Created By Optimized Engineering Corporation is
Copyright © 1995 - 2000 by Optimized Engineering Corporation
All Rights Reserved

The contents of this web site may not be duplicated or distributed in any
manner without prior written consent of Optimized Engineering Corporation.