228
Platforms
©2000-2008 Tibbo Technology Inc.
When the flow control is enabled, the RTS and CTS lines are controlled by the
serial port and cannot be manipulated by your application. When the flow control is
off, your application can set and read the state of these lines through the
object.
Half-duplex operation
The half-duplex mode of operation is suitable for communicating with 2-wire
RS485 devices. Again, appropriate interface transceiver IC is required to be
connected to the serial port.
In the half-duplex mode the RTS output is used to control data transmission
direction. You can select the polarity of the direction control signal, i.e. which state
will serve as "data in" direction, and which- as "data out" direction (see
).
When the serial port has no data to transmit (the TX buffer is empty), it is always
ready to receive the data, so the RTS line is in the "data in" state. When the serial
port needs to send out some data (the TX buffer is not empty) it switches the RTS
line into the "data out" state, transmits the data, then switches the RTS back into
the "data in" state. Assuming "LOWFORINPUT" direction control polarity, direction
control looks like this:
365
236