Section 17 I
2
C Bus Interface (IIC)
Rev. 3.00 Jan 25, 2006 page 520 of 872
REJ09B0286-0300
1. Clear the TRS bit in ICCR to 0 to switch from transmit mode to receive mode.
Set the WAIT bit in ICMR to 1.
Clear the ACKB bit in ICSR to 0 (acknowledge data setting).
2. When ICDR is read (dummy data read), reception is started, and the receive clock is output,
and data received, in synchronization with the internal clock.
In order to detect wait operation, clear the IRIC flag in ICCR to 0. After reading ICDR, clear
IRIC continuously so no other interrupt handling routine is executed. If the time for reception
of one frame of data has passed before the IRIC clearing, the end of reception cannot be
determined.
3. The IRIC flag is set to 1 at the fall of the 8th receive clock pulse. If the IEIC bit in ICCR has
been set to 1, an interrupt request is sent to the CPU.
SCL is automatically fixed low in synchronization with the internal clock until the IRIC flag
clearing. If the first frame is the last receive data, execute step [10] to halt reception.
4. Clear the IRIC flag to clear the wait state.
The master device outputs the 9th clock and drives SDA low at the 9th receive clock pulse to
return an acknowledge signal.
5. When one frame of data has been received, the IRIC flag in ICCR and the IRTR flag in ICSR
are set to 1 at the rise of the 9th receive clock pulse. The master device outputs the receive
clock to receive the next data.
6. Read ICDR receive data.
7. Clear the IRIC flag to 0 to detect the next wait operation.
Data reception process from steps [5] to [7] should be executed during one byte reception
period after IRIC flag clearing in step [4] or [9] to release the wait state.
8. The IRIC flag is set to 1 at the fall of the 8th receive clock pulse.
SCL is automatically fixed low in synchronization with the internal clock until the IRIC flag
clearing. If this frame is the last receive data, execute step [10] to halt reception.
9. Clear the IRIC flag in ICCR to cancel wait state.
The master device outputs the 9th clock and drives SDA 1ow at the 9th receive clock pulse to
return an acknowledge signal.
Data can be received continuously by repeating steps [5] to [9].
10. Set the ACKB bit in ICSR to 1 so as to return the acknowledge data for the last reception.
Set the TRS bit in ICCR to 1 to switch from receive mode to transmit mode.
11. Clear the IRIC flag to 0 to release the wait state.
12. When one frame of data has been received, the IRIC flag is set to 1 at the rise of the 9th
receive clock pulse.
Summary of Contents for H8S/2158
Page 10: ...Rev 3 00 Jan 25 2006 page viii of lii...
Page 36: ...Rev 3 00 Jan 25 2006 page xxxiv of lii B Product Lineup 863 C Package Dimensions 864 Index 865...
Page 47: ...Rev 3 00 Jan 25 2006 page xlv of lii Appendix Figure C 1 Package Dimensions TBP 112A 864...
Page 54: ...Rev 3 00 Jan 25 2006 page lii of lii...
Page 70: ...Section 1 Overview Rev 3 00 Jan 25 2006 page 16 of 872 REJ09B0286 0300...
Page 118: ...Section 3 MCU Operating Modes Rev 3 00 Jan 25 2006 page 64 of 872 REJ09B0286 0300...
Page 126: ...Section 4 Exception Handling Rev 3 00 Jan 25 2006 page 72 of 872 REJ09B0286 0300...
Page 198: ...Section 6 Bus Controller Rev 3 00 Jan 25 2006 page 144 of 872 REJ09B0286 0300...
Page 326: ...Section 10 8 Bit PWM Timer PWM Rev 3 00 Jan 25 2006 page 272 of 872 REJ09B0286 0300...
Page 440: ...Section 15 Watchdog Timer WDT Rev 3 00 Jan 25 2006 page 386 of 872 REJ09B0286 0300...
Page 606: ...Section 17 I 2 C Bus Interface IIC Rev 3 00 Jan 25 2006 page 552 of 872 REJ09B0286 0300...
Page 742: ...Section 19 Multimedia Card Interface MCIF Rev 3 00 Jan 25 2006 page 688 of 872 REJ09B0286 0300...
Page 750: ...Section 21 D A Converter Rev 3 00 Jan 25 2006 page 696 of 872 REJ09B0286 0300...
Page 768: ...Section 22 A D Converter Rev 3 00 Jan 25 2006 page 714 of 872 REJ09B0286 0300...
Page 770: ...Section 23 RAM Rev 3 00 Jan 25 2006 page 716 of 872 REJ09B0286 0300...
Page 824: ...Section 26 Clock Pulse Generator Rev 3 00 Jan 25 2006 page 770 of 872 REJ09B0286 0300...
Page 844: ...Section 27 Power Down Modes Rev 3 00 Jan 25 2006 page 790 of 872 REJ09B0286 0300...
Page 878: ...Section 28 List of Registers Rev 3 00 Jan 25 2006 page 824 of 872 REJ09B0286 0300...
Page 926: ...Index Rev 3 00 Jan 25 2006 page 872 of 872 REJ09B0286 0300...