Can you share 12c?
Moderators: adafruit_support_bill, adafruit

Can you share 12c?

by Sparky on Sun Dec 02, 2012 5:42 pm

Hi,
I'm using an Arduino Uno and trying to add a 7 segment display with backpack https://www.adafruit.com/products/881
and a RTC https://www.adafruit.com/products/264

Both the display and RTC use 12c. Can you share 12c or how can I use both of these in the same project?

Thanks.
Sparky
 
Posts: 70
Joined: Tue May 25, 2010 6:37 pm

Re: Can you share 12c?

by adafruit_support_bill on Sun Dec 02, 2012 6:30 pm

Yes. As long as each device on the I2C bus has a different address, they can share the bus.
User avatar
adafruit_support_bill
 
Posts: 30721
Joined: Sat Feb 07, 2009 10:11 am

Re: Can you share 12c?

by Sparky on Sat Dec 08, 2012 8:19 am

Thanks. I see the DS1307 RTC has an address of 0x68 from your handy chart http://www.ladyada.net/library/i2caddr.html, but the backpack I am not sure of. I did find the datasheet http://www.adafruit.com/datasheets/ht16K33v110.pdf, but can't seem to locate the address.

What is the address for the 7 segment backpack?
Sparky
 
Posts: 70
Joined: Tue May 25, 2010 6:37 pm

Re: Can you share 12c?

by ennbr on Sat Dec 08, 2012 8:25 am

The easiest way is to download the demo source code for the product your interested in the link is on the product page. The address is always listed at the top of the program.
ennbr
 
Posts: 26
Joined: Sun Feb 12, 2012 12:17 pm

Re: Can you share 12c?

by Sparky on Sat Dec 08, 2012 8:32 am

Thanks. I just found it in the library. No conflict - Yay!
Code: Select all | TOGGLE FULL SIZE
void Adafruit_LEDBackpack::begin(uint8_t _addr = 0x70) {
  i2c_addr = _addr;
Sparky
 
Posts: 70
Joined: Tue May 25, 2010 6:37 pm

Re: Can you share 12c?

by hilldnh on Mon Feb 18, 2013 12:38 am

I had two TCS3414 color-light sensors that I wanted to compare (The FN and CS packages, which have different filters). The I2C address is hardwired. After looking at how I2C works in terms of the SCL(clock) and SDA(data) lines, it seemed that turning off the SDA line would prevent the chip from getting a start or stop bit and thus leave it dormant. So used a CMOS analog switch (4066B) to switch on or off the SDA line to each device. This worked just fine for switching between the two devices. I know it's a hack, and the PCA9548 I2C bus expander would be a much better and technically correct solution, but I didn't have one handy.

Dave
hilldnh
 
Posts: 2
Joined: Sat Nov 17, 2012 11:17 pm