Serial Communications (16C452)
In the transmit loop, CTS is tested until set, indicating that the other
device is ready to receive data. CTS occurs when the transmitter-to-be
sends RTS, asking the receiver-to-be to prepare to receive. The
transmit loop starts by asserting RTS, telling the other device to
prepare to receive. The other device signals it is okay to transmit by
asserting CTS. The RTS line on the ZT 8809A is asserted by writing
to the Modem Control register, setting bit 1.
When transmitting data, the system software must be sure the
transmitter output buffer is empty (the previous data, if any, having
been sent to the receiver). This is accomplished on the ZT 8809A by
reading the Transmitter Holding Register Empty status found in the
Line Status register, bit 5. When receiving data, the software must be
sure the receiver buffer is full but not overrun. In the ZT 8809A this is
accomplished by reading the Data Ready status found in the Line
Status register, bit 0.
8-4