Slave Receive Operation - Hitachi H8/3664 Hardware Manual

Table of Contents

Advertisement

SCL
(master output)
8
Bit 0
SDA
(slave output)
Data 2
[8]
SDA
(master output)
IRIC
IRTR
ICDR
Data 1
User processing
[9] IRIC clearance
Figure 15.7 Example of Master Receive Mode Operation Timing (2)
15.3.4

Slave Receive Operation

In slave receive mode, the master device outputs the transmit clock and transmit data, and the
slave device returns an acknowledge signal. The reception procedure and operations in slave
receive mode are described below.
[1] Set the ICE bit in ICCR to 1. Set the MLS bit in ICMR and the MST and TRS bits in ICCR
according to the operating mode.
[2] When the start condition output by the master device is detected, the BBSY flag in ICCR is set
to 1.
[3] When the slave address matches in the first frame following the start condition, the device
operates as the slave device specified by the master device. If the 8th data bit (R/W) is 0, the
TRS bit in ICCR remains cleared to 0, and slave receive operation is performed.
[4] At the 9th clock pulse of the receive frame, the slave device drives SDA low and returns an
acknowledge signal. At the same time, the IRIC flag in ICCR is set to 1. If the IEIC bit in
ICCR has been set to 1, an interrupt request is sent to the CPU. If the RDRF internal flag has
been cleared to 0, it is set to 1, and the receive operation continues. If the RDRF internal flag
has been set to 1, the slave device drives SCL low from the fall of the receive clock until data
is read into ICDR.
[5] Read ICDR and clear the IRIC flag in ICCR to 0. The RDRF flag is cleared to 0.
326
9
1
2
Bit 7
Bit 6
Bit 5
[5]
A
[7] IRIC clearance
[6] ICDR read
(Data 2)
(MLS = ACKB = 0, WAIT = 1)
3
4
5
6
Bit 4
Bit 3
Bit 2
Bit 1
Data 3
Data 2
7
8
Bit 0
[8]
A
[6] ICDR read
(Data 3)
[9] IRIC clearance
9
1
2
Bit 7
Bit 6
Data 4
[5]
Data 3
[7] IRIC clearance

Advertisement

Table of Contents
loading

Table of Contents