Specifications
RS-422/485 Application Note 33
Copyright B&B Electronics -- Revised October 1997
B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350
PH (815) 433-5100 -- FAX (815) 434-7094
Chapter 5: Software
Introduction
RS-422 and RS-485 are hardware specifications. Software protocol is not
discussed in either specification. It is up to the system designer to define a
protocol suitable for their system. This chapter we will not attempt to define a
protocol standard, but will explain some of the issues that should be considered
by the system designer, whether writing or purchasing software.
RS-422 Systems
RS-422 system software differs little from the familiar point-to-point RS-
232 communication systems. RS-422 is often used to simply extend the distance
between nodes over the capabilities of RS-232. RS-422 can also be used as the
master node in a four wire master-slave network described later in this chapter.
When selecting or writing software for RS-422 systems the designer should be
aware of the signals being used by the hardware in the system. Many RS-422
systems do not implement the hardware handshake lines often found in RS-232
systems due to the cost of running additional conductors over long distances.
RS-485 Driver Control
The principle difference between RS-422 and RS-485 is that the RS-485
driver can be put into a high impedance, tristate mode, which allows other
drivers to transmit over the same pair of wires. There are two methods of
tristating an RS-485 driver. The first method is to use a control line, often the
RTS handshake line, to enable and disable the driver. This requires that the host
software raise the RTS line before beginning a transmission to enable the driver,
then lower the RTS line after the completion of the transmission. Since only a
single RS-485 driver can be enabled on a network at one time it is important that
the driver is disabled as quickly as possible after transmission to avoid two
drivers trying to control the lines simultaneously, a condition called line
contention. Under some operating systems it can be difficult to lower RTS in a
timely manner and this method of driver control should be avoided altogether.
The second method of RS-485 driver control we refer to as Automatic Send
Data Control. This type of control involves special circuitry that senses when
data is being transmitted and automatically enables the driver as well as
disabling the driver within one character length of the end of transmission. This
is the preferred method of driver control since it reduces software overhead and
the number of potential pitfalls for the programmer.










