![](http://datasheet.mmic.net.cn/230000/79RC32438-200BB_datasheet_15568909/79RC32438-200BB_406.png)
IDT I2C Bus Interface
I2C Bus Slave Interface
79RC32438 User Reference Manual
15 - 12
November 4, 2002
Notes
I
2
C Bus Slave Interface
The I
2
C bus slave interface operates by monitoring the state of the I
2
C bus and suspending the I
2
C bus
clock at points where CPU intervention is required. Status is reported in the I
2
C bus slave status (I2CSS)
register. All of the bits in this register which are not masked by the I
2
C bus slave status mask (I2CSSM)
register are ORed together and presented to the interrupt controller as the I
2
C bus slave interface interrupt.
The I
2
C bus is suspended by the slave interface when any of the following bits: read request (RR), write
request (WR), or slave addressed (SA) bits in the I2CSS register are set.
2
The slave interface releases the
I
2
C bus when the these bits are cleared by the CPU.
The I
2
C bus slave acknowledge (I2CSACK) register controls how the slave interface responds during
acknowledgment phases on the I
2
C bus. If the acknowledge (ACK) bit is set in this register and the slave is
addressed, then the slave responds with an acknowledge during I
2
C bus acknowledgment phases. Other-
wise, the slave tri-states the SDA pin during acknowledgment phases (that is,
2
it issues a “no acknowl-
edge”).
2
The I
2
C bus slave interface may be configured to operate with either a 7-bit or a 10-bit slave address.
When the A10 bit is set in the I
2
C bus slave address (I2CSADDR) register, the slave interface operates
using the 10-bit slave address in the address (ADDR) field of the I2CSADDR register.
2
When the A10 bit is
cleared, the slave interface operates using the address in the bottom 7-bits of the ADDR field.
2
The general
call enable (GCE) bit in the I2CSADDR register controls whether the slave interface responds to the I
2
C
bus general call address.
2
If the GCE bit is set, the slave interface responds to both the address in the
ADDR field and the general call address. A general call address is one in which the 7-bit I
2
C bus address is
bit address 0b0000000 and the read/write bit is set to write (that is, low).
2
A general call transaction is similar
to a master transmitter transaction in its operation.
2
An I
2
C bus master may generate start byte transactions to allow a microcontroller sampling at a slow
sampling rate to detect a start condition
2
A start byte transaction consists of a start condition followed by a
7-bit address equal to 0b0000000 and with the read/write bit set to read (that is, high).
2
This is then followed
by another start condition and a transaction with the address of the actual slave to be addressed. The I
2
C
bus slave interface ignores all start byte transactions.
2
Example of I
2
C Bus Transaction
Figure 15.14
shows a master transmitter transaction with a 7-bit slave address issued to the slave inter-
face.
2
The master transmitter generates a start condition followed by the 7-bit address of the slave and the
read/write bit set to write.
2
The slave interface compares the address to the value in its ADDR field. If the
address matches the bottom seven bits of this field
2
and the A10 bit is cleared, then the slave interface is
addressed. When this occurs, the slave interface suspends the I
2
C bus and sets the slave addressed (SA)
bit in the I2CSS register. If the address on the I
2
C bus was the general call address and the GCE bit was
set, then in addition to suspending the I
2
C bus and setting the SA bit, the slave interface sets the general
call (GC) bit in the I2CSS register.
2
The setting of the SA bit indicates to the CPU the beginning of an I
C
bus transaction addressed to the slave interface.
2
The CPU may examine the address and read/write bit
driven by the master by reading the I2CDI register.
2
If the CPU wishes to acknowledge that it has been
addressed, it sets the ACK bit in the I2CSACK register.
2
When the CPU clears the SA bit it releases the I
2
C
bus and allows the transaction to progress.
2