Go Down

Topic: two I2C devices on one uno? (Read 676 times) previous topic - next topic

jimrowan

I am hoping to connect a sparkfun altimeter breakout board and a sparkfun compass breakout board to one uno. I currently have the altimeter working on analog 4 & 5. The problem is that they both communicate over analog 4 & 5. Is there a way to point to analog 2 & 3 for one and default to 4 & 5 for the other?

majenko

I²C is a bus based system.  You connect both devices to the same I²C bus, and you give each device a separate address.

How you do that with your shields should be in the manual or datasheet for them.
Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

RandallR

What about 2 of the same device on the same processor?

I would like to test different designs for an RTC board.  All the boards will use the DS1307 RTC chip.  I want to test several at the same time and compare drift of the different designs.  Since they all have the same address, they can't be on the same bus.  Is there a way to attach an I2C device to pins other than A4 and A5?

Jack Christensen


What about 2 of the same device on the same processor?

I would like to test different designs for an RTC board.  All the boards will use the DS1307 RTC chip.  I want to test several at the same time and compare drift of the different designs.  Since they all have the same address, they can't be on the same bus.  Is there a way to attach an I2C device to pins other than A4 and A5?


Only if you write the protocol bit-bang style for other pins. Maybe someone has done it already? I might Google around a bit.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Grumpy_Mike

Quote
What about 2 of the same device on the same processor?

You then need to switch the bus with data select lines.


CrossRoads

Here's an I2C Mux chip on a breakout board.
http://www.dsscircuits.com/i2c-multiplexer.html

Uses the PCA9544A,
4-channel I2C-bus multiplexer with interrupt logic
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up