242
Continuous Transmit/Receive Operation Using Interrupts: Continuous transmit and receive
operations are possible with SCI3, using the RXI or TXI interrupts. Table 10.13 explains this use
of these interrupts.
Table 10.13 Transmit/Receive Interrupts
Interrupt
Flag
Interrupt Conditions
Remarks
RXI
RDRF
RIE
When serial data is received normally
and receive data is transferred from
RSR to RDR, RDRF is set to 1. If RIE
is 1 at this time, RXI is enabled and
an interrupt occurs. (See figure 10.4
(a).)
The RXI interrupt handling routine
reads the receive data from RDR
and clears RDRF to 0.
Cont i nuous dat a recept ion is
poss i ble by performing these
operations before the reception of
the next serial data in RSR is
completed.
TXI
TDRE
TIE
When TSR empty (previous
transmission complete) is detected
and the transmit data set in TDR is
transferred to TSR, TDRE is set to 1.
If TIE is 1 at this time, TXI is enabled
and an interrupt occurs. (See figure
10.4 (b).)
The TXI interrupt handling routine
writes the next transmit data to
TDR and clears TDRE to 0.
Continuous data transmission is
possible by performing these
operations before the
transmission of data transferred
to TSR is completed.
TEI
TEND
TEIE
When the last bit of the TSR transmit
character has been sent, if TDRE is 1,
then 1 is set in TEND. If TEIE is 1 at
this time, TEI is enabled and an
interrupt occurs. (See figure 10.4 (c).)
TEI indicates that, when the last
bit of the TSR transmit character
was sent, the next transmit data
had not been written to TDR.