RS232 interface |
Tutorial
ARC Electronics ... Home Page
Most PC's come equipped with two RS232 ports designated as COM1 and COM2. The most prevalent use for these ports is a MOUSE or MODEM. The PC also has standard addresses for two additional RS232 ports (COM3 and COM4). This may require a second RS232 card or "COM" Card.
The standards for RS232 and similar interfaces usually restrict RS232 to 20kbps or less and line lengths of 50' or less. However, in practise, RS-232 is far more robust than the traditional specified limits would imply. Most 56/64kbps DSUs ISDN modems are supplied with both V.35 and RS-232 ports because RS-232 is adequate at speeds up to 200kbps.
RS232 is simple, universal, well understood and supported but RS-232 has some serious shortcomings as a data interface.
1. The RS232 interface presupposes a common ground between the DTE and DCE. This is a reasonable assumption when a short cable connects the DTE to the DCE, but with longer lines and connections between devices that may be on different electrical busses, this maynot be true.
2. The RS232 signal on a single cable is impossible to screen effectively for noise. By screening the entire cable we can reduce the influence of outside noise, but internally generated noise remains a problem. As the baud rate and line length increase, the effect of capacitance between the different lines introduces serious crosstalk (this especially ture on synchronous data - because of the clock lines) until a point is reached where the data itself is unreadable. Signal Crosstalk can be reduced by using low capacitance cable and shielding each pair
3. At higher frequencies a new problem comes to light. The high frequencie component of the data signal is lost as the cable gets longer resulting in a rounded, rather than square wave signal.
RS232 data is bi-polar.... +12 volts indicates an "ON or 1-STATE" while -12
volts indicates an "OFF" condition.... Modern computer equipment ignores the
negative level and accepts a zero voltage level as the "OFF" state. In fact, the
"ON" state may be achieved with lesser positive potential. This means circuits
powered by 5 VDC are capable of driving RS232 circuits directly, however, the overall
range that the RS232 signal may be transmitted/received may be dramatically reduced.
The output signal level usually swings between +12v and -12v. The"dead area" between +3v and -3v is designed to absorb line noise. In the various RS232-like definitions this dead area may vary. For instance, the definition for V.10 has a dead area from +0.3v to -0.3v. Many receivers designed for RS-232 are sensitive to differentials of 1v or less.
This can cause problems when using pin powered widgets - line drivers, converters, modems (data & fiber) etc.
The essential feature of RS232 is that the signals are carried as single voltages referred to a common earth on pin 7.
Data is transmitted and received on pins 2 and 3 respectively. Dataset ready (DSR) is an indication from the Dataset (i.e., the modem or DSU/CSU) that it is on. Similarly, DTR indicates to the Dataset that the DTE is on. Data Carrier Detect (DCD) indicates that a good carrier is being received rom the remote modem.
Pins 4 RTS (Request To Send - from the transmitting computer) and 5 CTS (Clear To Send - from the Dataset) are used to control. In most Asynchronous situations, RTS and CTS are constantly on throughout the communication session. However where the DTE is connected to a multipoint line, RTS is used to turn carrier on the modem on and off. On a multipoint line, it's imperative that only one station is transmitting at a time (because they share the return phone pair). When a station wants to transmit, it raises RTS. The modem turns on carrier, typically waits a few milliseconds for carrier to stabilize,and then raises CTS. The DTE transmits when it sees CTS up. When the station has finished its transmission, it drops RTS and the modem drops CTS and carrier together.
Clock signals (pins 15, 17) are only used for synchronous communications. The modem or DSU extracts the clock from the data stream and provides a steady clocksignal to the DTE. Note that the transmit and receive clock signals do not have to be the same, or even at the same baud rate.
Note: Transmit and receive leads (2 or 3) can be reversed
depending on the use of the equipment
- communications port or a data terminal port.
9 pin D-shell connector RS232
PIN SIGNAL DESCRIPTION
1 CD Carrier Detect 2 RXD Receive Data 3 TXD Transmit Data 4 DTR Data Terminal Ready 5 SG Signal Ground 6 DSR Data Set Ready 7 RTS Ready To Send 8 CTS Clear To Send 9 RI Ring Indicator
PC Com Port - RS232 pin out DB-9 pin
RS232
9 pin Null Modem Connection
1 ----> 7-8 jumpered 2 ----> 3 3 ----> 2 4 ----> 6 6 ----> 4 7-8 jumpered ----> 1
25 pin D-shell connector RS232
commonly used for Async. data
PIN SIGNAL DESCRIPTION 1 PGND Protective GrouND 2 TXD Transmit Data 3 RXD Receive Data 4 RTS Ready To Send 5 CTS Clear To Send 6 DSR Data Set Ready 7 SG Signal Ground 8 CD Carrier Detect 20 DTR Data Terminal Ready 22 RI Ring Indicator
25 pin Null Modem Connection
2 ----> 3 3 ----> 2 4-5 jumpered ----> 8 6 ----> 20 8 ----> jumpered 4-5 20 ----> 6
all 25 pins (Sync or Async data)
------------------------------- PIN Function ------------------------------- 1 FRAME GND 2 TD 3 RD 4 RTS 5 CTS 6 DSR 7 SIGNAL GND 8 DCD 9 test voltage + 10 test voltage - 11 select transmit freq. 12 2.DCD 13 2.CTS 14 2.TD 15 transmitter clock 16 2.RD 17 receiver clock 18 - 19 2.RTS 20 DTR 21 signal quality detect 22 RI 23 data rate select 24 transmitter clock 25 BUSY
RS232 pin out
RS232 Specs.
RS-423 Specs.
In selecting RS232 converters you must be mindful of a few points. In the communications world there are Date Terminal Equipment "DTE" and Data Communication Equipment "DCE" interfaces. DTE and DTE interfaces can also have several different types of mechanical connections, (not to forget the sex of the connector). Some of these converters have switches that will allow the electrical interface to be ether way.
1. RJ-11/12, 45/48 (they look phone connectors)
2. DB-9 / 9 pin connector
(common on lower speed PC interfaces - below T1 speeds)
3. DB-25 / 25 pin connector
RS-232 to Mil 188