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

General i2c question...

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



Joined: 15 Aug 2005
Posts: 18

View user's profile Send private message

General i2c question...
PostPosted: Tue Sep 27, 2005 9:43 pm     Reply with quote

From what I've read, you can have either a HW i2c or a SW i2c...

Can you have multiple i2c connections to other hardware with one PIC?

My application requires me to connect to an LCD display, AD converter and a Keypad. From what I've read, I can define an i2c protocal with #use i2c(...).

This can be set up to use the hardware i2c or a software (bit banging) i2c.

How can one set up two? One HW one SW?

Thanks,
Sal
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue Sep 27, 2005 9:47 pm     Reply with quote

Why would you need two? Can't you hand all of your I2C devices on the same bus (be it h/w or s/w)? Do addresses conflict that badly?
SBS



Joined: 15 Aug 2005
Posts: 18

View user's profile Send private message

PostPosted: Tue Sep 27, 2005 9:57 pm     Reply with quote

DOH! I knew that!

Thank!
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Sep 27, 2005 10:40 pm     Reply with quote

kender wrote:
Why would you need two? Can't you hand all of your I2C devices on the same bus (be it h/w or s/w)? Do addresses conflict that badly?


You may want more than one bus if you are dealing with divices that support different bus speeds (such as 100K versus 400K) and you need to talk to one at high speed.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Sep 28, 2005 6:47 am     Reply with quote

Or say that you are talking between PICs with I2C and each PIC has its own external EEPROM.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Wed Sep 28, 2005 8:18 am     Reply with quote

or 5V and 3.3V
and keep like devices together on a bridge
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Fri Oct 07, 2005 5:52 pm     Reply with quote

Mark wrote:
Or say that you are talking between PICs with I2C and each PIC has its own external EEPROM.

That's an interesting one. I wonder if it's possible to do this with just #use i2c(...) and without writing custom I2C bit-banging code?
Joshua Lai



Joined: 19 Jul 2004
Posts: 42
Location: Malaysia, PJ

View user's profile Send private message Send e-mail

PostPosted: Fri Oct 07, 2005 9:44 pm     Reply with quote

asmallri wrote:

You may want more than one bus if you are dealing with divices that support different bus speeds (such as 100K versus 400K) and you need to talk to one at high speed.


How to do that? How to specificy i2c speed in #use i2c(...)?

If not specify, what is the default i2c speed?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Oct 09, 2005 2:04 pm     Reply with quote

Code:
How to do that? How to specificy i2c speed in #use i2c(...)?

You have an old version of the compiler. Your version (2.734) came
out in February 2001. The closest manual for that version is the
July 2001 manual. You can download it from one of these websites:
http://web.media.mit.edu/~earroyo/voice_chip/CCSC.pdf
http://www.robozes.com/otrosdoc/manualccsc.pdf
Then look in the #use i2c section of the manual to see how to set
the speed.
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