RS232, RS422 and V.35 Interfaces
RS-232 has been around as
a standard for decades as an electrical interface between Data Terminal
Equipment (DTE) and Data Circuit-Terminating Equipment (DCE) such
as modems or DSUs. It appears under different incarnations such as RS-232C,
RS-232D, V.24, V.28 or V.10 but essentially all these interfaces are interoperable.
RS-232 is used for asynchronous data transfer as well as
synchronous links such as SDLC, HDLC,
Frame Relay and X.25
There is a standardized pinout for RS-232 on a DB25 connector, as shown below.
The essential feature of RS-232
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. Data set 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
carrier for the transmit data is on.
Pins 4 and 5 carry the RTS and CTS signals. In most 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 is imperative that only one station is transmitting at a time. When a station wants
to transmit, it raises RTS. The modem turns on carrier, typically waits a few milliseconds
for carrier to stabilize, and 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. This is explained further in our tutorial on the SDLC protocol, which uses
multipoint lines extensively.
The clock signals are only used for synchronous communications. The modem or DSU
extracts the clock from the data stream and provides a steady clock signal 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.
The truth table for RS232 is:
Signal > +3v = 0
Signal < -3v = 1
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 RS-232-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 1 volt or less.
RS-232 is simple, universal, well understood
and supported everywhere. However, it has some serious shortcomings as an electrical interface.
Firstly, the interface presupposes a common ground between the DTE and DCE. This is a
reasonable assumption where a short cable connects a DTE and DCE in the same room, but with
longer lines and connections between devices that may be on different electrical busses, this
may not be true. We have seen some spectacular electrical events caused by "uncommon grounds".
Secondly, a signal on a single line is impossible to screen effectively for noise. By
screening the entire cable one 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 cables introduces serious crosstalk until a point is reached where
the data itself is unreadable.
Crosstalk can be reduced by using low capacitance cable. Also, as it is the higher
frequencies that are the problem, control of slew rate in the signal (i.e., making the
signal more rounded, rather than square) also decreases the crosstalk. The original
specifications for RS-232 had no specification for maximum slew rate.
The standards for RS-232 and similar
interfaces usually restrict RS-232 to 20kbps or less and line lengths of 15m (50 ft) or
less. These restrictions are mostly throwbacks to the days when 20kbps was considered a
very high line speed, and cables were thick, with high capacitance.
However, in practice, RS-232 is far more robust than the traditional specified
limits of 20kbps over a 15m line would imply. Most 56kbps DSUs are supplied with both
V.35 and RS-232 ports because RS-232 is perfectly adequate at speeds up to 200kbps.
You may remember the "zero slot LANs" that were popular a few years ago, using RS-232
ports on PCs running at 5kbps.
Interestingly enough, most RS-232 ports on mainframes and midrange computers are
capable of far higher speeds than their rated 19.2kbps. Usually these "low speed"
ports will run error free at 56kbps and above.
The 15m limitation for cable length can be stretched to about 30m for ordinary cable,
if well screened and grounded, and about 100m if the cable is low capacitance as well.
RS-422, RS-485, V.11 and other balanced interfaces
The limitations of RS-232 are largely eliminated by the balanced line interface.
A pair of wires is used to
carry each signal. The data is encoded and decoded as a differential voltage between the two
lines. A typical truth table for a balanced interface is as follows:
VA-VB < -0.2v =0
VA-VB > +0.2v=1
As a differential voltage, in principle
the interface is unaffected by differences in ground voltage between sender and receiver.
Furthermore, if lines A and B are
close together, they will be affected almost identically by external electromagnetic
noise. If the lines are also twisted together, then neither line is permanently closer
to a noise source than the other. Hence the well known "twisted pair" is
extremely effective in eliminating noise from the signal.
Balanced systems are used by LAN
topologies like Ethernet and Token Ring. They can support line speeds over 10Mbps
and work reliably at distances of several kilometers.
There are several standards
that incorporate balanced line signals into DB connectors. These include RS-449 (DB37),
X.21 (DB15) and RS530 (DB25). The threshold voltages in the truth table are not
identical for these standards, but the standards are usually interoperable.
As line speeds and lengths go up,
the problem of signal reflections becomes important. Lines must be properly terminated
by a resistor that makes the cable look electrically like it is infinitely long
(an infinitely long line, of course, can have no reflected signals from the far end).
These terminating resistor values depend on the geometry of the cable itself. So you will
see cable designated as 75 Ohm cable or 50 ohm cable, etc. What this means is that by
installing a 50 ohm resistor, say, between the signal pair, this particular type of
cable will have the electrical characteristics of an infinitely long cable. Note that
the designation "50 ohm cable" has nothing to do with the electrical impedance of the
physical cable itself.
In theory, extraneous noise
input equally on each line of a pair has no effect. In practice, however, the characteristics
of the receivers are such that sufficiently high noise levels cause one side of the receiver
to saturate, leading to data errors. Resistor networks are frequently included that provide
low resistance paths to earth to dissipate noise.
V.35 Interface.
The V.35 interface was originally specified by CCITT as an interface
for 48kbps line transmissions. It has been adopted for all line speeds
above 20kbps, and seems to have acquired a life of its own. It was discontinued
by CCITT in 1988, and replaced by recommendations V.10 and V.11.
V.35 is a mixture of balanced (like RS422) and common earth (like RS232)
signal interfaces. The control lines including DTR, DSR. DCD, RTS and
CTS are single wire common earth interfaces, functionally compatible
with RS-232 level signals. The data and clock signals are balanced,
RS-422-like signals.
The control signals in V.35 are common earth single wire interfaces
because these signal levels are mostly constant or vary at low frequencies.
The high frequency data and clock signals are carried by balanced lines.
Thus single wires are used for the low frequencies for which they are
adequate, while balanced pairs are used for the high frequency data
and clock signals.
The V.35 plug is standard. It is a black plastic plug about 20mm by
70mm, often with gold plated contacts and built-in hold down and mating
screws. The V.35 plug is roughly 30 times the price of a DB25, making
everything to do with V.35 somewhat expensive.
If your DSU supports RS-232
as well as V.35 you are always better off financially by using the RS-232 option.
An additional complication with V.35 is that the V.35 plug is too large to fit on
many add-in cards, such as those used by PCs. Thus there is very often a non standard
cable used to connect a V.35 system, terminating in a DB25 at one end and a V.35 plug
at the other. It is very easy to use the wrong cable, and quite difficult to debug if you do.
Debugging any balanced signal is
quite tricky. Identification of the "A" and "B" halves of a signal pair is difficult. It
is very easy to switch the polarity of the signals on a signal pair. Under certain
circumstances, such an interface will appear to be working correctly, except for odd line
errors at certain times.
Standard pinouts of
the cables used for our products are available here.
If you need further information, please e-mail us.
Information in this document is provided by Sangoma
Technologies.
|