Electronic – Conceptual Question regarding necessity to do level shifting

i2clevellevel-shifting

I have a circuit where a 3.3V MCU which is not 5V compatible needs to drive an MCP23017. The MCP23017 will drive and read inputs and outputs from various 74HCT components. I'm thinking that based on the datasheet for the MCP23017, I can power it at 3.3V so it's communication to the MCP is 3.3V compatible. It would also put out logic HIGH at close to 3.3V but that is sufficient for the HCT parts to recognize as HIGH. I would power the HCT parts at 5V. Their outputs would be 5V for HIGH which, I believe, can still be read by the MCP23017 safely even if only driven at 3.3V. No bi-directional level shifter needed on the I2C lines?

Best Answer

No bi-directional level shifter needed on the I2C lines?

The I2C pins do not need a level shifter, as long as the MCP23017 and the MCU are both run at 3.3V, no level shifting is required since they are both operating at the same levels.

Their outputs would be 5V for HIGH which, I believe, can still be read by the MCP23017 safely even if only driven at 3.3V.

You will need to level-shift the inputs to the MCP23017 that are 5V though, since the 23017 can only handle VDD +0.6V, or a maximum of 3.9V. To do this, you can use a simple resistor-divider. You should size this such that the input is 3.3V, not 3.9V since 3.9V is an "absolute maximum" rating and may damage the device or severely reduce its lifetime.