Electronic – I2C bus multiplexing issue

communicationi2ctexas instruments

I am seeing an unexpected side effect, and could use some pointers. I am working on a project which uses five TCS34725 color sensors. These sensors are being interfaced via I2C on a TI F28069M DSP Launchpad. The first problem I faced was that the color sensors all have the same address (and they cannot be rewritten). I was given a DG407 dual 8 channel analog mux to attempt a solution. At first I thought this solution was rather straightforward — I'd use the mux for SDA and SCL. What I am seeing however is that the first mux address I set, works perfectly fine, I can read the color sensor ID and read/write config registers etc. The next mux address I set, causes the I2C bus to register as busy on the TI DSP.

My theory is that the mux transitions temporarily to high impedance between address changes, and that high impedance state is somehow being seen as a start condition by the DSP, therefore forever busying the bus until a reset.

According to the DSP's technical reference manual, I can set I2CMDR.IRS bit to 1, which effectively disables the peripheral, resets its status bits, and retains its configuration. I tried setting this bit, delaying 10uS, switching the mux, waiting 10uS, then clearing the bit, but I still see the issue.

Any ideas as to how I can chase down this problem?

Circuit diagram below.


simulate this circuit – Schematic created using CircuitLab

Best Answer

Try putting pull-up resistors on the I2C bus on both the input and output sides of the mux. If you already have smallish resistors (1 to 2k) on the output side, then adding larger ones (10k) to the input side would be reasonable, as they would only serve to hold the high level while the mux is switched and not drive the bus from low to high.