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?
Electronic – Conceptual Question regarding necessity to do level shifting
i2clevellevel-shifting
Related Topic
- Electronic – Bi-Directional Level Shifter Circuit with pull-down resistors
- Electronic – How to isolate I2C bus when Master is being programmed
- Electronic – Odroid XU4 and Olimex MOD-IO by I2C via level converter
- Electronic – Connecting 3v digital output to Arduino using bi-directional level shifting (mosfet)
Best Answer
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.
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.