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 support@ccsinfo.com

Connecting multiple serial devices......

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








Connecting multiple serial devices......
PostPosted: Fri Nov 10, 2006 9:25 am     Reply with quote

Hi,

It is not clear to me whether I can connect multiple, unique, serial devices together using the same SDA and SCL pins. For example, can a DS1307 realtime clock and a 24C02 EEPROM share the same interface? Is this practical, or is it going to make my life difficult? I ask because I am running short of I/O pins :-(!

Tony
Ttelmah
Guest







PostPosted: Fri Nov 10, 2006 10:00 am     Reply with quote

Generally, yes you can.
You would get a 'better' response, if you talked about I2C, rather than 'serial'. The latter applies to a whole range of busses (I2C, async serial like RS232/485, SSP etc. etc..). Some of these busses are designed to support multiple devices, and some are not.
I2C, is designed to support multiple addressed devices (this is why the chips have 'addresses), and will work fine. The problems appear, when the devices have fixed addresses, and (for example), you want to control two memories, and their addresses are the same, and cannot be changed.
However provided you can get versions with distinct addresses, everything should be fine. Some chips allow you to select the address using a number of their external pins. I have (for example), boards running a RTC, I2C D-A, FRAM, and a link to another PIC, happily on a single I2C bus.

Best Wishes
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