Figure 16.20 Sample Flowchart For Operations In Slave Receive Mode (Hnds = 0) - 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)
Slave receive mode
and TRS = 0 in ICCR
Set ACKB = 0 in ICSR
Set HNDS = 0 in ICXR
No
Read AASX, AAS and ADZ in ICSR
Set ACKB = 1 in ICSR
No

Figure 16.20 Sample Flowchart for Operations in Slave Receive Mode (HNDS = 0)

Rev. 3.00 Jul. 14, 2005 Page 556 of 986
REJ09B0098-0300
Set MST = 0
[1] Select slave receive mode.
Clear IRIC in ICCR
No
[2] Read the receive data remaining unread.
ICDRF = 1?
Yes
Read ICDR
Clear IRIC in ICCR
[3] to [7] Wait for one byte to be received (slave address + R/W)
Read IRIC in ICCR
IRIC = 1?
Yes
Clear IRIC in ICCR
[8] Clear IRIC
Yes
AAS = 1
General call address processing
and ADZ = 1?
No
Read TRS in ICCR
Yes
Slave transmit mode
TRS = 1?
No
* n: Address + total number of bytes received
No
(n-2)th-byte
reception?
Yes
[9] Wait for ACKB setting and set acknowledge data
Wait for one frame
(after the rise of the 9th clock of (n-1)th byte data)
No
ICDRF = 1?
[10] Read the receive data. The first read is a dummy read.
Yes
Read ICDR
Read IRIC in ICCR
[11] Wait for one byte to be received
IRIC = 1?
Yes
[12] Detect stop condition
Yes
ESTP = 1 or
STOP = 1?
No
Clear IRIC in ICCR
[13] Clear IRIC
No
ICDRF = 1?
[14] Read the last receive data
Yes
Read ICDR
[15] Clear IRIC
Clear IRIC in ICCR
End
(Set IRIC at the rise of the 9th clock)
* Description omitted
for the last reception
(Set IRIC at the rise of the 9th clock)

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2100 seriesH8s/2114rR4f2114r

Table of Contents