Figure 16.17 Sample Flowchart For Operations In Slave Receive Mode (Hnds = 1) - Renesas H8S Series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for H8S Series:
Table of Contents

Advertisement

2
Section 16 I
C Bus Interface (IIC)
Clear IRIC flag in ICCR
Read ICDR, clear IRIC flag
Clear IRIC flag in ICCR
No
Clear IRIC flag in ICCR
Read AASX, AAS and ADZ in ICSR
Read IRIC flag in ICCR
No
Clear IRIC flag in ICCR
Read IRIC flag in ICCR
No
Clear IRIC flag in ICCR
Clear IRIC flag in ICCR

Figure 16.17 Sample Flowchart for Operations in Slave Receive Mode (HNDS = 1)

Rev. 3.00 Jul. 14, 2005 Page 552 of 986
REJ09B0098-0300
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
No
ICDRF
= 1?
[2] Read the receive data remaining unread.
Yes
[3] to [7] Wait for one byte to be received (slave address + R/W)
= 1?
IRIC
Yes
[8] Clear IRIC flag
Yes
AAS = 1
and ADZ = 1?
No
Read TRS in ICCR
Yes
TRS = 1?
No
Yes
Last reception?
No
Read ICDR
[10] Read the receive data. The first read is a dummy read.
[5] to [7] Wait for the reception to end.
= 1?
IRIC
Yes
[8] Clear IRIC flag.
[9] Set acknowledge data for the last reception.
Set ACKB = 1 in ICSR
[10] Read the receive data.
Read ICDR
[5] to [7] Wait for reception end.
IRIC
= 1?
[11] Detect stop condition.
Yes
Yes
ESTP = 1 or
STOP = 1?
No
End
General call address processing
* Description omitted
Slave transmit mode
[12] Check STOP bit.
[8] Clear IRIC flag.
[12] Clear IRIC flag.

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2100 seriesH8s/2114rR4f2114r

Table of Contents