Rev. 1.0, 02/00, page 445 of 1141
In serial transmission, the SCI operates as described below.
1. The SCI monitors the TDRE flag in SSR1, and if it is 0, recognizes that data has been written
to TDR1, and transfers the data from TDR1 to TSR1.
2. After transferring data from TDR1 to TSR1, the SCI sets the TDRE flag to 1 and starts
transmission. If the TIE bit is set to 1 at this time, a transmit-data-empty interrupt (TXI) is
generated.
When clock output mode has been set, the SCI outputs 8 serial clock pulses. When use of an
external clock has been specified, data is output synchronized with the input clock.
The serial transmit data is sent from the SO1 pin starting with the LSB (bit 0) and ending with
the MSB (bit 7).
3. The SCI checks the TDRE flag at the timing for sending the MSB (bit 7).
If the TDRE flag is cleared to 0, data is transferred from TDR1 to TSR1, and serial
transmission of the next frame is started.
If the TDRE flag is set to 1, the TEND flag in SSR1 is set to 1, the MSB (bit 7) is sent, and the
SO1 pin maintains its state.
If the TEIE bit in SCR1 is set to 1 at this time, a transmit-end interrupt (TEI) request is
generated.
4. After completion of serial transmission, the SCK pin is held in a constant state.
Figure 22.19 shows an example of SCI operation in transmission.
Transfer
direction
Bit 0
Serial
data
Synchronous
clock
1 frame
TDRE
TEND
Data written to TDR1
and TDRE flag cleared
to 0 in TXI interrupt
handling routine
TXI interrupt
request
generated
Bit 1
Bit 7
Bit 0
Bit 1
Bit 6
Bit 7
TXI interrupt
request
generated
TEI interrupt
request
generated
Figure 22.19 Example of SCI Operation in Transmission