How to make the connection of DS3231 and SH1106 in 74HC4067 mux

I've been trying to figure out the correct configuration of the 74HC4067 MUX with my Arduino Nano and where to insert the SDA & SCL pins of both RTC and OLED in my mux. I can't seem to figure it out at all.

Any help would be appreciated. Thanks.

Why do you need the mux?

I will be adding more i2cs to it later

Quite possibly so, but I²C has nothing to do with a 74HC4067 multiplexer.

So the question remains - Why do you need the mux?

Are you expecting to have I2C devices with conflicting addresses?

The DS3231 and SH1106 can share a common SDA and a common SCL, so just wire those together, and likely wire the SCL straight to the Arduino, with the SDA through the multiplexer. No need to use different channels on the 74HC4067 for those since they do not conflict, and make sure there are pullup resistors on both sides of the multiplexer (the DS3231 and SH1106 commonly have pullup resistors on their circuit boards, you may need to supply the pullup resistor on the Arduino side). Until you have an I2C device with a conflicting address you never need to switch channels on the multiplexer and it is basically a useless component.

The 74HC4067 is a single-pole analog multiplexer, there are chips made specifically for multiplexing I2C.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.