|
XR88C681_06 Datasheet, PDF (83/101 Pages) Exar Corporation – CMOS Dual Channel UART (DUART) | |||
|
◁ |
XR88C681
Figure 44 shows two DUART devices, one labeled
âTransmitting Deviceâ and the other, âReceiving Deviceâ.
This example starts with the assumption that the
âTransmitter Deviceâ has been programmed such that
MR2A[5] = 1, which results in programming the
âTransmitting Deviceâ for Transmitter-RTS Control. This
example further assumes that the âTransmitting Deviceâ
has been programmed such that MR2A[4] = 1. According
to Section G.3, the Transmitter of Channel A of the
âTransmitting Deviceâ has now been programmed to be
under -CTSA input control.
In the case of the âReceiving Deviceâ, IP2 (RTS-in) has
been programmed to generate an âInput Port Change of
Stateâ interrupt request to the CPU. The firmware for the
Interrupt Service Routines is written such that if the IP2
input were to change and IPCR[2] = 0, the CPU would
âwriteâ [D7,..., D0] = [0, 0, 0, 0, 1, 0, 0, 0] to DUART
address 0E16. In this step, the Interrupt Service Routine
would invoke the âSET OUTPUT PORT BITS
COMMANDâ, and in the process toggle OPR[3] to a logic
âhighâ and the Output Port pin, OP3, (CTS-out) to a logic
âlowâ. This would, in turn, assert the -CTSA input of the
âTransmitting Deviceâ and allow it to transmit data to the
âReceiving Deviceâ.
Once Channel A Transmitter has emptied both its THR
and TSR of data, it will negate the -RTSA output, via the
âTransmitter-RTS Controlâ feature. When the -RTSA
output the âTransmitting Deviceâ is toggled âhighâ, the IP2
(RTS-in) is also toggled âhighâ, thereby generating
another âInput Change of Stateâ interrupt request to the
CPU. With IPCR[2] = 1, the likely Interrupt Service
Routine would be to âWriteâ [D7,..., D0] = [0, 0, 0, 0, 1, 0, 0,
0] to DUART address 0F16. In this step, the Interrupt
Service Routine would invoke the âCLEAR OUTPUT
PORT BITS COMMANDâ, and in the process toggle OP3
(CTS-out) âhighâ. This would in turn negate the -CTSA
input of the âTransmitting Deviceâ and inhibit the
transmission of data from the Channel A of the
âTransmitting Deviceâ.
Figure 45 presents a Flow Diagram which depicts an
Algorithm that could be used to implement the
Transmitter-Control RTS/CTS Handshaking Mode.
Please note that the shaded block pertain to occurrences
within the âReceiving Deviceâ. Whereas the âWhiteâ block
pertain to operation within the âTransmitting Device.â
Rev. 2.11
83
|
▷ |