# Difference between i2c switch and i2c mux

I am working on a project which involves reading from multiple IMU sensors on i2c protocol. They have a fixed i2c address and hence I feel the requirement of some sort of multiplexer.

On some research, I found two components which appear to be doing same job. Here are the brief descriptions that these devices carry on TI website:

1) TCA9544A Low Voltage 4-Channel I2C and SMBus Multiplexer With Interrupt Logic

The TCA9544A is a quad bidirectional translating switch controlled via the I2C bus. The SCL/SDA upstream pair fans out to four downstream pairs, or channels. Any individual SCn/SDn channel or combination of channels can be selected, determined by the contents of the programmable control register. Four interrupt inputs (INT3–INT0), one for each of the downstream pairs, are provided. One interrupt output (INT) acts as an AND of the four interrupt inputs.

2) TCA9546A Low Voltage 4-Channel I2C and SMBus Switch with Reset Function

The TCA9546A is a quad bidirectional translating switch controlled via the I2C bus. The SCL/SDA upstream pair fans out to four downstream pairs, or channels. Any individual SCn/SDn channel or combination of channels can be selected, determined by the contents of the programmable control register.

To me, both appear to be the same. If anyone can point out the key difference between these two things, it will be really helpful.

Also, I want to ask what will be more suited for my purpose - I want to read the sensor data from all sensors at the maximum possible rate and stream it to a host PC or mobile phone using UART/wifi/bluetooth.

They are the same, and section 3 in both descriptions designates both as "switch". The only difference is an ability of 9544A IC to log interrupts. I even think they are coming from the same wafer/die, just bonded out differently.

CORRECTION: David.A is right, 9544 can only multiplex 1<=>4, while 9546 can connect any combination of channels, although I am not sure what would be the purpose for this, since ACKs will collide then. Technically both ICs can be controlled as a MUX, just the control should be different.

• I am not sure what you mean under "log interrupts"? TCA9544A has an additional interrupt line for each SCL/SDA pair. It simply passes interrupt to master, not logging anything. Otherwise, you are right. They are the same. – Maple May 7 '18 at 17:35
• Re: which one is more suited for your purpose. If your IMU sensors have interrupt that can be programmed to "data ready" event then the switch with interrupt support could be better. If your MCU is fast enough AND I2C is running on fast clock AND the data rate of your sensors is slow enough then you can have extra CPU ticks to do something else efficiently (like communicate to host) – Maple May 7 '18 at 18:16
• @Maple By logged he means you can read the mux to know which int is set. When an interrupt is generated by any device .... the interrupt output is driven LOW. The channel does not need to be active for detection of the interrupt. A bit is also set in the control register – Henry Crun Jul 21 '18 at 5:12

The two chips are NOT the same:

The TCA9544A is an I2C Mux. An I2C Mux multiplexes any one of N downstream ports to the upstream port (1 to 1).

The TCA9546A is an I2C Switch. An I2C Switch connects one or more of the N downstream ports to the upstream port (1 to many).

The control registers also differ.

• Looks like both let you select any combination of downstream ports to connect, neither are limited to connecting a single port – alex.forencich May 7 '18 at 22:32
• The Mux is limited to 1-to-1 connections by design. Read the TCA9544A data sheet carefully -- sections 9.6.2 and 9.6.3 show that Control Register bits B1,B0 select ports 0-3. Compare with the TCA9546A Control Register Bits B3,B2,B1,B0 are a bit field of enabled ports. – David A. May 8 '18 at 16:27
• Well then, that datasheet is rather self-contradictory. It states multiple times that you can connect any combination of channels, but you're right that the control register doesn't seem to allow this. – alex.forencich May 8 '18 at 17:18
• Hmm, you're quite right. I've reported this to TI along with suggested corrections... – David A. May 10 '18 at 16:28

I want to read the sensor data … at the maximum possible rate …

Consider using I²C address translators. At least LT (now part of Analog Devices) have them in their portfolio (product family overview). It sits between two bus sections and normally connects them. It watches for Start Conditions and tinkers the connection during the following address byte in a way that the address on the downhill bus section becomes exored by a preset value.

The advantage considering your needs ("maximum possible rate") is that no I²C transactions to control the switch/mux are necessary – at the disadvantage that, depending on the number of sensors, you may run out of I²C addresses.

You might simply use analog switches and port pins to select them. This is fast, easy and cheap. A single 74HC4051 switching SDA alone would give you 8 I2C buses, or a 74hc4052 switching SDA and SCL gives you 4.

You might also consider our product BL233. This is a serial to I2C convertor, with up to 4 separate channels. It could read 4 sets of these sensors stand alone, connected to an off the shelf bluetooth serial module. No micro is needed.

A significant advantage is that this is truly portable across all platforms - it doesn't stop working when your $FRUITNAME$Pi changes chip, or Windows 11,12,13 breaks the drivers.

BTW, we used the 9545 bus switch, and stopped using the 9544 bus mux as a switch is more versatile. With a switch you have the option to write to all the chips at once, and read them separately, which can speed some things up. Also they are useful as level shifters, when you don't want to switch the ports at all.