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

[OT] My latest I2C bus – it’s time to brag

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
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

[OT] My latest I2C bus – it’s time to brag
PostPosted: Sun Apr 05, 2009 12:04 am     Reply with quote

Colleagues,

Thanks for the good tips on I2C bus that you have given me recently!

Now, I’d like to brag about the I2C bus in the project that I’ve just completed. It has the some interesting features:

* Four PICs: 1 master, 3 slaves. “simple” peripherals too: EEPROMs, I/O expander, pot.
* 2m cable. One of the slave PICs is at the end of the cable.
* The cable is hot-plugable.
* 300W @ 500kHz going through the same cable during I2C communication. High voltage in some modes of operation, high current in others. It’s EMI from the I2C’s perspective.
* Galvanic isolation of one of the branches.

Designing and bring it up was a lot of fun.

- Nick http://www.prolifictec.com


Last edited by kender on Tue Apr 07, 2009 8:04 pm; edited 1 time in total
bsturm



Joined: 23 Feb 2009
Posts: 29

View user's profile Send private message

PostPosted: Mon Apr 06, 2009 9:44 pm     Reply with quote

Congrats, it is a lot of work to get all that working reliably isn't it. I spent a solid week on my design with a master/slave board system. At first, it was not hot pluggable. By the end, it recovered nicely from cable unplugs and replugs.
newpicer_
Guest







PostPosted: Tue Apr 07, 2009 7:03 pm     Reply with quote

you both using the hardware i2c module?
bsturm



Joined: 23 Feb 2009
Posts: 29

View user's profile Send private message

PostPosted: Tue Apr 07, 2009 7:55 pm     Reply with quote

I am using the hardware I2C...
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 Apr 07, 2009 8:01 pm     Reply with quote

newpicer_ wrote:
you both using the hardware i2c module?

My slave PICs use hardware I2C module (slaves pretty much have to use hardware I2C). In the beginning, the master was using the hardware I2C. Recently I wrote my own I2C bit-banging routines, because I needed to have timeout if the bus is stuck.
_________________
Read the label, before opening a can of worms.
bsturm



Joined: 23 Feb 2009
Posts: 29

View user's profile Send private message

PostPosted: Tue Apr 07, 2009 8:20 pm     Reply with quote

I haven't had a problem with the bus getting stuck recently, but I do have the WDT enabled just in case. It is not the nicest way of getting unstuck, but it is better than nothing.

I may end up writing my own master too, but I hope to not have to. I have an excellent book on I2C from Square1 Electronics with great examples if I need to get further into it.
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