Figure 13.17 Sample Flowchart For Operations In Slave Receive Mode (Hnds = 1) - Renesas H8S/2111B Hardware Manual

Bit single-chip microcomputer h8s family / h8s/2100 series
Table of Contents

Advertisement

Read AASX, AAS and ADZ in ICSR
No

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

Rev. 1.00, 05/04, page 322 of 544
Slave receive mode
Initialize IIC
Set MST = 0
and TRS = 0 in ICCR
Set ACKB = 0 in ICSR
and HNDS = 1 in ICXR
Read IRIC flag in ICCR
No
ICDRF = 1?
Yes
Read ICDR, clear IRIC flag
Read IRIC flag in ICCR
No
IRIC = 1?
Yes
Clear IRIC flag in ICCR
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
IRIC = 1?
Yes
Yes
ESTP = 1 or
STOP = 1?
No
Clear IRIC in ICCR
Clear IRIC in ICCR
End
[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
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 the reception to end or
[11] Detect stop condition.
[12] Confirm STOP bit.
[8] Clear IRIC flag.
[12] Clear IRIC flag.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hd64f2111b

Table of Contents