Basic question I2C

If I have two devices, a real time clock and a an eeprom both on I2C bus, do I directly hook them to the SDL or do I need transistors to hook all devices on the bus?

I am assuming that the internal circuits on each I2C device has some sort of open-collector setup and the master may have an internal pull-up resistor.

Am I correct with this assumption?

Thanks.

No transistors needed. Connect SDA and SCL to each device. The internal pullups are a little weak. You may need a pullup resistor on SDA and SCL.

If your i2c lines are going to be long then you want external pullup resistors.

Grumpy Mike suggested 4k7 on each line a few days back and he's normally right :slight_smile:

Mowcius

Thanks guys. I will put a DS1307 on a shield so that's close. Then other I2C chips may be far away (1-2m) and I can add pullups where they are.

Then other I2C chips may be far away (1-2m) and I can add pullups where they are.

Well if they are to be further away then as you only have the two i2c lines, you might as well stick the pullup resistors on the shield. They shouldn't have any negative effects.

Mowcius