Datasheet
Section 16 I
2
C Bus Interface 2 (IIC2) (Option)
Rev.7.00 Mar. 18, 2009 page 800 of 1136
REJ09B0109-0700
No
Yes
RDRF=1 ?
No
Yes
RDRF=1 ?
The last receive
- 1?
Slave receive mode
Slave transmit mode
Clear AAS in ICSR
Set ACKBT=0 in ICIER
Dummy read ICDRR
Read RDRF in ICSR
Read ICDRR
Set ACKBT=1 in ICIER
Read ICDRR
Read RDRF in ICSR
Read ICDRR
End
No
Yes
Yes
No
TDRE=0 ?
RDRF=1 ?
No
Yes
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[1] Clear the flag AAS.
[2] Set the acknowledge for the transmit device.
[3] Dummy read ICDRR.
[4] Wait the reception end of 1 byte.
[5] Judge the (last receive -
1).
[6] Read the received data, and clear RDRF to 0.
[7] Set the acknowledge for the last byte.
[8] Read the received data of the (last byte - 1),
and clear RDRF to 0.
[9] Wait the reception end of the l
ast byte.
[10] Read the received data of the last byte,
and clear RDRF to 0.
Additional information: If only one byte is received, steps [2] through [6] are omitted following step [1],
and processing jumps to step [7].
Figure 16.17 Sample Flowchart for Slave Receive Mode










