You are on page 1of 8

Serial Communication - RS-232, RS-422 and RS-485

RS-232
EIA-232 uses a single ended, bipolar voltage signal. Voltages typically swing from -12V to +12V with respect to
signal ground. Suitable for low noise environments and distances below 30.5 meters (100 feet), RS-232 is
commonly used for the desktop modem and mouse. An increase in modem speeds has spurred an effort to
increase RS-232 data rates by chip vendors. Transceivers capable of 460k baud and higher are now available,
although the actual throughput gains of running higher data rates than 115.2k baud on interrupt based systems is
questionable at best.

RS-422
RS-422 is suited to longer distance communications, up to 1,200 meters (4,000 feet) without repeaters. Using a
balanced differential pair results in higher noise immunity than EIA-232. The differential voltage provides a valid
signal down to 200 mV. Two wires are required for each signal in addition to a signal ground conductor. RS-422 is
most commonly used for point-to-point communications, although up to 10 receivers may be connected to a single
transmitter.

RS-485
RS-485 is also suited to longer distance communications, up to 1,200 meters (4,000 feet) without repeaters. Again,
a balanced differential pair is used for higher noise immunity than EIA-232. Voltage levels are identical to RS-422.
In addition, RS-485 offers a multidrop capability; up to 32 nodes can be connected. The multidrop feature also
allows "two-wire" (in addition to signal ground) half-duplex data connection to be made.

Polarities for Differential Pair Signals


Some manufacturers of RS-422/485 equipment label the data lines on their devices with "+" or "-", Signal
and Inverted Signal, or an "A" and "B" that are opposite to other converters or devices in the network. This
can add confusion when making connections or troubleshooting a network with devices from different
manufacturers. This application note addresses some of these differences, show how they've come about,
and try to relate them to each other so that the system designer can interconnect devices from different
manufacturers.

What the Standards Say:


The RS-422 and RS-485 Standards define the two differential signal lines as the "A" and "B" line. The
signal state (0 or 1) is defined as the difference in voltage between the two lines. At any receiver, a "1",
(Idle, Mark, or Stop bit), state is defined when the voltage on the "B" line is greater than the voltage on the
"A" line by at least 200 mV. A "0" (Space or Start bit), state is defined when the voltage on the "A" line is
greater than the voltage on the "B" line by at least 200mV. Shown in the equations below:
Paul T. Rawlings

Page 1

11/12/2014

Va - Vb < -0.2V = "1"


Va - Vb > 0.2V = "0"
Where Va and Vb are the voltages on the "A" and "B" lines respectively.

What Really Matters:


Regardless of the naming scheme used, the main consideration in any RS-422/485 system is that the
inversions remain constant throughout the system. If we relate the above states to standard TTL logic,
when the "A" line is greater than the "B" line, this would equal a 0 Volt TTL level. Conversely, when the "B"
line is greater than the "A" line, this would equal a 5 Volt TTL level. Figure 1 shows a typical asynchronous
data byte and it's corresponding signal levels in TTL, RS-232, and RS-422/485.

Figure 1: Signals

Paul T. Rawlings

Page 2

11/12/2014

The Industry Convention:


"A" and "B" are opposite of what is shown in the standard. This has mainly arisen because manufacturers
of RS-422 and RS-485 interface IC's have always used the convention of labeling the inverted pin of a
differential transceiver as "B" and the non-inverting pin as "A".
Even differential transceivers that pre-date or are not specifically designed for RS-422 or RS-485 use this
naming scheme. Unfortunately, the "A" and "B" pin labeled on the IC data sheet does not necessarily have
to correspond to the "A" and "B" in the RS-422/485 standard. It depends on the logic on the TTL side of the
device. Many equipment manufacturers use the IC data sheet labeling and transfer the signal names to the
names for their interfaces.
The signals are labeled "+" and "-"
We don't know where this scheme originated, but it may have started with an attempt to clear up the
ambiguities of the "A" and "B." "+" and "-" is certainly more descriptive than "A" and "B" as to the
relationship between the signals. In almost all cases that we've seen, the "+" line will correspond to the RS422/485 "B" line and the "-" will correspond to the "A" line.
The signals are labeled "Signal" and "Signal*" or "Inverted Signal"
In this case the signal names used definitely correspond to the inverting and non-inverting pins on the
transceiver IC. The "Signal line will almost always correspond to the "B" line of the standard, and the
"Signal*" or "Inverted Signal" will correspond to the "A" line in the standard.

What if You Are Unsure?


Reversing the two lines in the differential signal is by far the most common initial error when connecting two
pieces of RS-422 or RS-485 equipment. The good news is that it won't cause any damage to your
equipment to try it the wrong way. If you try connecting it one way and are seeing garbled data, reverse the
leads and try again.
If this doesn't instill a level of confidence you are comfortable with, or you have tried both combinations with
negative results, you can usually use a DC voltmeter to determine which line is which.
1. Measure the voltage across the two lines at the receiver without the driver connected. On an RS485 device, the driver and receiver are on the same pair.
2. Note to which signal line the positive lead of the voltmeter is connected.
3. Is the reading positive or negative?
4. If the reading is positive, the signal line going to the positive lead of the voltmeter corresponds to
the "B" line of the RS-422/485 standards.
5. If the reading is negative, the signal line going to the positive lead of the voltmeter corresponds to
the "A" line of the RS-422/485 standards.

Notes:
B&B Electronics Converters
B&B tries to include the RS-422/485 specifications' naming scheme. Because of its common use, most of our data
sheets and product labels include the "+" and "-" naming scheme along with the "A" and "B".
B&B Electronics labels the data lines on RS-422 and RS-485 with an "A", for negative or "B" for positive, to
indicate the positive and negative relationship between the two data lines. It is important to label the data lines
because this positive and negative relationship between the lines must be maintained when connecting one device
to another.

Full Duplex Vs Half Duplex


Full-duplex (simultaneous two-way communication) requires two pairs so there is no 2-wire full duplex. Half duplex
(communication only one direction at a time, also called simplex) can be implemented with one pair.
Paul T. Rawlings

Page 3

11/12/2014

Cabling
The RS-422 specification recommends 24AWG twisted pair cable with a shunt capacitance of 16 pF per foot and
100-ohm characteristic impedance. While the RS-485 specification does not specify cabling, these
recommendations should be used for RS-485 systems as well. Shielding is recommended but not required by the
specification.

Ground Wire
Theres no such thing as 2-wire RS-485. Some people describe their RS-485 system as 2-wire but, RS-485
requires a differential pair and a signal return line. It may look like it works without the ground, but your system will
not be reliable without a dedicated signal ground connection.

Connections

Figure 2: 4-Wire RS-422 Connections

Figure 3: 2-Wire RS-485 Connections

Paul T. Rawlings

Page 4

11/12/2014

Figure 4- 2-Wire RS-485 Connections (Devices with Switch to Select 2 or 4 Wire)

Note: Consult Manufacturer's Data Sheet

Figure 5- 4-Wire RS-485 Connections

RS-232
Three are two types of RS-232 ports, DTE and DCE. The signal names and pin numbers are the same, but signal
flow is opposite! The pin labeled Tx can be input, and Rx the output.
The two port types are complementary, the Output signals on a DTE port are Inputs to a DCE port, and Output
signals on a DCE port are Inputs to a DTE port. The signal names match each other and connect pin for pin. Signal
flow is in the direction of the arrows.

Figure 6- Modem Cable - DB9 to DB9

How to Identify DTE or DCE Type Connections

Paul T. Rawlings

Page 5

11/12/2014

What devices have DTE type RS-232 ports? A DTE device is "Data Terminal Equipment"; this includes Computers,
Serial Printers, PLC's, Video Cameras, Video Recorders, Video Editors, and most devices, which are not used to
extend communications. Think COMPUTER for DTE.
What devices have DCE type RS-232 ports? A DCE device is "Data Communications Equipment", this includes
devices intended to plug directly into a DTE port, PDA cables, Modems and devices that extend communications
like a modem, such as RS-422, RS-485, or Fiber Optic converters or Radio Modems. Think MODEM for DCE.

Are the Devices Wired As DTE or DCE? - How to Check


Rule of Thumb - If the device plugs into the computer serial port and works normally, the device is wired as DCE
(or the connection cable is a crossover type that makes it work as a DCE). If the device connects to the computer
port using a "null modem" crossover cable, it is wired as DTE.

Figure 7- Modem to Modem- Crossover Cable DB9 to DB9


DB25 Vs DB9 Connector Pinout Differences
The RX and TX pinouts are swapped on the DB25 (pin 2 = TX, pin 3 = RX ) vs the DB9 (pin 2 = RX, pin 3 = TX ).
The signal ground on the DB25 is pin 7 and ground on the DB9 is pin 5.

Paul T. Rawlings

Page 6

11/12/2014

EIA Standards

Paul T. Rawlings

Page 7

11/12/2014

RS-232 Signals
Transmitted Data (TxD) - Data sent from DTE to DCE.
Received Data (RxD) - Data sent from DCE to DTE.
Request To Send (RTS) - Asserted (set to 0) by DTE to prepare DCE to receive data. This may require
action on the part of the DCE, e.g. transmitting a carrier or reversing the direction.
Clear To Send (CTS) - Asserted by DCE to acknowledge RTS and allow DTE to transmit.
Data Terminal Ready (DTR) - Asserted by DTE to indicate that it is ready to be connected. If the DCE is a
modem, this may "wake up" the modem, bringing it out of a power saving mode. This behavior is seen quite
often in modern PSTN and GSM modems. When this signal is de-asserted, the modem may return to its
standby mode, immediately hanging up any calls in progress.
Data Set Ready (DSR) - Asserted by DCE to indicate an active connection. If DCE is not a modem (e.g. a
null modem cable or other equipment), this signal should be permanently asserted (set to 0), possibly by a
jumper to another signal.
Data Carrier Detect (DCD) - Asserted by DCE when a connection has been established with remote
equipment.
Ring Indicator (RI) - Asserted by DCE when it detects a ring signal from the telephone line.
NOTE: The standard defines RTS/CTS as the signaling protocol for flow control for data transmitted from
DTE to DCE. The standard has no provision for flow control in the other direction. In practice, most
hardware seems to have assigned the RTS signal for this function.

Paul T. Rawlings

Page 8

11/12/2014

You might also like