
SH7751 Group, SH7751R Group
Section 15 Serial Communication Interface (SCI)
R01UH0457EJ0301 Rev. 3.01
Page 637 of 1128
Sep 24, 2013
Initialization
Clear TE and RE bits
in SCSCR1 to 0
Set CKE1 and CKE0 bits
in SCSCR1 (leavin
g
TE and
RE bits cleared to 0)
Set data transfer format
in SCSMR1
Set value in SCBRR1
1-bit interval elapsed?
Set TE and RE bits in SCSCR1
to 1, and set RIE, TIE, TEIE,
and MPIE bits
End
Yes
Wait
No
1. Set the clock selection in SCSCR1.
Be sure to clear bits RIE, TIE, TEIE,
and MPIE, and bits TE and RE, to 0.
When clock output is selected in
asynchronous mode, it is output
immediately after SCSCR1 settin
g
s
are made.
2. Set the data transfer format in
SCSMR1.
3. Write a value correspondin
g
to the
bit rate into SCBRR1. (Not
necessary if an external clock is
used.)
4. Wait at least one bit interval, then set
the TE bit or RE bit in SCSCR1 to 1.
Also set the RIE, TIE, TEIE, and
MPIE bits.
Settin
g
the TE and RE bits enables
the TxD and RxD pins to be used.
When transmittin
g
, the SCI will
g
o to
the mark state; when receivin
g
, it will
g
o to the idle state, waitin
g
for a start
bit.
Figure 15.7 Sample SCI Initialization Flowchart
Serial Data Transmission (Asynchronous Mode):
Figure 15.8 shows a sample flowchart for
serial transmission.
Use the following procedure for serial data transmission after enabling the SCI for transmission.