Datasheet

Section 16 I
2
C Bus Interface (IIC) (Optional)
Rev. 3.00 Mar 21, 2006 page 453 of 788
REJ09B0300-0300
End
Set HNDS = 0 in ICXR
Set WAIT = 0 in ICMR
Set WAIT = 0 in ICMR
Set ACKB = 0 in ICSR
Set ACKB = 1 in ICSR
Read ICDR
Clear IRIC flag in ICCR
Clear IRIC flag in ICCR
Clear IRIC flag in ICCR
Read IRIC flag in ICCR
Read ICDR
Read IRIC flag in ICCR
IRIC = 1?
Yes
No
No
IRIC = 1?
Yes
[1] Select receive mode.
[2] Start receiving. The first read
is a dummy read.
[3] Wait for a receive wait
(Set IRIC at the fall of the 8th clock)
[15] Clear wait mode.
Clear IRIC flag.
(IRIC flag should be cleared to 0
after setting WAIT = 0.)
[11] Clear IRIC flag.
(to end the wait insertion)
[12] Wait for 1 byte to be received.
(Set IRIC at the rise of the 9th clock)
[9] Set TRS for stop condition issuance
[7] Set acknowledge data for
the last reception.
[16] Read the last receive data
Slave receive mode
Set TRS = 0 in ICCR
Set TRS = 1 in ICCR
[17] Generate stop condition
Set BBSY = 0 and
SCP = 0 in ICCR
Figure 16.15 Sample Flowchart for Operations in Master Receive Mode
(Receiving a Single Byte) (WAIT = 1)