The RS- 485 Serial Port

10.1 Comparison Between RS-232, 422 and 485

RS 485 is used for multipoint communications: more devices may be connected to a single signal cable - similar to e.g. ETHERNET networks, which use coaxial cable. Most RS 485 systems use Master/Slave architecture, where each slave unit has its unique address and responds only to packets addressed to this unit. These packets are generated by Master (e.g. PC), which periodically polls all connected slave units.

This article will mainly cover the Master/Slave architecture because it is sufficient for 95% of applications. In special cases (security systems, ...), an improved version of multiprocessor communication is used. This system uses only a single line for bi-directional communication; however, there is no Master. All units announce a packet transmission of a specified length, and at the same time listen whether the data has been successfully transmitted. If it's not the case, they stop communicating and listen for what has happened. At this time, urgent packets can be transmitted over the line. This system is ideal for devices that need to immediately transfer some very important and up-to-date data, without waiting for Master to give them a chance to do so. On the other side, useful data transfer is less effective (about 30% less effective than the first system).

In Master/Slave architecture, slave never starts the communication. It is critical for Master to send correct addresses.

RS 485 exists in two versions: 1 Twisted Pair or 2 Twisted Pairs.
  • Single Twisted Pair RS 485
    In this version, all devices are connected to a single Twisted Pair. Thus, all of them must have drivers with tri-state outputs (including the Master). Communication goes over the single line in both directions. It is important to prevent more devices from transmitting at once (software problem).
  • Double Twisted Pair RS 485
    Here, Master does not have to have tri-state output, since Slave devices transmit over the second twisted pair, which is intended for sending data from Slave to Master. This solution often allows implementing multipoint communication in systems, which were originally designed (HW as well as SW) for RS232. Of course, Master software needs to be modified, so that Master periodically sends query packets to all Slave devices. Increased data throughput is evident in large volumes.
    Sometimes you can see a RS 485 system in a point-to-point system. It is virtually identical to RS 422; the high impedance state of the RS 485 output driver is not used. The only difference in hardware of the RS 485 and RS 422 circuits is the ability to set the output to high impedance state.

So, what is the main difference between RS 232 and RS 422 & 485? Voltage levels with respect to ground represent the RS 232 signals. There is a wire for each signal, together with the ground signal (reference for voltage levels). This interface is useful for point-to-point communication at slow speeds. For example, port COM1 in a PC can be used for a mouse, port COM2 for a modem, etc. This is an example of point-to-point communication: one port, one device. Due to the way the signals are connected, a common ground is required. This implies limited cable length - about 30 to 60 meters maximum. (Main problems are interference and resistance of the cable.) Shortly, RS 232 was designed for communication of local devices, and supports one transmitter and one receiver.

RS 422 & 485 uses a different principle: Each signal uses one twisted pair (TP) line - two wires twisted around themselves. We're talking 'Balanced data transmission', or 'Differential voltage transmission'. Simply, let's label one of the TP wires 'A' and the other one 'B'. Then, the signal is inactive when the voltage at A is negative and the voltage at B is positive. Otherwise, the signal is active, A is positive and B is negative. Of course, the difference between the wires A and B matters. For RS 422 & 485 the cable can be up to 1200 meters (4000 feet) long, and commonly available circuits work at 2.5 MB/s transfer rate.

What is the difference between RS 422 and RS 485? Electrical principle is the same: both use differential transmitters with alternating voltages 0 and 3V. However, RS 422 is intended for point-to-point communications, like RS 232. RS 422 uses two separate TP wires; data can be transferred in both directions simultaneously. RS 422 is often used to extend a RS 232 line, or in industrial environments.