Loading...
Pages: [1]   Go Down
Author Topic: two I2C devices on one uno?  (Read 272 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

UK
Offline Offline
Edison Member
*
Karma: 51
Posts: 2477
What a host of balls she had seen: gaity, the brass buttons...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Offline Offline
Sr. Member
****
Karma: 0
Posts: 275
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 47
Posts: 2575
"We're a proud service of the Lost Electricity Reclamation Agency"
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Get the infamous "One Million Ohms" board at tINDIE.com: http://tinyurl.com/BuyMohms

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 299
Posts: 26031
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What about 2 of the same device on the same processor?
You then need to switch the bus with data select lines.

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 270
Posts: 17059
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

Pages: [1]   Go Up
Print
 
Jump to: