M16C/28 Group
Under development Preliminary specification
Specifications in this manual are tentative and subject to change.
16. MULTI-MASTER I2C bus INTERFACE
Rev.0.60 2004.02.01
page 249 of N
REJ09B0047-0060Z
16.4 I2C0 Control Register 0 (S1D0 register)
The I2C0 control register 0 (address 02E316) controls the data communication format.
16.4.1 Bits 0 to 2: Bit counter (BC0–BC2)
These bits decide the number of bits for the next 1-byte data to be transmitted. The I2C Bus interface
interrupt request signal is generated immediately after the number of count specified with these bits (the
ACK clock is added to the number of count when the ACK clock is selected by the ACK bit (bit 7 of address
02E416)) have been transferred, and the BC0 to BC2 are returned to “0002”.
Also when a START condition is detected, these bits become “0002” and the address data is always
transmitted and received in 8 bits.
16.4.2 Bit 3: I2C interface enable bit (ES0)
This bit enables to use the multi-master I2C bus interface. When this bit is set to “0”, the interface is
disabled and the SDA and the SCL become high-impedance. When the bit is set to “1”, the interface is
enabled.
When the ES0 bit is set to “0”, the following is performed.
1)Set MST = 1, TRX = 0, PIN = 1, BB = 0, AL = 0, AAS = 0, and ADR0 = 0, of the I2C0 status
register (Address : 02E816)
2)Writing the data into the I2C0 data shift register (Address : 02E016) is disabled.
3)The TOF bit in the I2C0 control register (Address : 02E716) is cleared to “0”
4)The I2C system clock (VIIC) is stopped and the internal counter, flags are initialized.
16.4.3 Bit 4: Data format select bit (ALS)
This bit decides if the recognition of the slave address is processed or not. When this bit is set to “0”, the
addressing format is selected and the address data is recognized. The transfer will be processed only
when a comparison is matched between the slave address and the address data or a general call is
received (Refer to Figure 16.5 I2C0 status register: the item of bit 1, general call detection flag). When
this bit is set to “1”, the free data format is selected and the slave address is not recognized.
16.4.4 Bit 6: I2C bus interface reset bit (IHR)
The bit is used to reset the I2C bus interface circuit when the abnormal communication occurs.
When the ES0 bit is “1” (I2C bus interface is enabled), writing “1” to the IHR bit resets H/W.
Flags are processed as follows:
1)Set MST = 0, TRX = 0, PIN = 1, BB = 0, AL = 0, AAS = 0, and ADR0 = 0, of I2C0 status
register (Address : 02E816)
2)The TOF bit of the I2C0 control register 2 (Address : 02E716) is cleared to “0”
3)The internal counter, flags are initialized.
After writing“1” to the IHR bit, the circuit reset processing is finished in Max. 2.5 VIIC cycles and the IHR
bit is automatically cleared to “0”. Figure 16.10 shows the reset timing.