0
\$\begingroup\$

I'm refactoring a board that needs to switch the communication between an I2C master (M1) and two identical I2C slaves (S1 & S2 with same address).

The first design of this board was using a TCA9545A. This is a nice IC but, like many other I2C switches, it is controlled through the I2C bus. In my application this is an unwanted feature because the only I2C master I can control is not M1 and if I connect it to the same I2C bus, I'm going to create a multi-master topology that's not accepted from S1 and S2 devices.

My thought was to replace the TCA9545A with another I2C switch, which is NOT controlled through I2C (i.e. through a digital controller). But I have to admit that it's not an easy task, because after having searched in all catalogs of main IC companies, I haven't found a single component matching such features.

The other option was to use a standard bidirectional switch/mux like ADG1636 or similar. Is there another option? Is this a good replacement to fulfill my requirements?

--- Schematics update ----

Old board schematics

\$\endgroup\$
  • 2
    \$\begingroup\$ because the only i2c master I can control is not M1 || so which one can you control and, why don't you make a little diagram that shows your proposal? \$\endgroup\$ – Andy aka Jan 9 at 10:30
  • \$\begingroup\$ @Andyaka this's the original schematics.. as you can see i2c bus is found both on J0 (that lead to M1 master) and in X1. That would be not so bad if the bus was the same and only one master was present but in my application I'm going to connect on X1 another I2c master (coming from a different i2c bus) moreover M1 is out of my control while I can control the master connected on X1. \$\endgroup\$ – weirdgyn Jan 9 at 13:49
  • \$\begingroup\$ Can you toss together a block diagram? The schematic isn't particularly helpful, and I'm having trouble understanding your issue as well. It may seem clear to you, but I don't get it. Are you saying you have no control over the master that needs to talk to your slaves? Sounds like an accident waiting to happen. \$\endgroup\$ – Scott Seidman Jan 9 at 15:03
  • \$\begingroup\$ @ScottSeidman the board I'm designing will connect one RaspberryPi board to two Raspberry Cameras. The final objective is to allow the user to switch between the two cameras (when both cameras are idle) understading and handling the way RPi interacts with camera (trough i2c GPU own bus) is beyond my will and capabilities for sure the RPi i2c bus I can handle by user code is not the same as RPi GPU bus. Connecting both busses in the way the original schematics rise a number of problems that renders the solution unreliable. \$\endgroup\$ – weirdgyn Jan 10 at 9:33
2
\$\begingroup\$

I²C switches are called "I²C switches" because they can be controlled through I²C.

The I²C signals themselves are just plain digital signals, which are analog signals. So for switching I²C signals controlled with GPIOs, two-channel SPDT analog switches are the correct choice, and commonly used (because most of them are quite cheap (unlike the ADG1636)).

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

My go to approach for this is the PCA9515A which lets you independently enable i2C segments using discrete GPIO. It's like adding a SPI-like chip select (aka enable) to an entire I2C segment. As a bonus (or is primary function) it also supports level shifting between the segments. Unless I've misunderstood your requirements, which is a distinct possibility.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ using two PCA9515A and driving the second with the negated signal of the first one? \$\endgroup\$ – weirdgyn Jan 9 at 13:29
  • \$\begingroup\$ yea, or just manage the discrete enables individually with two different GPIOs \$\endgroup\$ – vicatcu Jan 9 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.