This question already has an answer here:

I have an I2C slave device in which the maximum input voltage to SCL & SDA is 3.6V. And the I2C Master device is PIC16F877A operating at 20MHz which provides a 5V output on SCL & SDA.

Pls help me to interface these two devices.


marked as duplicate by PeterJ, JRE, Daniel Grillo, Ricardo, nidhin Feb 22 '16 at 12:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


This is a very simple level shifter that will allow you to interface the two devices. The levels shifter is perfect for I2C because it is bidirectional.


simulate this circuit – Schematic created using CircuitLab

  • 3
    \$\begingroup\$ Can the person who down-voted this please explain why? It is not a terrible answer. Although this question could be closed, since it has been asked and answered multiple times. \$\endgroup\$ – mkeith Feb 22 '16 at 0:33
  • \$\begingroup\$ I'm not the downvoter, but maybe a passive-aggressive user thought this is a dupe and as such it shouldn't get an answer. Just disregard the vote and move on... +1 \$\endgroup\$ – Ricardo Feb 22 '16 at 11:52

If there are no 5V slaves on your I2C bus you might well get by with connecting the pull-up resistors to 3.3V. The voltage on those resistors determine the bus voltage, not the connected chips.

A consequence is that the 877 will see a lower voltage than it expects (with a 5V bus), so you might need to run the bus at a lower speed.


Not the answer you're looking for? Browse other questions tagged or ask your own question.