I2C Controlled Switches - How to use TCA9548A

An I2C controlled switch is exactly as it sounds. It utilizes the I2C bus to enable or disable 1 or many I2C channels in order to control data flow, separate bus capacitance, or help with same I2C address conflicts.

The TCA9548A is an 8-channel, 1.65V to 5.5V, I2C/SMBus compatible switch with reset and voltage translation. It takes in 1 main I2C channel (SDA & SCL) and fans out to 8 downstream channels. The TCA9548A integrated circuit will be use as the example device in this post.

Example block diagram of TCA9548A

Data Flow Control:

Let’s take only two channels (0 & 1) for reference. The main channel denoted as SDA and SCL from the MCU connects to the TCA9548A. The main channel is connected to the downstream channels SDx and SCx through a passive device called a passFET. The image below shows the internal structure for channels 0 and 1. ***Pull-up resistors are required on the main I2C channel and downstream channels for each signal wire, but are left out in the examples below for simplicity of the block diagram (see typical application schematic 8-1 in the datasheet).

Any number of channels of the TCA9548A can be selected at one time. For example, only channel 0 can be selected. This allows the MCU to see the target device on channel 0.

Only channel 1 can be selected. This allows the MCU to see the target on channel 1

A combination of channels 0 and 1 can be selected. Allowing the MCU to see both targets. In this case, both I2C targets can see each other as well.

Separating Bus Capacitance:

I2C standard mode (0 to 100 kHz) and fast mode (0 to 400 kHz) both require that the parasitic bus capacitance not exceed 400 pF in total. This would include the input cap from the controller, input cap from each target in a system, and the capacitance of the PCB trace and/or wiring.

The TCA9548A can be used to separate bus capacitance accrued on each I2C channel. If all channels 0-7 were enabled, the I2C spec would be violated since total bus cap exceeds 400 pF. TCA9548A solves this problem by ensuring that only 1 channel or selected channels are enabled so that the total cap load is < 400pF total.

Example of bus capacitance separation using TCA9548A

Enabling channels 0, 1, 2, 3 is acceptable. 25 pF + 50 pF + 75 pF + 100 pF = 250 pF < 400 pF

Enabling channels 6 and 7 is not I2C spec compliant. 300 pF + 325 pF = 625 pF > 400 pF


Resolving I2C Address Conflicts:

An address conflict is when two or more devices on an I2C bus have the same target address. If there are same target addresses for multiple devices, the I2C controller does not know which device is being written to / read from. Data can be corrupted, and overall, just doesn’t work.

TMP117 digital temperature sensor has 4 unique addresses selected by the ADD0 hardware pin connection. Connecting ADD0 to GND, V+, SDA, or SCL sets the target address.

Table 7-2 Address Pin and Target Addresses from page 21/50 of the TMP117 datasheet

This means that having more than 4 x TMP117’s on the same I2C bus will result in address conflicts.

The TCA9548A easily resolves this issue by separating same target addresses onto different channels. In the case below, none of the I2C target addresses overlap. When the MCU wants to talk to devices on channel 1, it can simply switch the active channel by talking to the TCA9548A through the I2C bus.

TCA9548A resolves same target address conflicts

Translating I2C Voltage:

TCA9548A can be used for level translating I2C. A passFET connects the main I2C channel to downstream channels. This passFET is OFF when both sides are pulled up to their respective supply voltages. The passFET looks like a small impedance when turned ON. The passFET conducts only when either side pulls LOW. Below is an example use case of 1.8 V to 3.3 V level translation looking at a single channel of the TCA9548A.

Level translation with TCA9548A

For more information on level translation (level shifting), see this blog post.

Previous
Previous

How Voltage Level Translation Works - LSF0102 - PCA9306

Next
Next

Features of TCAL6416 I2C GPIO Expander