Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
9/7/13
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. 4. 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. 5. 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. 6. 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. 7. 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 it 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 RS232 (DB9 and 25) receptacles is UNC 4-40. 8. 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. 9. 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 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. 10. 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!
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
2/17
9/7/13
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.
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
3/17
9/7/13
DB25: View looking into female connector DB9 Male and Female
9/7/13
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. Name
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 TD RD RTS C TS DSR SGND CD SDC D SC TS STD DB SRD DD LL SRTS DTR RL/SQ RI C H/C I DA -
Dir
-
Notes/Description
Protective/shielded ground
OUT Transmit Data (a.k.a TxD, Tx) (ASYNC ) IN Receive Data (a.k.a RxD, Rx) (ASYNC )
OUT Request To Send (ASYNC ) IN IN IN IN IN C lear To Send (ASYNC ) Data Set Ready (ASYNC ) Signal Ground C arrier Detect (a.k.a DC D). Reserved for data set testing. Reserved for data set testing. Unassigned Secondary C arrier Detect. Only needed if second channel being used. Secondary C lear to send. Only needed if second channel being used.
OUT Secondary Transmit Data. Only needed if second channel being used. OUT Transmit C lock (a.k.a TC LK, TxC LK). Synchronous use only. IN IN Secondary Receive Data. Only needed if second channel being used. Receive C lock (a.k.a. RC LK). Synchronous use only. Local Loopback
OUT Secondary Request to Send. Only needed if second channel being used. OUT Data Terminal Ready. (ASYNC ) IN Signal Quality Detector/Remote loopback Ring Indicator. DC E (Modem) raises when incoming call detected used for auto answer applications.
OUT Signal Rate selector. Auxiliary C lock (a.k.a. AC LK). Secondary C hannel only. Unassigned
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
5/17
9/7/13
view - looking into male connector (male and female connector diagrams)
OUT Transmit Data (a.k.a TxD, Tx). Sending data from DTE. OUT Data Terminal Ready. Raised by DTE when powered on. In auto-answer mode raised only when RI arrives from DC E. IN Ground Data Set Ready. Raised by DC E to indicate ready.
OUT Request To Send. Raised by DTE when it wishes to send. Expects C TS from DC E. IN IN C lear To Send. Raised by DC E in response to RTS from DTE. Ring 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)
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
6/17
9/7/13
1 2 3 4 5 6 7 8
6,9 1 4 5 2 3 8 7
Data set Ready/ring indicator Data Carrier Detect Data Terminal Ready Signal Ground Receive Data Transmit Data Clear to Send Request 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).
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
7/17
9/7/13
3 2 20 6,8 4 5 7 22
2 3 6,8 20 5 4 7 22
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.
9/7/13
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.
DB9 Signal DB9 Signal
2 3 4 6,1 7 8 5 9
3 2 6,1 4 8 7 5 9
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.
9/7/13
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 lightbox.
DB9 Loopback
DB9 Signal Loopback to Signal
2 3 4 7 5
3 2 6,1,9 8 5
(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
DB25 Signal Loopback to Signal
3 2 4 5 7 15 20 23
2 3 5 4 7 17 6,8,22 23
(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.
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm 10/17
9/7/13
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.
2 3 4 6,1 7 8 5 9
3 2 6,1 4 8 7 5
Orange-white 9
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
9/7/13
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.
1 2 3 4 5 6 7 8 9
8 3 2 20 7 6 4 5 22
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
12/17
9/7/13
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.
2 3 4 6,1 7 8 5
2 3 6,8 20 5 4 7
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
13/17
9/7/13
RI
22
RI
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.
9/7/13
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.
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
15/17
9/7/13
View - looking into male connector (DB25 male and female connector diagrams)
Notes
16/17
9/7/13
3 4 5 6 7 8
FGND (RX GND) TX1 (Ring - negative) TX2 (TIP - positive) FGND (TX GND) NC NC
Ground/Shield
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.
C opyright 1994 - 2013 ZyTrax, Inc. All rights reserved. Legal and Privacy site by zytrax web-master at zytrax Page modified: May 21 2013.
www.zytrax.com/tech/layer_1/cables/tech_rs232.htm
17/17