English
Language : 

HD64F2168 Datasheet, PDF (519/874 Pages) Renesas Technology Corp – Renesas 16-Bit Single-Chip Microcomputer
Receive Operation Using the HNDS Function (HNDS = 1):
Figure 15.17 shows the sample flowchart for the operations in slave receive mode (HNDS = 1).
Slave receive mode
Initialize IIC
Set MST = 0
and TRS = 0 in ICCR
Set ACKB = 0 in ICSR
and HNDS = 1 in ICXR
Clear IRIC in ICCR
No
ICDRF = 1?
Yes
ReadICDR, clear IRIC
Read IRIC in ICCR
No
IRIC = 1?
Yes
Clear IRIC in ICCR
[1] Initialization. Select slave receive mode.
[2] Read the receive data remaining unread.
[3] to [7] Wait for one byte to be received (slave address + R/W)
[8] Clear IRIC
Read AASX, AAS and ADZ in ICSR
AAS = 1
Yes
and ADZ = 1?
No
Read TRS in ICCR
General call address processing
* Description omitted
Yes
TRS = 1?
Slave transmit mode
No
No
Last reception?
Yes
Read ICDR
[10] Read the receive data. The first read is a dummy read.
Read IRIC in ICCR
No
IRIC = 1?
Yes
Clear IRIC in ICCR
[5] to [7] Wait for the reception to end.
[8] Clear IRIC
Set ACKB = 1 in ICSR
Read ICDR
Read IRIC in ICCR
No
IRIC = 1?
Yes
ESTP = 1 or
STOP = 1?
Yes
No
Clear IRIC in ICCR
[9] Set acknowledge data for the last reception.
[10] Read the receive data.
[5] to [7] Wait for the reception to end.
or
[11] Detect stop condition
[12] Check STOP
[8] Clear IRIC
Clear IRIC in ICCR
End
[12] Clear IRIC
Figure 15.17 Sample Flowchart for Operations in Slave Receive Mode (HNDS = 1)
Rev. 3.00, 03/04, page 479 of 830