Download Print this page

Renesas H8S Family Hardware Manual page 681

Advertisement

Receive Operation Using the HNDS Function (HNDS = 1):
Figure 18.17 shows the sample flowchart for the operations in slave receive mode (HNDS = 1).
Read AASX, AAS and ADZ in ICSR
Figure 18.17 Sample Flowchart for Operations in Slave Receive Mode (HNDS = 1)
Slave receive mode
Initialize IIC
[1] Initialization. Select slave receive mode.
Set MST = 0
and TRS = 0 in ICCR
Set ACKB = 0 in ICSR
and HNDS = 1 in ICXR
Clear IRIC in ICCR
No
= 1?
[2] Read the receive data remaining unread.
ICDRF
Yes
ReadICDR, clear IRIC
[3] to [7] Wait for one byte to be received (slave address + R/W)
Read IRIC in ICCR
No
IRIC
= 1?
Yes
Clear IRIC in ICCR
[8] Clear IRIC
Yes
AAS = 1
and ADZ = 1?
No
Read TRS in ICCR
Yes
TRS = 1?
No
No
Last reception?
Yes
Read ICDR
[10] Read the receive data. The first read is a dummy read.
[5] to [7] Wait for the reception to end.
Read IRIC in ICCR
No
IRIC
= 1?
Yes
[8] Clear IRIC
Clear IRIC in ICCR
Set ACKB = 1 in ICSR
[9] Set acknowledge data for the last reception.
[10] Read the receive data.
Read ICDR
[5] to [7] Wait for the reception to end.
Read IRIC in ICCR
or
No
[11] Detect stop condition
IRIC
= 1?
Yes
[12] Check STOP
ESTP = 1 or
STOP = 1?
Yes
No
[8] Clear IRIC
Clear IRIC in ICCR
[12] Clear IRIC
Clear IRIC in ICCR
End
General call address processing
* Description omitted
Slave transmit mode
Rev. 1.00 Mar. 12, 2008 Page 633 of 1178
2
Section 18 I
C Bus Interface (IIC)
REJ09B0403-0100

Advertisement

loading

This manual is also suitable for:

R4f2472R4f2462H8s/2462H8s/2400 seriesH8s/2472