Renesas H8S/2100 Series Hardware Manual page 558

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

Advertisement

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

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2112r

Table of Contents