Figure 8-4. Sample Flowchart for SCI Initialization
Clear TE and RE bits to
“0” in SCR
1 bit interval
elapsed?
Start transmitting or receiving
No
Yes
1.
Select the communication format in the serial mode register (SMR).
2.
Write the value corresponding to the bit rate in the bit rate register
(BRR). This step is not necessary when an external clock is used.
3.
Select interrupts and the clock source in the serial control register
(SCR). Leave 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.
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).
Setting TE or RE enables the SCI to use the TxD or RxD pin.
Also set the RIE, TIE, TEIE, and MPIE bits as necessary to enable
interrupts. The initial states are the mark transmit state, and the
idle receive state (waiting for a start bit).
Select communication
format in SMR
1
Set value in BRR
2
Set CKE1 and CKE0 bits in
SCR (leaving TE and RE
cleared to “0”)
3
Set TE or RE to “1” in SCR,
and set RIE, TIE, TEIE, and
MPIE as necessary
4
Initialization
187
Summary of Contents for H8/326 Series
Page 67: ...58 ...
Page 121: ...112 ...
Page 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Page 279: ...270 ...