English
Language : 

SH7708 Datasheet, PDF (393/625 Pages) Renesas Technology Corp – SuperH™ RISC engine
character units, so a 16 pulse synchronization clock is output. To receive in 1-character units,
select an external clock source.
Transmitting and Receiving Data: SCI Initialization (synchronous mode). Before
transmitting, receiving, or changing the mode or communication format, the software must clear
the TE and RE bits to 0 in the serial control register (SCSCR), then initialize the SCI. Clearing
TE to 0 sets TDRE to 1 and initializes the transmit shift register (SCTSR). Clearing RE to 0,
however, does not initialize the RDRF, PER, FER, and ORER flags and receive data register
(SCRDR), which retain their previous contents.
Figure 13.15 is a sample flowchart for initializing the SCI. The procedure for initializing the SCI
is:
1. Select the clock source in the serial control register (SCSCR). Leave RIE, TIE, TEIE, MPIE,
TE and RE cleared to 0.
2. Select the communication format in the serial mode register (SCSMR).
3. Write the value corresponding to the bit rate in the bit rate register (SCBRR) 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 (SCSCR) to 1. Also set RIE, TIE, TEIE and MPIE. Setting TE and RE
allows use of the TxD and RxD pins.
379