Master Receive Operation - Renesas H8S/2437 Hardware Manual

Renesas 16-bit single-chip microcomputer h8s family / h8s / 2600 series
Table of Contents

Advertisement

17.4.3

Master Receive Operation

In master receive mode, the master device outputs the receive clock, receives data from the slave
device, and returns an acknowledge signal. The operation timings in master receive mode are
shown in figures 17.7 and 17.8. The reception procedure and operations in master receive mode
are shown below.
1. Clear the TEND bit in ICSR to 0, then clear the TRS bit in ICCRA to 0 to switch from master
transmit mode to master receive mode. Then, clear the TDRE bit to 0 and read ICDRR
(dummy data read).
2. When ICDRR is read (dummy data read), reception is started, and the receive clock is output,
and data is received, in synchronization with the internal clock. The master device outputs the
level specified by ACKBT in ICIER to SDA, at the 9th receive clock pulse.
3. After the reception of one frame data is completed, the RDRF bit in ICSR is set to 1 at the rise
of 9th receive clock pulse. At this time, the received data can be read by reading ICDRR and at
the same time the RDRF bit is cleared to 0.
4. The continuous reception is performed by reading ICDRR and clearing RDRF to 0 every time
RDRF is set. If the 8th receive clock pulse falls after reading ICDRR by the other processing
while RDRF is 1, SCL is fixed low until ICDRR is read.
5. If the next frame is the last receive data, set the RCVD bit in ICCRA to 1 before reading
ICDRR. This enables the issuance of the stop condition after the next reception.
6. When the RDRF bit is set to 1 at rise of the 9th receive clock pulse, issue the stop condition.
7. When the STOP bit in ICSR is set to 1, read ICDRR. Then clear the RCVD bit to 0.
8. The operation returns to slave receive mode.
Note: Operation described in step 1 should be executed continuously.
Rev. 1.00, 09/03, page 494 of 704

Advertisement

Table of Contents
loading

Table of Contents