Serial Port Complete - Latest Microcontroller projects

(lily) #1
Designing RS-485 Links and Networks

tion between two nodes is a separate RS-485 line. The distance around a ring is
unlimited in theory, but the more nodes you have, the more time it takes to
pass a message all the way around. An RS-485 network can use a ring topology
if each node has two ports.

  


In a half-duplex RS-485 line, there are times when no driver is enabled. Even a
full-duplex circuit might disable all of its drivers to save power when possible.
In these cases, all receivers should see a logic 1, indicating an idle state. Guide-
line #4 addresses this need:
Bias inactive links.
Many RS-485 networks also need to ensure logic-1 inputs if the lines acciden-
tally short together. Ways to bias links include using additional terminating
components and using chips with fail-safe circuits built in.

" 

   


In an RS-485 network, only one driver should be enabled at a time. Before
enabling its driver, a node that wants to transmit must wait for any currently
transmitting driver to finish transmitting. Even the busiest networks will have
periods when no driver is enabled.
With no driver enabled, the signal level at a receiver’s inputs might be unde-
fined. A receiver that is enabled and detects a logic 0 will see a Start bit and will
try to read a byte. The same situation exists if one or both wires accidentally
open.
Most RS-485 chips include a fail-safe feature that holds input A more positive
than input B when no signal is applied to the receiver. The fail-safe works fine
on lines that don’t use terminating resistors.
But as Figure 7-6 showed, the fail safe is defeated on lines with terminations.
Figure 7-10 shows a solution that adds two 620Ω resistors: one from input A to
+5V and one from input B to ground. The terminating resistor at the end with
the biasing resistors is increased to 130Ω. This configuration holds terminal A
about 500 mV more positive than terminal B when no drivers are enabled. The
TTL outputs of the receivers are logic highs. When a driver is enabled, a logic
low at the driver’s input brings line B more positive than line A and brings the
receivers’ outputs low.
Free download pdf