Lets assume I want to speak with 16 I2C devices simultaniously. The catch: They all have the same address and I cannot change it.
Could I multiplex the signal? How would I go about it?
My initial approach was to connect all SCL lines together. The SDA line goes through the multiplexer and addresses one at a time. I tried this but it didn't work as expected.
Is what I am trying to do possible in theory? or would the multiplexer mess up the timing? could I somehow introduce a delay on SCL to make them sync again?
I'll try to isolate exactly where the problem is tomorrow. I'll also post my code then. (Its 2:30 in the morning here, and I feel like I should give it another look tomorrow morning before I post it.)
Anyway, if somebody knows whether this is even possible, or has any general comments until then, I would appreciate that.
It's possible; I've done multiplexing between 2 I2C devices with the same address (nintendo nunchucks). I did it the same way you mention; hardwire all SCL lines but multiplex the SDA lines. I used npn transistors, but here is the right approach to a trouble-free setup:
16 channel multiplexer, controlled by 5 IO lines
No complicated communication interfacing required, all digital IO controlled
Hi @johnnyonthespot, I followed your advice and did harwiring of SCL lines and using MUX for SDL lines. It works for two I2Cs but as soon as I hardwire more than 2 SCL lines nothing works.