Parallel dynamic I2C PIN switch for I2C Multiplexing
Posted: Wed Oct 11, 2023 9:55 pm
Dear community,
I am new here and not sure if I am right here. I have 3 identical I2C slaves with the same address, want to avoid bit banging and an extra I2C multiplexing. I was wandering If I could connect my slaves to different pins and just switch the IO_MUX of teh ESP32S to the PINS of device I want to address. Checking the function "i2c_set_pin" within [1] looked like this could work. Of course I have to manage initialization of both connected devices seperately and switch only between communications. Do you think this could be a feasible way ?
Wouldn't this be a concept to avoid I2C multiplexers (at the cost of using more ESP32 pins for some applicatios by adding suich a generic feature? I checked teh runtime ending and re-starting a complete Wire interface whcih took about half a millisecond and would be too much.
Any feedback welcome with hints or reasons why such a concept will not work at all.
BR
BastelBaus
[1] https://github.com/espressif/esp-idf/bl ... /i2c/i2c.c
I am new here and not sure if I am right here. I have 3 identical I2C slaves with the same address, want to avoid bit banging and an extra I2C multiplexing. I was wandering If I could connect my slaves to different pins and just switch the IO_MUX of teh ESP32S to the PINS of device I want to address. Checking the function "i2c_set_pin" within [1] looked like this could work. Of course I have to manage initialization of both connected devices seperately and switch only between communications. Do you think this could be a feasible way ?
Wouldn't this be a concept to avoid I2C multiplexers (at the cost of using more ESP32 pins for some applicatios by adding suich a generic feature? I checked teh runtime ending and re-starting a complete Wire interface whcih took about half a millisecond and would be too much.
Any feedback welcome with hints or reasons why such a concept will not work at all.
BR
BastelBaus
[1] https://github.com/espressif/esp-idf/bl ... /i2c/i2c.c