0
\$\begingroup\$

I have one MCU powered with 3.3v acting as an I2C master in the BUS and 4 slaves, one of them is 3.3v logic and the others three are 5v logic.

It's ok if they share the BUS, connecting the 5v devices to the BUS using a MOSFET level shifter and the 3.3v device directly to the BUS?.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ "bus" is not an abbreviation, so just write it "bus", not "BUS" :) You'll need a bidirectional voltage shifter for both SCL and SCA, by the way. \$\endgroup\$ – Marcus Müller Dec 30 '20 at 14:54
1
\$\begingroup\$

Yes, this is often done.

A common approach looks like this:

schematic

simulate this circuit – Schematic created using CircuitLab

You need to make sure to use a logic level N-channel MOSFET that will be fully on @ 3.3 V.

Note that you will need two of these circuits, one each for SCL and SDA.

The resistors may need to be adjusted depending on speed and number of slaves.

Another solution would be to use a dedicated I2C level shifting IC like a TXS0108.

\$\endgroup\$

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.