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.
Can you share 12c?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Can you share 12c?
Yes. As long as each device on the I2C bus has a different address, they can share the bus.
- sparky
- Posts: 101
- Joined: Tue May 25, 2010 6:37 pm
Re: Can you share 12c?
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?
What is the address for the 7 segment backpack?
-
- Posts: 26
- Joined: Sun Feb 12, 2012 12:17 pm
Re: Can you share 12c?
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.
- sparky
- Posts: 101
- Joined: Tue May 25, 2010 6:37 pm
Re: Can you share 12c?
Thanks. I just found it in the library. No conflict - Yay!
Code: Select all
void Adafruit_LEDBackpack::begin(uint8_t _addr = 0x70) {
i2c_addr = _addr;
- hilldnh
- Posts: 2
- Joined: Sat Nov 17, 2012 11:17 pm
Re: Can you share 12c?
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
Dave
Please be positive and constructive with your questions and comments.