15. USI
A96G140/A96G148/A96A148 User’s manual
174
Figure 98. Clock Synchronization during Arbitration Procedure (USIn)
Figure 99. Arbitration Procedure of Two Masters (USIn)
15.19
USIn I2C operation
The I2C is byte-oriented and interrupt based. Interrupts are issued after all bus events except for a
transmission of a START condition. Because the I2C is interrupt based, the application software is free
to carry on other operations during an I2C byte transfer.
Note that when an I2C interrupt is generated, IICnIFR flag in USInCR4 register is set, it is cleared by
writing any value to USInST2. When I2C interrupt occurs, the SCLn line is hold LOW until writing any
value to USInST2. When the IICnIFR flag is set, the USInST2 contains a value indicating the current
state of the I2C bus. According to the value in USInST2, software can decide what to do next.
I2C can operate in 4 modes by configuring master/slave, transmitter/receiver. The operating mode is
configured by a winning master. A more detailed explanation follows below.
High Counter Reset
Fast Device SCLOUT
Slow Device SCLOUT
SCLn
Wait High
Counting
Start High
Counting
Device1
Data Out
SCLn on
BUS
Device2
Data Out
SDAn on
BUS
S
Arbitration Process
not adapted
Device 1 loses
Arbitration
Device1 outputs
High