R01UH0092EJ0110 Rev.1.10
Page 496 of 807
Jul 31, 2012
M16C/64C Group
23. Serial Interface UARTi (i = 0 to 2, 5 to 7)
Figure 23.23 Register Setting Procedures for Condition Generation
BBS bit in the UiSMR
register is 1 ?
0 (bus free)
1
(bus busy)
UiSMR4
←
71h
UiSMR4
←
09h
Set the STAREQ bit to 1.
UiSMR4
←
70h
Set the STSPSEL bit to 0.
UiMR
←
02h
Select I
2
C mode and internal clock .
UiBRG
←
0
Set the UiBRG register to 00h.
UiSMR2
←
03h
Executing this command requires at least half a cycle of
the SCL clock (62.5 ns).
UiBRG
←
IIC_BAUDRATE
Reset the UiBRG value to target bit rate.
Note:
1. After a stop condition is generated, when generating the next start condition, after setting the STSPSEL bit in
the UiSMR4 register to 0 and waiting at least half a cycle of the SCL clock, then set the STAREQ bit to 1.
Technical update number: TN-16C-130A/EA
Set the STSPSEL bit to 1.
(See Note 1)
UiSMR4
←
04h
UiSMR4
←
3Ch
Set the STPREQ bit to 1.
Set the STSPSEL bit to1.
UiSMR4
←
02h
UiSMR4
←
3Ah
Set the RSTAREQ bit to 1.
Set the STSPSEL bit to 1.
Wait for bus release.
Start condition generation
Restart condition generation
Stop condition generation
End
End
End
The above assumes the following:
XIN = 16 MHz, main clock divided by 1 (no division), UiBRG count source = f1
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...