Rev. 5.00, 09/03, page 458 of 760
Initialization
Clear TE and RE bits in SCSCR to 0
Select communication
format in SCSMR
Set value in SCBRR
Set CKE1 and CKE0 bits in SCSCR
(TE and RE bits are 0)
Wait
Set TE and RE bits in SCSCR to 1
and set RIE, TIE, TEIE, and MPIE bits
Has a 1-bit
interval elapsed?
End
No
Yes
(1)
(2)
(3)
(4)
Note: Numbers in parentheses refer to steps in the preceding procedure description.
Figure 14.7 S ample Flowchart for SCI Initialization
Transmitting Serial Data (Asynchronous Mode): Figure 14.8 sho ws a sample flowchart for
transmitting serial data. The procedure for transmitting serial data is:
1. SCI status check and transmit data write: Read the serial status register (SCSSR), check that
the TDRE bit is 1, then write transmit data in the transmit data register (SCTDR) and clear
TDRE to 0.
2. T o continue t ransmitting serial d ata: Read the TDRE bit to check whe ther it is safe to write (if
it reads 1); if so, write data in SCTDR, then clear TDRE to 0.
3. To ou t put a break at the end of serial tr ans mis s i on: Set the port SC data register (SCP DR ) an d
port SC control register (SCPCR), then clear the TE bit to 0 in the serial control register
(SCSCR). For SCPCR and SCPD R settings, see section 14.2.8, SC Port Control Register
(SCPCR)/SC Port Data Register (SCPDR).