Inter-Integrated Circuit Controller
7-74
2) Write to the STP bit in the I2C_CON register to realse I
2
C data line.
Do not poll the NACK and AL bits in the I2C_CON register because an up-
date could be missed. These bits require an interrupt process to be han-
dled correctly (also, the INTCODE field in the I2C_IV register should be
read before any action is taken in the subroutine).
Arbitration Lost (AL)
The arbitration lost flag bit is set to 1 when the device in the master transmitter
mode senses it has lost an arbitration when two or more transmitters start a
transmission almost simultaneously or when the I
2
C attempts to start a trans-
fer while BB (bus busy) is 1.
When this is set to 1 due to arbitration lost, the MST/STP bits are automatically
cleared by the core and the I
2
C becomes a slave receiver.
This bit is cleared to 0 by the core with a read of the matching interrupt vector
in I2C_IV register.
-
0: Normal/no action required
-
1: Arbitration lost
Value after reset is low.
Table 7–57. I
2
C Interrupt Vector Register (I2C_IV)
Bit
Name
Description
15 –3
–
Reserved
2 –0
INTCODE
Interrupt code
Interrupt Code (INTCODE)
The binary-coded-interrupt vector (bit 2–> 0) indicates which interrupt has
occurred. Reading the I2C_IV clears the interrupt flag; if other interrupts are
pending, a new interrupt is generated. If there is more than one interrupt flag,
reading the I2C_IV clears the highest priority interrupt flag.
Values after reset are low (all 3 bits).