RX610 Group
22. I
2
C Bus Interface (RIIC)
R01UH0032EJ0120 Rev.1.20
Page 728 of 1006
Feb 20, 2013
22.3.2
Initial Settings
Before starting data transmission and reception, initialize the RIIC according to the procedure in figure 22.5.
Set transfer bit rate *
1
*
2
Initial settings
Set CKS[2:0] in ICMR1 and
ICBRL/ICBRH
Set ICMR2 and ICMR3
Set ICFER
Clear ICE in ICCR1 to 0
Set IICRST in ICCR1 to 1
Clear IICRST in ICCR1 to 0
RIIC internal reset
Cancel RIIC internal reset
RIIC function disabled
Set SARLn and SARUn.
Set ICSER
Set slave address format and slave address
RIIC transfer operation enabled
Set interrupt enable
[Legend] n = 0 to 2
Set ICIER
Set ICE in ICCR1 to 1
End
Notes: 1. When the RIIC is used only in slave mode, set the ICBRL register to a
value longer than the data setup time.
2. Set these registers as necessary.
3. This is the case when the timeout function is in use (this processing is not
required if the function is not in use).
ICMR2.TMWE = 1
TMOCNT = 0000h
ICFER.TMOE = 1
*
2
*
2
*
2
*
2
Enable writing to the internal counter for timeout *
3
Initialize the internal counter for timeout *
3
Enable the internal counter for timeout *
3
Figure 22.5 Example of RIIC Initialization Flow