Users Manual

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 1159 of 1852
Nov 30, 2020
RX23W Group 35. I
2
C-bus Interface (RIICa)
Because the ICSR2.NACKF flag being 1 at this time indicates that no slave device recognized the address or there
was an error in communications, write 1 to the ICCR2.SP bit to generate a stop condition.
For master reception from a device with a 10-bit address, start by using master transmission to send the 10-bit
address, and then generate a restart condition. After that, transmitting 1111 0b, the two higher-order bits of the slave
address, and the R bit places the RIIC in master receive mode.
(4) Dummy read the ICDRR register after confirming that the ICSR2.RDRF flag is 1; this makes the RIIC start output
of the SCL and start data reception.
(5) After 1 byte of data has been received, the ICSR2.RDRF flag is set to 1 on the rising edge of the eighth or ninth SCL
(the clock signal) as selected by the ICMR3.RDRFS bit. Reading the ICDRR register at this time will produce the
received data, and the RDRF flag is automatically set to 0 at the same time. Furthermore, the value of the
acknowledgment bit received during the ninth SCL is returned as the value set in the ICMR3.ACKBT bit.
Furthermore, if the next byte to be received is the next to last byte, set the ICMR3.WAIT bit to 1 (for wait insertion)
before reading the ICDRR register (containing the second byte from last). As well as enabling NACK output even
in the case of delays in processing to set the ICMR3.ACKBT bit to 1 (NACK) in step (6), due to other interrupts,
etc., this fixes the SCL0 line to low on the falling edge of the ninth clock pulse in reception of the last byte, so the
state is such that generating a stop condition is possible.
(6) When the ICMR3.RDRFS bit is 0 and the slave device must be notified that it is to end transfer for data reception
after transfer of the next (final) byte, set the ICMR3.ACKBT bit to 1 (NACK).
(7) After reading the byte before last from the ICDRR register, if the value of the ICSR2.RDRF flag is confirmed to be
1, write 1 to the ICCR2.SP bit (requests to generate a stop condition) and then read the last byte from the ICDRR
register. When the ICDRR register is read, the RIIC is released from the wait state and generates the stop condition
after low-level output in the ninth clock pulse is completed or the SCL0 line is released from the low-hold state.
(8) Upon detecting the stop condition, the RIIC automatically sets bits MST and TRS in the ICCR2 register to 00b and
enters slave receive mode. Furthermore, detection of the stop condition leads to setting of the ICSR2.STOP flag to
1.
(9) After checking that the ICSR2.STOP flag is 1, set the ICSR2.NACKF and STOP flags to 0 for the next transfer
operation.