Section 17 I
2
C Bus Interface (IIC)
Rev. 3.00 Jan 25, 2006 page 477 of 872
REJ09B0286-0300
•
I
2
C bus data register (ICDR)
•
Slave address register (SAR)
•
Second slave address register (SARX)
•
I
2
C bus mode register (ICMR)
•
I
2
C bus control register (ICCR)
•
I
2
C bus status register (ICSR)
•
IIC operation reservation adapter control register (ICCRX)
•
IIC operation reservation adapter status register A (ICSRA)
•
IIC operation reservation adapter status register B (ICSRB)
•
IIC operation reservation adapter status register C (ICSRC)
•
IIC operation reservation adapter data register (ICDRX)
•
IIC data shift register (ICDRS)
•
IIC operation reservation adapter count register (ICCNT)
•
IIC operation reservation adapter command register (ICCMD)
17.3.1
I
2
C Bus Data Register (ICDR)
ICDR is an 8-bit readable/writable register that is used as a transmit data register when
transmitting and a receive data register when receiving. ICDR is divided internally into a shift
register (ICDRS), receive buffer (ICDRR), and transmit buffer (ICDRT). Data transfers among the
three registers are performed automatically in accordance with changes in the bus state, and they
affect the status of internal flags such as ICDRE and ICDRF. When ICDRE is 1 and the transmit
buffer is empty, ICDRE shows that the next transmit data can be written from the CPU. When
ICDRF is 1, it shows that valid receive data is stored in the receive buffer.
If I
2
C is in transmit mode and the next transmit data is in the transmit buffer (the ICDRE flag is 0)
after successful transmission/reception of one frame of data using the shift register, data is
transferred automatically from the transmit buffer to the shift register. If I
2
C is in receive mode
and no previous data remains in the receive buffer (the ICDRF flag is 0), data is transferred
automatically from the shift register to the receive buffer. Note however that no data is transferred
from the transmit buffer to the shift register in receive mode, and from the shift register to the
receive buffer in transmit mode. If ICDR is read from in transmit mode, data in the receive buffer
can be read but data in the shift register cannot. Always set I
2
C to receive mode before reading
from ICDR.
If the number of bits in a frame, excluding the acknowledge bit, is less than eight, transmit data
and receive data are stored differently. Transmit data should be written justified toward the MSB
side when MLS = 0 in ICMR, and toward the LSB side when MLS = 1. Receive data bits should
be read from the LSB side when MLS = 0, and from the MSB side when MLS = 1.
Содержание H8S/2158
Страница 10: ...Rev 3 00 Jan 25 2006 page viii of lii...
Страница 36: ...Rev 3 00 Jan 25 2006 page xxxiv of lii B Product Lineup 863 C Package Dimensions 864 Index 865...
Страница 47: ...Rev 3 00 Jan 25 2006 page xlv of lii Appendix Figure C 1 Package Dimensions TBP 112A 864...
Страница 54: ...Rev 3 00 Jan 25 2006 page lii of lii...
Страница 70: ...Section 1 Overview Rev 3 00 Jan 25 2006 page 16 of 872 REJ09B0286 0300...
Страница 118: ...Section 3 MCU Operating Modes Rev 3 00 Jan 25 2006 page 64 of 872 REJ09B0286 0300...
Страница 126: ...Section 4 Exception Handling Rev 3 00 Jan 25 2006 page 72 of 872 REJ09B0286 0300...
Страница 198: ...Section 6 Bus Controller Rev 3 00 Jan 25 2006 page 144 of 872 REJ09B0286 0300...
Страница 326: ...Section 10 8 Bit PWM Timer PWM Rev 3 00 Jan 25 2006 page 272 of 872 REJ09B0286 0300...
Страница 440: ...Section 15 Watchdog Timer WDT Rev 3 00 Jan 25 2006 page 386 of 872 REJ09B0286 0300...
Страница 606: ...Section 17 I 2 C Bus Interface IIC Rev 3 00 Jan 25 2006 page 552 of 872 REJ09B0286 0300...
Страница 742: ...Section 19 Multimedia Card Interface MCIF Rev 3 00 Jan 25 2006 page 688 of 872 REJ09B0286 0300...
Страница 744: ...Section 20 Encryption Operation Circuit DES and GF Rev 3 00 Jan 25 2006 page 690 of 872 REJ09B0286 0300...
Страница 750: ...Section 21 D A Converter Rev 3 00 Jan 25 2006 page 696 of 872 REJ09B0286 0300...
Страница 768: ...Section 22 A D Converter Rev 3 00 Jan 25 2006 page 714 of 872 REJ09B0286 0300...
Страница 770: ...Section 23 RAM Rev 3 00 Jan 25 2006 page 716 of 872 REJ09B0286 0300...
Страница 824: ...Section 26 Clock Pulse Generator Rev 3 00 Jan 25 2006 page 770 of 872 REJ09B0286 0300...
Страница 844: ...Section 27 Power Down Modes Rev 3 00 Jan 25 2006 page 790 of 872 REJ09B0286 0300...
Страница 878: ...Section 28 List of Registers Rev 3 00 Jan 25 2006 page 824 of 872 REJ09B0286 0300...
Страница 926: ...Index Rev 3 00 Jan 25 2006 page 872 of 872 REJ09B0286 0300...