English
Language : 

SH7058 Datasheet, PDF (534/1130 Pages) Renesas Technology Corp – Renesas SuperHTM RISC engine
Figure 15.4 is a sample flowchart for initializing the SCI. The procedure is as follows (the steps
correspond to the numbers in the flowchart):
Initialize
Clear TE and RE bits to 0 in SCR
Set CKE1 and CKE0 bits in SCR
(TE and RE bits are 0)
1
Select transmit/receive format
in SMR and SDCR
2
Set value in BRR
3
Wait
No
1-bit interval elapsed?
Yes
Set TE or RE to 1 in SCR; Set RIE,
TIE, TEIE, and MPIE as necessary 4
End
1. Select the clock source in the serial control
register (SCR). Leave RIE, TIE, TEIE,
MPIE, TE, and RE cleared to 0. If clock
output is selected in asynchronous mode,
clock output starts immediately after the
setting is made in SCR.
2. Select the communication format in the
serial mode register (SMR) and serial
direction control register (SDCR).
3. Write the value corresponding to the bit
rate in the bit rate register (BRR) (unless
an external clock is used).
4. Wait for at least the interval required to
transmit or receive one bit, then set TE or
RE in the serial control register (SCR) to
1.* Also set RIE, TIE, TEIE, and MPIE as
necessary. Setting TE or RE enables the
SCI to use the TxD or RxD pin.
Note: * In simultaneous transmit/receive
operation, the TE bit and RE bit must
be cleared to 0 or set to 1
simultaneously.
Figure 15.4 Sample Flowchart for SCI Initialization
Transmitting Serial Data (Asynchronous Mode): Figure 15.5 shows a sample flowchart for
transmitting serial data. The procedure is as follows (the steps correspond to the numbers in the
flowchart):
Rev. 3.0, 09/04, page 493 of 1086