D9 To Db25 Pinout Assignments

Tech Stuff - RS-232 Cables, Wiring and Pinouts

Brief tutorial and pinouts for RS-232, RS422/485, T1/E1 and V.35. If you want to know more about RS 232 signals then this page may help - but you may also need to lie down in a darkened room afterwards.

Contents

  1. DTE (PC) and DCE (Modem)
  2. DB9 and DB25 Male and Female Pin Numbering
  3. RS232 on DB25 Pinout (RS-232C)
  4. RS232 on DB9 Pinout (TIA - 574)
  5. RS232 on RJ45 (RS-232D TIA-561)
  6. RS232 DB25 NULL Modem Pinout
  7. RS232 DB9 NULL Modem Pinout
  8. RS232 DB9 and DB25 Loopback Pinout
  9. RS232 DB9 NULL Modem Pinout using Cat5(e)
  10. RS232 DB9 to DB25 Pinout
  11. RS232 DB9 to DB25 NULL Modem Pinout
  12. RS-422, 423 and 485 TIA/RS-530-A using DB25)
  13. RS-422 and 485 using DB9
  14. V.35 on a DB25
  15. DBx - Designations for D type sub-miniature connectors
  16. T1/E1 Pinout (RJ-48C)

RS-232 standards(TIA-232) are defined by TIA (Telecommunications Industry Association). RS-232 defines both the physical and electrical characteristics of the interface. RS-232 is practically identical to ITU V.24 (signal description and names) and V.28 (electrical). RS232 transmit (TX and Receive (RX) are ACTIVE LOW voltage interfaces and operates at +12V to -12V where:

  1. Signal = 0 > +3.0V (SPACE)
  2. Signal = 1 < -3.0V (MARK)

Notes:

  1. Signal voltages in the range >-3.0V to +3.0V are regarded as being in the 'dead area' (indeterminate value) and allow for absorption of noise. For more on the use of signals and other heavy stuff.

  2. Control Signals (CTS, RTS, DTR, DSR etc. are ACTIVE HIGH (range +3V tp +12V). For more on the use of signals and other heavy stuff.

  3. The power level on RS232 pins is defined by TIA for short circuit protection to be 100mA. Most RS232 drivers will provide lower short circuit protection (especially for laptops). A max of 50mA PER PIN may be available but the data sheet for the specific interface/chip should be consulted before commiting to externally powered designs.

  4. We received an email recently pointing out some issues with NULL modem cables. The pinouts shown below will generally work. However, there are many permutations of signal sets that can be used by either end of a connection and they may not be SYMMETRIC. One end may expect something (a signal) that the other end cannot generate. This typically happens with CTS/RTS (and perhaps DCD) and DTR/DSR. If you suspect this is the case then unfortunately you need to understand the interface and may have to 'spoof' (artifically create) certain signals. Our signal primer page may help you. Finally, if you are having serious problems, splash out on what is frequently called a 'light box' or some other device that will show you which signals are being activated.

  5. Serial communications equipment may be either a DTE (Data Terminal Equipment - a terminal or PC) or a DCE (Data Communications Equipment - for example, a modem) and have a direction depending on the type. All the diagrams below define the interface from the DTE perspective.

  6. The terms Data Carrier Detect (DCD) and Received Line Signal Detect (RLSD) are one and the same. We use DCD throughout 'cos we think it's more common.

  7. While the term RS232 is almost universally used these days for serial/modem connections, outside of North America it is quite common to come across the ITU designations V.24/V.28 when describing serial/modem communications. For all practical purposes RS232 and V.24/V.28 are identical.

  8. Like most folks we use the term DB9 which is widely - but erroneously - coined to describe a 9-pin serial connector. We got an email pointing out the error of our ways (hint: it is really a DE-9P). So, if you want to amaze your friends over the dinner table, you can read more and use the technically correct terms in the future. While we get away with DB9 most of the time (with common or garden PCs), sometimes it is essential to know EXACTLY what connector type you are talking about. And, following a recent email request, we discovered that the thread on RS-232 (DB9 and 25) receptacles is UNC 4-40.

  9. RS-232-E is normally defined to be used with a DB25 connector, but does have a 26 pin (a much smaller) alternative . We suggest that if you come across one of these that you do the decent thing - use an expletive. Alternatively, with your luck, you could consider buying a lottery ticket.

  10. We have received a number of emails asking how to wire DB9's using cat5(e)/cat 6 cable. We guess there is a lot of LAN cable lying around these days (and its cheap) so folks naturally want to use it. We have added a null modem only section to cover this wiring. There is absolutely no standard to cover this form of wiring. This section is simply offered as one of many possible ways to do it. While we are on the topic of wiring, RS232 does not define a cable standard but this may help in choosing a suitable cable.

  11. We got an email asking about TTY 20ma current loop interfaces. This was an old method used to connect teletype devices and uses current (normally 20ma but sometimes 60ma) to indicate mark and space. A TTY system CANNOT be connected to RS-232 (which is a voltage driven interface) and has no standard. You will need to get the manufacturer's specifications and start reading!

  12. RS-232 is probably the most widely known serial standard because of its use in PCs. It uses unbalanced communications (single TX/RX/CTS/RTS connectors) and hence has both speed limitations and is susceptible to noise interference. RS-422 or RS-485 are increasingly common because they use balanced communication (two connectors for most signals) and provide higher speeds (up to 10 mbit/s) and are significantly more robust in electrically noisy environments - such as automotive, military, telecommunications and marine.

  13. Like most people we continue to use the term RS, as in RS-232, RS-422, etc. Many moons ago the standardization effort was taken over by EIA/TIA (sometimes written as TIA/EIA). Now the EIA no longer exists (as of Feb 11th, 2011) and TIA is the only man left standing. Consequently, you will occasionally see references to TIA-232 or TIA-574 etc. Anything with a TIA designation is functionally identical to the same number with an RS designation, thus, TIA-232 = RS-232. We will continue to use the RS term simply because we think it is still more widely used and because old dog, new tricks.....

DTE (PC) and DCE (Modem)

In serial communications the terminal end (PC) is called the Data Terminal Equipment (DTE) and the modem end is called the Data Communications Equipment (DCE) as shown in the diagram below.

Serial Communications with a modem

RS-232 signals have a direction (in or out) depending on whether they are with respect to a DTE or a DCE. In all the pinout diagrams below the signal direction is with respect to the DTE (PC) end.

NULL Modem Connections

When PCs are connected back-to-back each end is acting as a DTE (there is no DCE in this case) and consequently certain signals may have to be looped in the connection to satisfy any input signal requirement. This is called a NULL (no) modem configuration. For example, when the DTE raises Request to Send (RTS) it typically expects Clear to Send (CTS) from the DCE. Since there is no DCE to raise CTS, the outgoing RTS signal is looped in the NULL modem cable to the incoming CTS to satisfy the DTE's need for this signal. This is shown in the diagram below.

Serial Communications with a NULL modem configuration

DB9 and DB25 Male and Female Pin Numbering

These diagrams show the male (grey background) and female (black background) pin numbering for DB9 and DB25 sub-miniature connectors. Generally Pin 1 is marked on the front of the connector right next to the pin - though you may need a magnifying glass to read it. Some manufacturers mark each pin number on the plastic housing at the rear of the connector. The male connector has the pins sticking out!

DB25 Male and Female

DB25: View looking into male connector

DB25: View looking into female connector

DB9 Male and Female

DB9: View looking into male connector

DB9: View looking into female connector

RS232 on DB25 (RS-232C)

The use of each pin including methods for spoofing signals is described in our Signal/pin primer. The RS-232 DB25 connector is capable of supporting two separate connections - each with its own optional clock when used in Synchronous mode or Bit-Synchronous mode. If you are using the interface purely for Asynchronous communications then you only need those marked with (ASYNC) below or you can use even fewer (if you understand what is happening). The column marked Dir shows the signal direction with respect to the DTE.

Note: This is NOT the same as the DB25 Parallel port on a PC.

Pin No.NameDirNotes/Description
1--Protective/shielded ground
2TDOUTTransmit Data (a.k.a TxD, Tx) (ASYNC)
3RDINReceive Data (a.k.a RxD, Rx) (ASYNC)
4RTSOUTRequest To Send (ASYNC)
5CTSINClear To Send (ASYNC)
6DSRINData Set Ready (ASYNC)
7SGND-Signal Ground
8CDINCarrier Detect (a.k.a DCD).
9--Reserved for data set testing.
10--Reserved for data set testing.
11--Unassigned
12SDCDINSecondary Carrier Detect. Only needed if second channel being used.
13SCTSINSecondary Clear to send. Only needed if second channel being used.
14STDOUTSecondary Transmit Data. Only needed if second channel being used.
15DBOUTTransmit Clock (a.k.a TCLK, TxCLK). Synchronous use only.
16SRDINSecondary Receive Data. Only needed if second channel being used.
17DDINReceive Clock (a.k.a. RCLK). Synchronous use only.
18LL-Local Loopback
19SRTSOUTSecondary Request to Send. Only needed if second channel being used.
20DTROUTData Terminal Ready. (ASYNC)
21RL/SQ-Signal Quality Detector/Remote loopback
22RIINRing Indicator. DCE (Modem) raises when incoming call detected used for auto answer applications.
23CH/CIOUTSignal Rate selector.
24DA-Auxiliary Clock (a.k.a. ACLK). Secondary Channel only.
25--Unassigned

NOTE: Leave all pins not specified above unconnected.

view - looking into male connector

(male and female connector diagrams)

RS232 on DB9 (EIA/TIA 574)

Signal functions are described in detail in our Signal/pin primer. The column marked Dir shows the signal direction with respect to the DTE.

Pin No.NameDirNotes/Description
1DCDINData Carrier Detect. Raised by DCE when modem synchronized.
2RDINReceive Data (a.k.a RxD, Rx). Arriving data from DCE.
3TDOUTTransmit Data (a.k.a TxD, Tx). Sending data from DTE.
4DTROUTData Terminal Ready. Raised by DTE when powered on. In auto-answer mode raised only when RI arrives from DCE.
5SGND-Ground
6DSRINData Set Ready. Raised by DCE to indicate ready.
7RTSOUTRequest To Send. Raised by DTE when it wishes to send. Expects CTS from DCE.
8CTSINClear To Send. Raised by DCE in response to RTS from DTE.
9RIINRing Indicator. Set when incoming ring detected - used for auto-answer application. DTE raised DTR to answer.

DB9 (EIA/TIA 574): View - looking into male connector

(male and female connector diagrams)

RS232 on RJ45 (RS-232D)

More properly EIA/TIA - 561. Use when connecting to or from a serial port with a 8 position Modular Jack (RJ45). If you are cross-connecting from a DB9 or a DB25 use the signal names to cross connect the appropriate pins. To illustrate the process the equivalent pins used for cross-connecting a DB9 connector signals are shown (see DB9 pin-out above).

Signal/pin primer

RJ45 Pin No.NameDB9 Cross ConnectNotes/Description
1DSR/RI6,9Data set Ready/ring indicator
2DCD1Data Carrier Detect
3DTR4Data Terminal Ready
4SGND5Signal Ground
5RD2Receive Data
6TD3Transmit Data
7CTS8Clear to Send
8RTS7Request to Send

Note: Pin 1 is a multi-function pin sharing DSR (Data Set Ready) and RI (Ring Indicator). This means it is impossible to differentiate between a incoming ring signal (RI) and when the modem has finally connected and synched up (DSR). With local (null modem connections) or if the modem is run in auto-answer mode this is not normally a problem. If used with a modem and the DTE (the computer end) wants to control the connection the problem is more real. DSR would normally indicate the 'connected and synched-up' state following DTR from the DTE whereas RI simply indicates a ring voltage is present on the line and would normally be the trigger for the DTE to raise DTR if it wants to accept the call. DCD will indicate that a carrier has been received but does not indicate synchronization of both ends. In most cases however CTS (Clear To Send) in response to RTS (Request To Send) will not normally be returned until an end-to-end connection is available (equivalent to the DSR state).

RJ45 Male Connector Pin Numbering

RS232 DB25 NULL Modem Pinout

Use when connecting two systems (e.g. PCs) via their DB25 interfaces without a modem (i.e. back-to-back). See the full signal names in the DB25 sections.

If this pinout does not work for you then you could try our Signal/pin primer because you may need to SPOOF connections.

Note: This DB25 is NOT the same as the DB25 Parallel port on a PC which is defined here.

DB25SignalDB25Signal
3RD2TD
2TD3RD
20DTR6,8DSR, DCD
6,8DSR, DCD20DTR
4RTS5CTS
5CTS4RTS
7SGND7SGND
22RI22RI

DB25: View - looking into male connector

(male and female connector diagrams)

NOTE:

  1. Leave all pins not specified above unconnected.

  2. We have received email suggesting that the above pinout looks like DTR from one side is driving into DSR/DCD on the other side - not normally a healthy situation. The emails miss the point that since this is a NULL modem connection both ends are DTEs. The two peer DTE's treat DSR/DCD signals as RX (INPUT) only. The INPUT DSR/DCD on one side is created by cross connecting the OUTPUT DTR signal for the other peer.

RS232 DB9 NULL Modem Pinout

Use when connecting two systems, for example two PCs, via their DB9 interfaces without a modem. Typically called a back-to-back or NULL modem connection. See the full signal names in the DB9 section.

If this pinout does not work for you then you could try our Signal/pin primer because you may need to SPOOF connections.

PC1 PeerPC2 Peer
DB9 PinSignalDB9 PinSignal
2RD3TD
3TD2RD
4DTR6,1DSR, DCD
6,1DSR, DCD4DTR
7RTS8CTS
8CTS7RTS
5SGND5SGND
9RI9RI

DB9 TIA/EIA 574: View - looking into male connector

(male and female connector diagrams)

NOTE:

  1. We have received email suggesting that the above pinout looks like DTR from one side is driving into DSR/DCD on the other side - not normally a healthy situation. The emails miss the point that since this is a NULL modem connection both ends are DTEs. The two peer DTE's treat DSR/DCD signals as RX (INPUT) only. The INPUT DSR/DCD on one side is created by cross connecting the OUTPUT DTR signal for the other peer.

RS232 DB9 and DB25 Loopback Pinout

Loopback is a method of testing the RS232 connector and interface circuitry to ensure it is functioning correctly, that is, in layman's jargon - it ain't broke! If communication fails to occur between two machines the question that immediately arises is - which end is broken? In the worst case both ends could even be broken in which case ritual suicide may be the best solution. Loopback works by testing each end of the connection independently. Data is sent and received on the same RS232 connector - which may be either DB9 or DB25. The test normally consists of using some program to transmit data. The program then checks to ensure exactly the same data was received. Loopback testing gives you a binary result - it works, in which case the end under test is good, or it does not, in which case the end under test is broken. Pinouts are shown for both DB9 and DB25. The loopback is normally constructed in the DB shell or using a diagnostic light-box.

DB9 Loopback

DB9SignalLoopback toSignal
2RD3TD
3TD2RD
4DTR6,1,9DSR, DCD, RI
7RTS8CTS
5SGND5SGND

(DB9 male and female connector diagrams)

NOTE:

  1. We show 4 (DTR) being looped to 6 (DSR), 1 (DCD) and 9 (RI). RI (9) is included because we understand that certain test programs use this to ensure a more complete test of the interface signal set.

DB25 Loopack

DB25SignalLoopback toSignal
3RD2TD
2TD3RD
4RTS5CTS
5CTS4RTS
7SGND7SGND
15DB17DD
20DTR6,8,22DSR, DCD, RI
23CH/CI23CH/CI

(male and female connector diagrams)

NOTE:

  1. For the sake of simplicity this loopback will only work for the primary channel. Full DB25 interfaces allow a secondary channel. If a complete interface loopback is required you will need to add pins 12, 13, 14, 16, 19, 24.

  2. By looping the primary channel clocks (15 and 17) both synchronous and asynchronous capabilities can be tested. If only asynchronous tests are being performed omit this, and the pin 23 loopback

  3. We show 20 (DTR) being looped to 6 (DSR), 8 (DCD) and 22 (RI). RI (22) is included because we understand that certain test programs use this to ensure a more complete test of the interface signal set.

RS232 DB9 NULL Modem Pinout on CAT5/CAT5(e)/CAT6

This is in response to a number of recent emails asking how to wire both ends of a DB9 connection using cat5, cat5(e) or cat6 cable. This must not be confused with DB9 to RJ45 (RS232D). We have shown a null modem (back-to-back PCs) only configuration. And if you want to use cat5, cat5(e) or cat 6 with a real modem (a DB25 connector)? Our advice - don't.

Warning:. There is, as far as we know, no standard to cover the use of cat5, cat5(e) or cat 6 (8 conductor) wiring when used with two DB9 connectors. Any such wiring scheme is therefore non-standard - that includes the wiring scheme below. Specifically this means that both ends of the cable must be wired in the same way and that no assumptions can be made about how the other end is wired. You will have to manually inspect both ends of the connection. Damage can result from mis-matched wiring.

A DB9 clearly has 9 connections and a cat5, cat5(e) and cat 6 cable has 8 conductors. RS232D has chosen to use Pin 1 as a multi-function pin (DSR/RI) to provide maximum flexibility with modems - in particular it allows for DCD which is a meaningful signal from a modem but not, we suggest, from a peer PC. We have chosen to use a minor variation on the normal DB9 Null modem pinout above - specifically we have allowed for RI which could be used from a peer PC to commence a transmission sequence. The colors used are unimportant but the suggested configuration is one way to provide the shortest use of the adjacent (twisted) pairs.

If this pinout does not work for you then you could try our Signal/pin primer because you may need to SPOOF connections.

PC1 PeerPC2 Peer
DB9Signalcat5(e)
Color
DB9Signalcat5(e)
Color
2RDBrown3TDBlue
3TDBlue2RDBrown
4DTRGreen6,1DSR, DCDBrown-white
6,1DSR, DCDBrown-white4DTRGreen
7RTSBlue-white8CTSGreen-white
8CTSGreen-white7RTSBlue-white
5SGNDOrange5SGNDOrange
9RIOrange-white9RIOrange-white

DB9: View - looking into male connector

(male and female connector diagrams)

NOTE:

  1. We have received email suggesting that the above pinout looks like DTR from one side is driving into DSR/DCD on the other side - not normally a healthy situation. The emails miss the point that since this is a NULL modem connection both ends are DTEs. The two peer DTE's treat DSR/DCD signals as RX (INPUT) only. The INPUT DSR/DCD on one side is created by cross connecting the OUTPUT DTR signal for the other peer.

RS232 DB9 to DB25 Pinout

Use when connecting a DB9 (e.g. a PC) to a DB25 (e.g. a modem) interface. See the full signal names in the DB9 and DB25 section.

Signal/pin primer

DB9SignalDB25
1DCD8
2RD3
3TD2
4DTR20
5SGND7
6DSR6
7RTS4
8CTS5
9RI22

View - looking into male connector

(male and female connector diagrams)

View - looking into male connector

(male and female connector diagrams)

NOTE: Leave all pins not specified above unconnected.

RS232 DB9 to DB25 NULL Modem Pinout

Use when connecting two systems (e.g. PCs) when one has a DB9 interface and the other a DB25 interface without a modem. Typically called a back-to-back or NULL modem connection. See the full signal names in the DB9 and DB25 sections.

Signal/pin primer

DB9SignalDB25Signal
2RD2TD
3TD3RD
4DTR6,8DSR, DCD
6,1DSR, DCD20DTR
7RTS5CTS
8CTS4RTS
5SGND7SGND
9RI22RI

DB9: View - looking into male connector

(male and female connector diagrams)

View - looking into male connector

(male and female connector diagrams)

Note: Leave all pins not specified above unconnected.

RS-422, RS423 and RS-485 (TIA/RS-530-A using DB25)

RS 530-A defines the pinout when using either balanced RS-422 (and RS-485) or unbalanced RS-423 using a DB25 connector. The A (+) and B (-) below refer to each signal pair used in balanced serial interfaces (A+ is non-inverting, B- is inverting). When used with RS-423 (unbalanced) the B (-) are tied to a common ground. Signals marked U under Bal/Ubal are not balanced since they typically change very infrequently (for example once per session) and therefore do not affect TX/RX performance sensitivity - hence speed. BEWARE: RS-530 (without the A suffix) is an earlier standard and is wired differently (in particular both DTE Ready/DTR and DCE Ready/DSR used balanced communications - two pins). This is the RS-530-A pinout spec in which DTE Ready/DTR, DCE Ready/DSR are unbalanced and RI is introduced on Pin 22. The pinout supports both synchronous (V.35/v.10/V.11) which require clocks and aynchronous systems (RS-422/RS-485) which do not require clocks. The column marked 422/485 indicates the signals required for these interfaces - all others are N.C. (Not connected). RS422/485 on a DB9 is separately defined.

RS-422 vs RS-485: Many of us get confused over the difference between RS-422 (multi-drop) and RS-485 (multi-point). RS-422 allows only one master (or transmitter) all others are only receivers.

Notes:

  1. MIL-STD-188-114B reportedly does interwork with RS-422/485.

Pin No.RS Signal NameBal/Ubal422/485Notes
1ShieldYCable Shield, connected at DTE only.
2Transmit Data (A+)Ya.k.a TxD
3Received Data (A+)Ya.k.a. RxD
4RTS (A+)YRequest To Send
5CTS (A+)YClear To Send
6DCE Ready (modem/CSU)UYa.k.a DSR
7Signal GroundY-
8Data Carrier Detect (A+)Ya.k.a DCD, CD or RLSD
9Receiver Signal Element Timing (B-)RX Clock
10Data Carrier Detect (B-)-Ya.k.a DCD, CD or RLSD
11Ext. Transmit Clock (B-)--
12Transmit Signal Element Timing (B-)TX CLOCK
13CTS (B-)YClear to Send
14Transmit Data (B-)Ya.k.a TxD
15Transmit Signal element Timing (A+)TX CLOCK
16Received Data (B-)Ya.k.a RxD
17Receiver Signal Element Timing (A+)RX CLOCK
18Local LoopbackU
19RTS (B-)YRequest to Send
20DTE ReadyUYa.k.a DTR
21Remote LoopbackU-
22Ring IndicatorYRI
23Signal GroundY-
24Ext TX Clock (A+)-
25TMUTest Mode

RS-422 and RS-485 (DB9)

There is no official standard for using RS-422 or RS-485 on a DB9. The following pinout is widely used by many manufacturers but you are advised to verify with the manufacturer's specifications before proceeding. The following pinout provides no features for signaling end-to-end equipment readiness (for example DTE Ready/DTR and DCE Ready/DSR - see RS422/485 on DB25). Software drivers must use the CTS/RTS signals to indicate the presence and readiness of the peer.

Notes:

  1. The A (+) and B (-) below refer to each signal pair used in balanced serial interfaces (A+ is non-inverting, B- is inverting).

DB9 PinSignalNotes
1Ground
2CTS (A+)Clear to Send
3RTS (A+)Request to Send
4Receive Data (A+)RxD
5Receive Data (B-)RxD
6CTS (B-)Clear To Send
7RTS (B-)Request to Send
8Transmit Data (A+)TxD
9Transmit Data (B-)TxD

V.35 on DB25 (RS-530-A)

The original V.35 specification defined use of balanced signals over a huge 35 pin connector. V.35 has been obsolete for years (replaced with V.10) though the term is still frequently used. Most modern systems that call themselves V.35 use a DB25 connector which has more modest dimensions and uses the RS-530-A pinout scheme and maps the V.35 signal names to the RS-530-A names for convenience. The A (+) and B (-) below refer to each signal pair used in balanced serial interfaces (A+ is non-inverting, B- is inverting). Signals marked U under Bal/Ubal are not balanced since they typically change very infrequently (for example once per session) and therefore do not affect TX/RX performance sensitivity - hence speed. BEWARE: RS-530 (without the A suffix) is an earlier standard and is wired differently (in particular both DTE Ready/DTR and DCE Ready/DSR used balanced communications - two pins). This is the RS-530-A pinout spec in which DTE Ready/DTR, DCE Ready/DSR are unbalanced and RI is introduced on Pin 22. The signal names used in the pinout below refer to the standard (original) V.35 spec.

Signal/pin primer

Pin No.V.35 NameBal/UbalNotes/RS Signal Name
1ShieldCable Shield, connected at DTE only.
2BATransmit Data (A+) (a.k.a TxD)
3BBReceived Data (A+) (a.k.a. RxD)
4CA/CJRTS (A+) Request To Send
5CBCTS (A+) Clear To Send
6CCUData Communications Equipment Ready (modem/CSU) (a.k.a DSR)
7ABSignal Ground
8CFData Carrier Detect (A+) (a.k.a DCD, CD or RLSD)
9DDReceiver Signal Element Timing (B-) RX Clock
10CF-Data Carrier Detect (B-) (a.k.a DCD, CD or RLSD)
11DA-Ext. Transmit Clock (B-)
12DBTransmit Signal Element Timing (B-) TX CLOCK
13CBCTS (B-) Clear to Send
14BATransmit Data (TD) (B-) (a.k.a TxD)
15DBTransmit Signal element Timing (A+) TX CLOCK
16BBReceived Data (B-) (a.k.a RxD)
17DDReceiver Signal Element Timing (A+) RX CLOCK
18LLULocal Loopback
19CA/CJRTS (B-) Request to Send
20CDUDTE Ready (a.k.a DTR)
21RLURemote Loopback
22RI Ring Indicator
23ACSignal Ground
24DAExt TX Clock (A+)
25TMUTest Mode

NOTES:

  • Leave any pins not specified above unconnected.
  • In balanced mode signals with the same name are the paired set, for example, pins 2 and 14 are both named BA and form the Transmit Data pair. Each signal of the pair is either a high (A+) or low (B-)
  • When used with RS-485 in half-duplex, multi-dropped environments a simple three signal arrangements is frequently used - one pin is used as a GND and RX/TX is alternately switched onto a balanced pair of wires which can be either the BA (TX) or BB (RX) pair.

View - looking into male connector

(DB25 male and female connector diagrams)

DB - Designations for D-subminiature Connectors

This lists the designations for DB connectors (supplied by Rob Recny - Thanks). Any errors in this list are ours not Rob's.

  • A - 15-pin 2-row joystick connector.

  • B - 25-pin 2-row serial or parallel connector - also 44-pin high-density 3-row.

  • C - 37-pin connector - sometimes found on multi-port serial or data acquisition boards.

  • D - 50-pin connector - a little longer than C, but three rows using the same pins as the 2-row connectors.

  • E - 9-pin 2-row serial - also 3-row VGA.

So a DB9 is more properly a DE-9P. Isn't knowledge a wonderful thing!

The thread size on an RS232 receptacle (the jackscrew) is UNC 4-40.

T1/E1 Pinout (RJ-48C)

T1/E1 wiring may use either a RJ45, DB15 or BNC connectors. The pinout shown uses RJ45 connectors - its formal name is USOC RJ-48C and is defined in ANSI T1-403-1989. T1 is a North America (primarily) digital service providing 1.544 Mbps. E1 is a European/Rest of World standard providing digital service at 2.048 Mbps. CATegory 5(e) cabling is used to provide balanced pairs. The color coding for Cat 5(e) cabling may be 568A or 568B.

RJ45 PinSignalNotes
1RX1 (Ring - negative)
2RX2 (TIP - positive)
3FGND (RX GND)Ground/Shield
4TX1 (Ring - negative)
5TX2 (TIP - positive)
6FGND (TX GND)Ground/Shield
7NCUnused
8NCUnused

NOTES:

  1. NC = Not connected.
  2. There are a confusing number of pinouts for use with an RJ45/48C connector. Some specs show use of pins 7,8 for Grounds. Always consult any equipment specification if available.
  3. The telecom world loves its Tip and Ring designations. Tip is assumed to carry a positive voltage (and would carry the transmission signal), Ring a negative voltage (and would carry the inverted transmission signal)



Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or info-support at zytrax. You will have a warm inner glow for the rest of the day.

Tech Stuff

If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C standards compliant browser such as Firefox

RS232 connections, and wiring up serial ports

Pin 1Protective Ground

Custom Electronics

Do you need - Networked Serial
Electronics? Metering, Controllers,
Callpoints, Fire panels, access
control, lighting, robotics
--We design and build--
Call us now! (02)9925 0325

Pin 2Transmit Data
Pin 3Received Data
Pin 4Request To Send
Pin 5Clear To Send
Pin 6Data Set Ready
Pin 7Signal Ground
Pin 8Received Line Signal Detector
(Data Carrier Detect)
Pin 20Data Terminal Ready
Pin 22Ring Indicator

The connector on the PC has male pins, therefore the mating
cable needs to terminate in a DB25/F (Female pin) connector.


Pin 1Received Line Signal Detector
(Data Carrier Detect)
Pin 2Received Data
Pin 3Transmit Data
Pin 4Data Terminal Ready
Pin 5Signal Ground
Pin 6Data Set Ready
Pin 7Request To Send
Pin 8Clear To Send
Pin 9Ring Indicator

The connector on the PC has male pins, therefore the mating
cable needs to terminate in a DE9/F (Female pin) connector.
[Some people call this a DB9... DE9 is the real name, however]

Wiring up something nice and simple, for instance a plain old "dumb terminal", is just a matter of connecting Tx, Rx and Ground, right?

Usually Not. While the normal PC hardware might well run with just Tx, Rx and Ground connected, most driver software will wait forever for one of the handshaking lines to go to the correct level. Depending on the signal state it might sometimes work, other times it might not. The reliable solution is to loop back the handshake lines if they are not used. We specifically chose to use the Personal Computer (PC) as the frame of reference for the signals on this page. RS232 predates the PC, but even with EIA-574 and the later TIA-232-F the definitions still use DTE (Data terminal equipment - such as a PC or equivalent) and DCE (Data circuit-terminating equipment - such as a modem or 'dumb terminal' or any other device) as the frame of reference. We are trying to flatten the learning curve: On this page "PC" is used in place of the technical term "DTE".


Handshake looping a PC serial connector

When the lines are handshake looped, the RTS output from the PC immediately activates the CTS input - so the PC effectively controls its own handshaking... which leads in to what each of the pins on the RS232 connector (or EIA574 in the case of the DE9) actually does - we have a proper description of all the pins further down this page.



RS232 DE9 PC Loopback test plug Build it yourself using the photo to the right as a guide - or if you prefer we will do it for you:
 
$18 + shipping
The PC loopback plug is a useful diagnostic tool. The loopback plug connects
serial inputs to serial outputs so that the port may be tested. There is more
than one way to wire up a loopback plug - but this is the most common.


RS232 DB25 PC Loopback test plug

Connecting together two serial devices involves connecting the Rx of one device to the Tx of the other, and vice versa. The diagram below indicates how you would go about connecting two PC's together, without handshaking.


Connecting two PCs together using RS232, without handshaking

When Handshaking is required, generally RTS of one device connects to CTS of the other, and vice versa, and also DSR of one device connects to DTR of the other device, and vice versa. The particular requirements for different equipment may vary.


Connecting two PCs together using RS232, with handshaking

Using a Breakout box or LED box to work out cabling

If you have problem with RS232 cabling, your best "emergency" tool may be a breakout box (sometimes called an LED box). The normal units only come in the DB25 size, but with a couple of DB9 to DB25 adaptors, they can be used with DB9 cables as well. The units have an LED for each signal line in the cable, and the LED lights green or red dependent on the signal state. Our D9 Breakout box is a little more sophisticated - it also allows you to disconnect certain lines in the cable, and to loop signals to their opposite number - good for trying new cable wiring possibilities.

The first thing to remember, is that there is a good chance the two devices you are trying together will actually work if you can get the cable correct. If you have some other way to actually prove this - for instance by trying each of the devices on another system - do it.

Given a hypothetical example - for instance connecting a standard PC with a DE9M to an CNC industrial turret punch, also with a DE9M, the first thing I would try and do is get a cable that I think would work. In this instance, I would either purchase or build a null-modem cable (DB9F to DB9F) - actually, I would copy the last example, basically the cable used to connect two PCs together with handshaking.

Given the cable that I believe will work, connect the cable, LED box and two devices all together. Before powering on both devices, unplug just one of them. Power the devices on and make a note of which LEDs are lit. Then unplug the connected device and plug in the disconnected one, without rearranging the cabling otherwise. Again make a note of which LEDs are lit. If any single LED is lit by both of the devices, then there is an output conflict, and the cable wiring is incorrect. By this, I mean that one line in the cable has an output driving it from both ends - and this is not correct for RS232 - so that means that the cable wiring is not correct for the devices. Pay particular attention to Tx and Rx.

To continue with the example above, if I saw that two ends were driving the same lines, I would assume the null modem cable was not correct, and I would try a one-for-one (or "straight-thru" DE9F-DE9M cable) with a gender changer (DE9F-DE9F in this instance) instead.

If each end drives its own set of LEDs, connect the two ends together. In normal situations, you should see all the LEDs light up - but there are some devices which will not light up all the LEDs. Having said that, if one of the devices is a PC and any LED except RI (Ring indicator) is not lit up, the cable will probably not work.

Normally, other cabling problems will involve handshake lines. An LED box will be an invaluable guide, but there is no trivial test to determine the solution. An LED Box will also show the lines as they change state, although with the D25 models it is usually quite hard to see the serial communications themselves unless the comms are continuous, or at a low baud rate (9600 baud or lower is usually visible). Our D9 Model has superbright LEDs on the data lines, so seeing brief packets is not a problem.

If you have difficulty in obtaining gender changers, null-modem / straight-thru cables, D25/D9 converters (etc) email us, we carry everything you could need to test and debug serial comms, and we can quote by return. Our main business is designing industrial electronics - much of it serially controlled or networked.


Pin 1DCDData Carrier Detect This is one of two unpaired handshake lines. Its original function was mainly for modem connections - it specified when the modem was actively receiving carrier - the base modulation on which the data frequencies were superimposed - and thus was likely to be able to link to remote end. There was not much point in trying to send data until carrier was established.
Pin 2RxDReceived Data Serial data being sent by the connected equipment to the pc. (ie, this is The data the PC receives) Normally the signal is between -3V to -12V when no data is being sent, and pulses up to +3V...+12V to send the data
Pin 3TxDTransmit Data Serial data being sent by the PC. Signal is normally -5V and pulses to +5V to send the data
Pin 4DTRData Terminal ReadyPC End is ready. This signal normally goes active (+5V) at the start of communications - perhaps when appropriate software starts, or power up is complete - and it normally remains active for the whole "session". When it goes inactive, if forces the end of the communication session. Modems hang up when this signal goes inactive. The matching signal from the other end is DSR - this is active when the other equipment is also ready to operate.
Pin 5GNDSignal Ground Ground - both devices are connected by this ground signal. Attention must be paid to grounding of the two devices to ensure that the two ends do not have a significant voltage difference.
Pin 6DSRData Set Ready Acknowledgement to the PC that the other equipment is ready for operation. Goes active +3...+12V when ready. If unused, it is often tied to DTR, so when the computer indicates that it is ready for communications by asserting DTR, DSR is similarly asserted to encourage the PC to get things underway
Pin 7RTSRequest To Send PC Requests to send data. The PC sends this signal active (+5V) to tell the other device it wants to send data - and then the other end responds by sending CTS active (= +3...+12V "Yes, you are Clear to Send").
Some equipment uses the RTS signal differently, as a Ready to Receive signal. In this situation, the PC-end sends RTR active to say the PC is ready to receive, while the remote-end still sends CTS active to say the remote-end is ready to receive.
Pin 8CTSClear To Send Response signal input by PC: PC asks to send with RTS, then waits for the CTS response before beginning. Part way through a transmission, the other device may send CTS inactive this is interpreted as "stop sending for now".
Pin 9RI Ring Indicator This is the second of two unpaired handshake lines. Its original function was (also) mainly for modem connections - it goes active when the telephone is ringing. The signal is input to the PC and is normally -3V to -12V when idle, and +3 to +12V when the telephone is ringing. This signal is rarely used today.

RS232 defines voltages as a nominal +/-12V, current limited to about 12ma. However, most equipment will work with anything from +/-3V and up. Some equipment omits the negative, signals with +5V/0V ...and mostly works. Some drivers use reduced +/-5V voltages to save power, and these work with (our estimate) 99% of equipment.
The small USB to serial converters used with a PC usually output +/-5V levels - but may also output no voltage at all when the software driver for the serial port is not active. They receive any input +/-3V...+/-12V.


We left this unweildy description for last, because while it is good
to know what everything does, it is easier to just try a loopback first.

Using a 'T' plug and a PC to monitor comms

The gadget below is a quick half hour project that is really great for monitoring RS232 Comms using a PC. The circuit is really not that hard to build - the parts can be purchased from Tandy / Radioshack / Dicksmith / Jaycar / Maplin / Farnell - but if you want to buy it ready made off us, just use the button below.


How to monitor RS232 Comms between two devices
 
$46 + shipping

There are three sockets on the T-Spy gadget. Two of them are connected straight through - plug them in series with the devices you wish to monitor - and the third goes off to a seperate PC for monitoring the communications.

The monitoring PC "Sees" on its serial port both sides of the serial conversation - that is it receives what is sent by the target PC and also what is sent by target peripheral. This can be a positive advantage, because the serial conversation can be observed as it progresses between the two devices. Some serial protocols, however, talk "full duplex" meaning that one end can start transmitting while it is still receiving from its peer. This unit cannot monitor full duplex Comms - the comms will be corrupted, gobble-dee-gook will be seen where the two transmissions overlap. The two sides of the conversation are wire-AND'ed, so Space or 0 overrides Mark or 1. But in addition the two sources are asynchronous, so reconstruction of a simultaneous conversation is not realistic.

This device is surprisingly successful in operation, and works to successfully record RS232 protocols for many different installs - mostly because many supposedly full duplex installations still talk half duplex in any case, because that is the sensible way to write the software. All in all, Not bad for one diode and a resistor...

0 thoughts on “D9 To Db25 Pinout Assignments

Leave a Reply

Your email address will not be published. Required fields are marked *