Rev. 2.0, 11/00, page 556 of 1037
25.3.5
Slave Transmit Operation
In slave transmit mode, the slave device outputs the transmit data, and the master device outputs
the transmit clock and returns an acknowledge signal. The transmit procedure and operations in
slave transmit mode are described below.
[1] Set bit ICE in ICCR to 1. Set bits MLS in ICMR and bits MST and TRS in ICCR according
to the operating mode.
[2] After the slave device detects a start condition, if the first frame matches its slave address, at
the ninth clock pulse the slave device drives SDA low to acknowledge the transfer. At the
same time, the IRIC flag is set to 1 in ICCR, and if the IEIC bit in ICCR is set to 1 at this
time, an interrupt request is sent to the CPU. If the eighth data bit (R/
:) is 1, the TRS bit is
set to 1 in ICCR, automatically causing a transition to slave transmit mode. The slave device
holds SCL low from the fall of the transmit clock until data is written in ICDR.
[3] Clear the IRIC flag to 0, then write data in ICDR. The written data is transferred to ICDRS,
and the TDRE internal flag and the IRIC and IRTR flags are set to 1 again. Clear IRIC to 0,
then write the next data in ICDR. The slave device outputs the written data serially in step
with the clock output by the master device, with the timing shown in figure 25.11.
[4] When one frame of data has been transmitted, at the rise of the ninth transmit clock pulse
IRIC is set to 1 in ICCR. If the TDRE internal flag is 1, the slave device holds SCL low
from the fall of the transmit clock until data is written in ICDR. The master device drives
SDA low at the ninth clock pulse to acknowledge the data. The acknowledge signal is stored
in the ACKB bit in ICSR, and can be used to check whether the transfer was carried out
normally. If TDRE internal flag is set to 0, the data written in ICDR is transferred to ICDRS,
then transmission starts and TDRE internal flag and IRIC and IRTR flags are all set to 1
again.
[5] To continue transmitting, clear IRIC to 0, then write the next transmit data in ICDR.
Steps [4] and [5] can be repeated to transmit continuously. To end the transmission, write H'FF
in ICDR so that the SDA may be freed on the slave side. When a stop condition is detected (a
low-to-high transition of SDA while SCL is high), the BBSY flag will be cleared to 0 in ICCR.
Summary of Contents for Hitachi H8S/2191
Page 123: ...Rev 2 0 11 00 page 96 of 1037...
Page 149: ...Rev 2 0 11 00 page 122 of 1037...
Page 197: ...Rev 2 0 11 00 page 170 of 1037...
Page 247: ...Rev 2 0 11 00 page 220 of 1037...
Page 249: ...Rev 2 0 11 00 page 222 of 1037...
Page 347: ...Rev 2 0 11 00 page 320 of 1037...
Page 357: ...Rev 2 0 11 00 page 330 of 1037...
Page 417: ...Rev 2 0 11 00 page 390 of 1037...
Page 431: ...Rev 2 0 11 00 page 404 of 1037...
Page 439: ...Rev 2 0 11 00 page 412 of 1037...
Page 457: ...Rev 2 0 11 00 page 430 of 1037...
Page 525: ...Rev 2 0 11 00 page 498 of 1037...
Page 543: ...Rev 2 0 11 00 page 516 of 1037...
Page 845: ...Rev 2 0 11 00 page 818 of 1037...