Datasheet

Table Of Contents
Section 17 Serial Communications Interface 3 (SCI3, IrDA)
Rev. 2.00 Jul. 04, 2007 Page 392 of 692
REJ09B0309-0200
Figure 17.11 shows a sample flowchart for serial data transmission. Even if the TDRE flag is
cleared to 0, transmission will not start while a receive error flag (OER, FER, or PER) is set to 1.
Make sure that the receive error flags are cleared to 0 before starting transmission.
No
Yes
Start transmission
Read TDRE flag in SSR
Set SPC3 bit in SPCR or SPCR2 to 1
[1]
Write transmit data to TDR
No
Yes
No
Yes
Read TEND flag in SSR
[2]
Clear TE bit in SCR to 0
TDRE = 1
Continue data reception?
TEND = 1
[1] Read SSR and check that the TDRE flag is
set to 1, then write transmit data to TDR.
When data is written to TDR, the TDRE flag
is automatically cleared to 0. When clock
output is selected and data is written to
TDR, clocks are output to start the data
transmission.
[2] To continue serial transmission, be sure to
read 1 from the TDRE flag to confirm that
writing is possible, then write data to TDR.
When data is written to TDR, the TDRE flag
is automatically cleared to 0.
End
Figure 17.11 Sample Serial Transmission Flowchart (Clock Synchronous Mode)