Multiple I2C devices

I have an issue I do not know how to resolve. Suppose you have two Arduino shields that you wish to use on one stack. If both shields contain an I2C device, but one board’s device is 5V and the other board’s device is 3V3, how do I resolve attaching the I2C devices to the Arduino’s I2C ports? I assume that one needs to convert the 3V3 levels to 5V. There is also the issue of the pull-ups on the SDA and SCL lines. Does each board have it’s own pull-ups?

Any enlightenment will be appreciated!

Vic

Vic Fraenckel

KC2GUI

windswaytoo ATSIGN gmail DOT com

Hello,

Consider the [Logic Level Converter board, and use the TXI/TXO pins for SCL and SDA as well as GND pins for ground.

http://static.sparkfun.com/images/produ … L_i_ma.jpg

Because the RXO/RXI pins only feature resistors, they’re useless.

It works very fine for me.](http://www.sparkfun.com/products/8745)

avenue33,

Thanks for the reply.

Do I attach +5V on the HV connection and 3V3 on the LV connection?

If the 3V3 device is sharing the I2C channel with a 5V device, do I need pullups on both device’s SCL and SDA lines?

Vic

if you use level coverter than you dont need pullups, just look on schematics http://www.sparkfun.com/datasheets/Brea … er-v10.pdf

There are pulups(R3 R4) on both sides)))

If the 3V3 device is sharing the I2C channel with a 5V device, do I need pullups on both device’s SCL and SDA lines?

you dont need pullups nowhere))) in that case

You don’t need level converters - just use pullup resistors to 3.3V. The 5V device will still read the voltages as valid. The I2C bus is designed for multiple voltage levels. Just make sure you don’t accidentally set the 5V device’s pins as outputs and drive them high, as this would cause a large current to flow in the internal protection diodes in the 3.3V unit…