c. Interrupts and continuous transmission/reception
SCI3 can carry out continuous reception using RXI and continuous transmission using TXI.
These interrupts are shown in table 10-13.
Table 10-13 Transmit/Receive Interrupts
Interrupt Flags
Interrupt Request Conditions
Notes
RXI
TXI
TEI
RDRF
RIE
When serial reception is performed
The RXI interrupt routine reads the
normally and receive data is transferred receive data transferred to RDR
from RSR to RDR, bit RDRF is set to 1, and clears bit RDRF to 0.
and if bit RIE is set to 1 at this time, RXI Continuous reception can be
is enabled and an interrupt is requested. performed by repeating the above
(See figure 10-7 (a).)
operations until reception of the
next RSR data is completed.
TDRE
TIE
When TSR is found to be empty (on
The TXI interrupt routine writes the
completion of the previous transmission) next transmit data to TDR and
and the transmit data placed in TDR is clears bit TDRE to 0. Continuous
transferred to TSR, bit TDRE is set to 1. transmission can be performed by
If bit TIE is set to 1 at this time, TXI is
enabled and an interrupt is requested.
(See figure 10-7 (b).)
repeating the above operations
until the data transferred to TSR
has been transmitted.
TEND
TEIE
When the last bit of the character in TSR TEI indicates that the next transmit
is transmitted, if bit TDRE is set to 1, bit data has not been written to TDR
TEND is set to 1. If bit TEIE is set to 1 at when the last bit of the transmit
this time, TEI is enabled and an interrupt character in TSR is sent.
is requested. (See figure 10-7 (c).)
293