397
Transmitting Serial Data (Synchronous Mode): Figure 13.17 shows a sample flowchart for
transmitting serial data. The procedure for transmitting serial data is listed below.
1. SCI initialization: select the TxD pin function with the PFC.
2. SCI status check and transmit data write: read the serial status register (SSR), check that the
TDRE bit is 1, then write transmit data in the transmit data register (TDR) and clear TDRE to
0.
3. To continue transmitting serial data: read the TDRE bit to check whether it is safe to write (1);
if so, write data in TDR, then clear TDRE to 0. When the DMAC is started by a transmit-data-
empty interrupt request (TXI) to write data in TDR, the TDRE bit is checked and cleared
automatically.
Start transmitting
Read TDRE bit in SSR
All data transmitted?
Yes
No
Transmission ends
(1)
(2)
(3)
Initialize
TDRE = 1?
Write transmit data in TDR and
clear TDRE bit to 0 in SSR
Yes
No
Read TEND bit in SSR
TEND = 1?
Yes
No
Clear TE bit SCR to 0
Figure 13.17 Sample Flowchart for Serial Transmitting