I2C help

Hi there

I am connecting an HMC5883L to I2C and also an MMA7660. I am a bit confused, I know the Arduino Uno I am using has pull up resistors already but I have read that you need to add them to the bus. I am using 2 I2C devices so I planned to use the same 2 10K pullup resistors for both devices. How do I connect this? Diagrams arent my thing and I am slightly confused by the use of VD0 and VCC when I am searching. I know it is connected Arduino GND -> HMC5883L GND - MMA7660 GND Arduino 3.3V -> HMC5883L VCC Arduino 5V -> MMA7660 VCC Arduino A4 (SDA) -> HMC5883L SDA - MMA7660 SDA Arduino A5 (SCL) -> HMC5883L SCL - MMA7660 SCL And the resistors are added between VCC and SDA and VCC and SCL. The confusion arrives because I am using one device that connects to 3.3v and 1 that connects to 5v. Is there a Fritzing diagram somewhere or can someone show me an image of the solution because I have looked at google searches etc and if I do it the way they suggest it seems to me that SDA,SCL,3.3v VCC and 5v VCC will all be connected together. Wont this affect the voltage that goes to each device? ie the HMC5883L may receive 5V instead of the 3.3V in the data sheet

*Edit So far I am trying just connecting both SDA and SCL lines through pull up resistors to the 3.3v VCC That seemed to work well

Sometimes the devices are tolerant, you can check the datasheets. Typically, though, you need a "level shifter" to bridge the 5V and 3.3V. This app note shows a good way to do it, and there are other ways:


Thankyou for that. You learn something every day. Much appreciated.