0

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.

Shiva
  • 1
  • 1
  • You need a bidirectional logic level shifter/converter..https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide – cocco Feb 21 '16 at 18:14
  • 7
    http://electronics.stackexchange.com/q/97889/76228 – cocco Feb 21 '16 at 18:17

2 Answers2

2

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.

schematic

simulate this circuit – Schematic created using CircuitLab

vini_i
  • 7,048
  • 3
  • 32
  • 49
  • 3
    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. – user57037 Feb 22 '16 at 00:33
  • 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 – Ricardo Feb 22 '16 at 11:52
1

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.

user57037
  • 28,915
  • 1
  • 28
  • 81
Wouter van Ooijen
  • 48,407
  • 1
  • 63
  • 136