Datasheet

Section 15 I
2
C Bus Interface (IIC)
Rev. 3.00 Sep. 28, 2009 Page 366 of 710
REJ09B0384-0300
Receive Operation Using the HNDS Function (HNDS = 1):
Figure 15.10 shows the sample flowchart for the operations in master receive mode (HNDS = 1).
End
Set TRS = 0 in ICCR
Set ACKB = 1 in ICSR
Read IRIC in ICCR
Clear IRIC in ICCR
Clear IRIC in ICCR
Clear IRIC in ICCR
Set HNDS = 1 in ICXR
Set BBSY = 0 and
SCP = 0 in ICCR
IRIC = 1?
No
Yes
Yes
Read ICDR
No
[4] Clear IRIC.
[1] Select receive mode.
[2] Start receiving. The first read is a dummy read.
[5] Read the receive data (for the second and subsequent read)
[3] Wait for 1 byte to be received.
(Set IRIC at the rise of the 9th clock for the receive frame)
[6] Set acknowledge data for the last reception.
[10] Read the receive data.
[9] Clear IRIC.
[7] Read the receive data.
Dummy read to start receiving if the first frame is
the last receive data.
[11] Set stop condition issuance.
Generate stop condition.
Master receive mode
Read IRIC in ICCR
IRIC = 1?
No
Yes
[8] Wait for 1 byte to be received.
Set ACKB = 0 in ICSR
Last receive?
Read ICDR
Read ICDR
Set TRS = 1 in ICCR
Figure 15.10 Sample Flowchart for Operations in Master Receive Mode (HNDS = 1)