
226
CHAPTER 12 I2C Interface
MB89960 series
12.4 I2C Interface Interrupt
The I2C interface can generate an interrupt request when there is a bus error or
completion of data transfer.
s Interrupt When Bus Error is Occurred
The I2C interface goes into halt mode when bus error occurs under the following condition:
During data transfer (including acknowledge bit), the basic I2C bus protocol is not violated.
In master mode, START condition is detected.
During bus idle, I2C bus protocol is violated.
In START condition, SCL line goes to LOW.
In bus master mode, repeated START condition is detected (IBSR: RSC = “1”).
At this time, an interrupt request to the CPU (IRQ8) is generated if the interrupt request enable
bit is enabled (IBCR: BEIE = “1”). Write “0” to the BER bit in the interrupt processing routine
clear the interrupt request.
The BER bit is set to “1” when there is bus error, regardless of the value of the BEIE bit.
s Interrupt When Data Transfer is Completed
The I2C interface transmit/receive data on SDA line bit by bit. Each data byte is 8 bit long. Data
can be changed only during SCL is low and must be held stable during SCL is high. One clock
pulse is for one bit data transferring, MSB is transferred first. Each byte data has to be followed
by an acknowledge bit, which is signaled from the receiving device by pulling the SDA low at the
9th clock. So one complete data byte transferring needs 9 clock pulses.
When the data transfer is completed, an interrupt request to the CPU (IRQ8) is generated if the
interrupt request enable bit is enabled (IBCR: INTE = “1”). Write “0” to the INT bit in the interrupt
processing routine to clear the interrupt request.
The INT bit is set to “1” when data transfer is completed, regardless of the value of the INTE bit.
s Register and Vector Table for the I2C Interface Interrupt
Reference: See “3.4.2 Interrupt Processing” for details on the operation of interrupts
Table 12.4
Register and Vector Table for the I2C Interface Interrupt
Interrupt
Interrupt Level Setting Register
Vector Table Address
Register
Setting Bits
Upper
Lower
IRQ8
ILR3 (007EH)
L81 (bit1)
L80 (bit0)
FFEAH
FFEBH