CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Pic i2c multiple devices

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

Pic i2c multiple devices
PostPosted: Wed May 06, 2015 1:31 pm     Reply with quote

Hello,
I'm doing a sign that communicate a pic with some peripherals using i2c. But I never used i2c for more than 1 Peripheral.
How can I use?
There is something I need to do or just call all alongside devices using only the SCL and SDA ??
Any tips?
Ttelmah



Joined: 11 Mar 2010
Posts: 19488

View user's profile Send private message

PostPosted: Wed May 06, 2015 1:35 pm     Reply with quote

So long as the devices all have different addresses, you can just talk to each device as if it is alone one the bus.

Remember the bus capacitance will be higher, so you may need to use lower pull-ups.
lucasromeiro



Joined: 27 Mar 2010
Posts: 167

View user's profile Send private message

PostPosted: Wed May 06, 2015 4:26 pm     Reply with quote

Thanks for the tip!
one of 4.7k pullup would be suitable for 3 devices?
Another question:
One of the devices will be mcp3424, but do not think library, which recommend?
Ttelmah



Joined: 11 Mar 2010
Posts: 19488

View user's profile Send private message

PostPosted: Thu May 07, 2015 2:10 am     Reply with quote

Depends on the length of the bus, and the nature of the tracks used.

You need to estimate the bus capacitance. Pin capacitances for all the chips, capacitances for the tracks. Then with this all summed up, what frequency you are going to run at the fastest, and use the formula/table in the I2C specification, and calculate the pull up required. Go 10% lower than this figure. Provided this then is inside the allowed value for maximum current that all the devices can deliver, you have your figure.

This is down to you writing code. Every 'driver' here and from CCS, is down to a programmer sitting down with the data sheet and just writing the code needed.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group