Sharing i2c pins

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rahatmaini
 
Posts: 176
Joined: Wed Aug 29, 2012 5:15 pm

Sharing i2c pins

Post by rahatmaini »

Usually whenever I read descriptions of i2c devices on this website, they always say that it uses two i2c pins WHICH CAN BE SHARED with other devices. I am not very familiar with i2c but I know it has something to do with assigning addresses to devices.

Can anyone please explain how i2c pins can be shared?

Thank you! I appreciate your time taken to read this. :D

User avatar
adafruit_support_bill
 
Posts: 88041
Joined: Sat Feb 07, 2009 10:11 am

Re: Sharing i2c pins

Post by adafruit_support_bill »

Essentially, all the devices on the bus listen to the "Master" and only respond when a command is addressed to them. For a more detailed explanation of the bus protocol and how this works electrically, i2c.org has some excellent tutorials on the subject: http://www.i2c-bus.org/i2c-primer/

reg3har
 
Posts: 5
Joined: Thu Jan 17, 2013 11:09 am

Re: Sharing i2c pins

Post by reg3har »

This is the best topic i could find in which to ask my question.... I am going to be sharing I2C pins between 4 slave devices and 1 master. All , except the adafruit 16 servo driver, say to add the two 10K pull-up resistors on the lines. The adafruit webpages do not have, nor mention, these resistors. I want to verify that having the pull-up resistors will not adversely affect the servo driver. So will they? Thanks

User avatar
adafruit_support_bill
 
Posts: 88041
Joined: Sat Feb 07, 2009 10:11 am

Re: Sharing i2c pins

Post by adafruit_support_bill »

Generally, you need 1 set of pullup resistors on the bus. The Adafruit servo driver includes pullups:
https://github.com/adafruit/Adafruit-16 ... Driver-PCB

ennbr
 
Posts: 26
Joined: Sun Feb 12, 2012 12:17 pm

Re: Sharing i2c pins

Post by ennbr »

This brings up a question I've had why do all of the Adafruit I2C boards have the pull-ups enabled they should be there but optional. My current project has more than 25 I2C devices 15 Arduinos and many additional boards from Adafruit. I'm going to be forced to remove the pull-ups very time consuming from all of the extra boards. The only pull-ups necessary are to terminate the buss. If I were to leave the pull-ups on the other 10-15 boards I risk damage to the I2C ports on the Arduino boards.

Just my two cents.

User avatar
adafruit_support_bill
 
Posts: 88041
Joined: Sat Feb 07, 2009 10:11 am

Re: Sharing i2c pins

Post by adafruit_support_bill »

Multiple pullups alone is not going to cause damage. Although too many pullups may start to affect the performance of the bus.

The danger of damage comes when you start mixing 5v pullups with 3.3v devices. 3.3v pullups with 5v devices is not a problem.

ennbr
 
Posts: 26
Joined: Sun Feb 12, 2012 12:17 pm

Re: Sharing i2c pins

Post by ennbr »

My question still stands in future boards and revisions can the i2c pull-ups be optional solder pads to enable

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Sharing i2c pins

Post by adafruit_support_rick »

ennbr wrote:My question still stands in future boards and revisions can the i2c pull-ups be optional solder pads to enable
I'll pass along your request. By way of explanation of our design philosophy, however, the majority of our customers use only a few I2C devices at a time, and we prefer to keep configuration options to a minimum to avoid confusion.

reg3har
 
Posts: 5
Joined: Thu Jan 17, 2013 11:09 am

Re: Sharing i2c pins

Post by reg3har »

adafruit_support wrote:Generally, you need 1 set of pullup resistors on the bus. The Adafruit servo driver includes pullups:
https://github.com/adafruit/Adafruit-16 ... Driver-PCB
That is excellent. Thank you very much for your timely answers and all the great things adafruit industries does for the community!

ennbr
 
Posts: 26
Joined: Sun Feb 12, 2012 12:17 pm

Re: Sharing i2c pins

Post by ennbr »

Thanks driveblock my design is pushing i2c to an extreme

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Sharing i2c pins

Post by adafruit »

thanks for the suggestion
if you are putting 25 i2c devices such as the servo board together, you may want to just remove the 10k's on a few of them. thats easy to do with either diagonal cutters (crush the resistors) or soldering iron (heat both sides and remove)
to keep it simple, all of our i2c designs have built in pullups so you can use them with an arduino without any other components.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Sharing i2c pins

Post by adafruit_support_rick »

ennbr wrote:Thanks driveblock my design is pushing i2c to an extreme
For me, that's where the fun is - seeing just how much you can really squeeze out of this stuff. :D

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”