Let's Make Robots!

Can 2 picaxes talk to the same i2c device?

It's really a simple question, can 2 picaxes have their SDL and SCA lines tied together and both talk to the same i2c device? For instance, a shared EEPROM where one could write data and the other could later read it. Or could they share a servo driver --like the 21 servo driver that picaxe sells. I know there are pull-up resistors and the units pull the lines low to talk so one might have to change the values a bit seeing that there will now be double the number pulling the lines up. --Or maybe one set of resistors on the common lines. Also, I think the SCL and SDA lines are sorta "two-way" so "anti-feedback" diodes are probably out (if needed at all). --Any thoughts?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Only one set of resistors are needed as pullups on the SDA and SCL lines for all devices present. 4.7k is for slower data rates(<100kbps), 10k for higher (400kbps?) Whichever master drives SCL low first gets to talk, I believe. No diodes or anything else needed. Keep wire lengths short, under 24 inches or something like that.

Had worked with someone who developed bit-banging I2C, worked out reading Devantech stuff (sonars compasses).

All right, I'm going to give it a shot. Wish me luck. Let the blue smoke fly!

I'm still learning this but as far as I know you can have more than one master device.

One set of pull up resistors only. No diodes should be needed.

I2C bus specifications page 7 explains multiple masters.