The circuit shown can be used to interface multiple serial devices to the I2C bus, even if they lack the extended-addressing capability required.
Information transfer be-tween I2C devices connected to the I2C bus requires two signals: serial data (SDA) and serial clock (SCL). A device connected to the bus can operate as a transmitter or a receiver. A master device initiates a data transfer on the bus, generates clock signals, and terminates the transfer. A device ad-dressed by the master is considered to be a slave. To connect devices on an I2C multi- master bus, the SDA and SCL lines must be bidirectional and connected to a positive supply voltage through pull-up resistors.
In I2C-bus addressing, the first byte after a START condition determines the slave selected by the master. The slave address (upper 7 bits) is usually made up of a fixed and a programmable part. The eighth bit (the least significant bit) determines the direction of the transfer: read or write. The programmable part of the slave address determines the maximum number of identical devices that can be connected to the I2C bus.
This circuit suits applications in which several devices that lack extended addressing capability (in this case, serial EEPROMs) must be connected over an I2C bus. The circuit also proves useful when there is a need to connect more devices than the maximum number allowed by the de-vices' address pins.
By multiplexing the SDA and SCL bus lines of connected devices, multiple I2C devices with the same address can be accessed. The figure shows 16 noncascadable CAT24WC16 EEPROMs accessed by using eight, two-channel I2C multiplexers. The Philips PCA9542 is a bidirectional, 1-of-2 multiplexer that is controlled over the I2C bus. It has three ad-dress pins.
The circuit MUXi connects the I2C bus lines, SDA/SCL, to either the SDAi0/SCLi0 or SDAi1/SCLi1 channel (where i = 1 to 8). No false conditions are generated at the time of connection because the channel becomes active when the I2C bus lines are in a high state.
The I2C bus commands used to control the hardware are:
- Send the multiplexer slave address, 1110 xxx (where xxx = 000 to 111) with R/W = 0.
- Send multiplexer command code to select the channel: xxxx x100 for channel 0; xxxx x101 for channel 1.
- Send or read data to/from the EEPROM connected to the selected channel.