Serial Port Complete - Latest Microcontroller projects

(lily) #1
Inside RS-485

"4 

$ 8


If a transmitting computer disables its driver by the middle of the final trans-
mitted Stop bit, the next computer to transmit can enable its driver almost
immediately after detecting the Stop bit.
For some of the driver-control methods described below, the driver may remain
enabled for a time after the final Stop bit. In these cases, the next node to trans-
mit must be sure to wait long enough to ensure that the previous computer has
had enough time to disable its driver.
In many applications where a computer transmits and then expects a response,
the required delay has elapsed by the time the responding computer has pre-
pared the data to send. When needed, a way to ensure a delay is to start a timer
after receiving data and then transmit after the timer times out. The amount of
time to wait varies with the method the transmitting computer uses to control
its driver-enable line.

! 3 "   


Controlling the driver in software requires a dedicated output bit that connects
to the transceiver’s driver-enable input. On a PC’s RS-485 port that uses an
RS-232 converter or USB/serial converter, RTS or DTR can serve as the
driver-enable output. Other ports can use any spare output bit.

Figure 6-12: Trace 1 is the active-high driver-enable signal. Trace 2 is a transmitted
byte. The driver-enable must go high before the byte transmits, and can return low any
time after the transmission has completed.
Free download pdf