Section 14 Serial Communication Interface (SCI)
Rev. 5.00 May 29, 2006 page 411 of 698
REJ09B0146-0500
Clock: An internal clock generated by the on-chip baud rate generator or an external clock input
from the SCK0 pin can be selected as the SCI transmit/receive clock. The clock source is selected
by the C/
A
bit in SCSMR and bits CKE1 and CKE0 in the SCSCR. See table 14.9.
When the SCI operates on an internal clock, it outputs the clock signal at the SCK0 pin. Eight
clock pulses are output per transmitted or received character. When the SCI is not transmitting or
receiving, the clock signal remains in the high state. When only receiving, the SCI receives in 2-
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 (clock synchronous mode)): Before
transmitting, receiving, or changing the mode or communication format, the software must clear
the TE and RE bits to 0 in SCSCR, then initialize the SCI. Clearing TE to 0 sets TDRE to 1 and
initializes the SCTSR. Clearing RE to 0, however, does not initialize the RDRF, PER, FER, and
ORER flags and SCRDR, which retain their previous contents.
Figure 14.18 is a sample flowchart for initializing the SCI.
Initialize
Clear TE and RE bits in SCSCR to 0
Has a 1-bit
period elapsed?
Set TE and RE bits in SCSCR to 1
and set RIE, TIE, TEIE, and MPIE bits
Set transmit/receive format in SCSMR
Yes
No
Set value in SCBRR
Set RIE, TIE, TEIE, MPIE, CKE1,
and CKE0 bits in SCSCR
(TE and RE are 0)
End
Wait
Select the clock source in the
SCSCR. Leave RIE, TIE, TEIE,
MPIE, TE and RE cleared to 0.
Select the communication format
in the SCSMR.
Write the value corresponding to
the bit rate in SCBRR unless an
external clock is used.
Wait for at least the interval
required to transmit or receive
one bit, then set TE or RE in the
SCSCR to 1. Also set RIE, TIE,
TEIE and MPIE. Setting TE and
RE allows use of the TxD0 and
RxD0 pins.
1.
2.
3.
4.
Figure 14.18 Sample Flowchart for SCI Initialization
Summary of Contents for SH7706 Series
Page 8: ...Rev 5 00 May 29 2006 page viii of xlviii ...
Page 160: ...Section 5 Cache Rev 5 00 May 29 2006 page 112 of 698 REJ09B0146 0500 ...
Page 370: ...Section 11 Watchdog Timer WDT Rev 5 00 May 29 2006 page 322 of 698 REJ09B0146 0500 ...
Page 554: ...Section 17 Pin Function Controller PFC Rev 5 00 May 29 2006 page 506 of 698 REJ09B0146 0500 ...
Page 576: ...Section 18 I O Ports Rev 5 00 May 29 2006 page 528 of 698 REJ09B0146 0500 ...
Page 746: ...Index Rev 5 00 May 29 2006 page 698 of 698 REJ09B0146 0500 ...
Page 749: ...SH7706 Group Hardware Manual ...