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

Multiple I2C busses on one processor

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
JamesW, kent, England
Guest







Multiple I2C busses on one processor
PostPosted: Thu Aug 06, 2009 10:37 am     Reply with quote

Hi Folks,

Simplest question ever.

I have an application where I need to use 15 MCP23008 I/O expanders. Problem is - there are only 8 available addresses to use.

Can I do the same with #USE_I2C as you can with #USE_RS232 and create multiple I2C ports on a PIC?

Or is it a little more complicated than that?? If it is, can anyone recommend a more elegant solution please?

Thanks in advance

James
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 06, 2009 10:56 am     Reply with quote

Yes, just create two i2c busses. Each of the two busses will have its own
#use i2c statement, which defines the i/o pins used by the bus. Each
bus must have its own set of pull-up resistors on it. The compiler
supports named "streams" for #use i2c(), similar to #use rs232().
See the manual.
JamesW, kent, England
Guest







PostPosted: Thu Aug 06, 2009 11:13 am     Reply with quote

Thanks for the help

James
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