I have multiple devices with the same address, and only one I2C bus. If I don't want to/can't use an address multiplexer, will the following arrangement work? (sorry for the messy schematic)
simulate this circuit – Schematic created using CircuitLab
SW1 and SW2 are microcontroller I/O, and are pulled low when we don't want to talk to the corresponding IC, and set to high impedance when we do want to talk to that IC. Can anyone see any problems with this, apart from with clock stretching? Assuming you choose diodes with a small voltage drop, like a schottky.
Edit:
Also assuming that the VIH and VIL all worked out with the diode drop and the VOH VOL.
The diodes could also go on the data lines instead, not sure if there would be any benefit/difference (maybe some I2C devices do something special when the clock goes low even if it's not their address? It's probably safer to not clock at all i.e. have the diodes on the clock lines.