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

PIC-PIC I2C comms - Need current limiting resistor?

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







PIC-PIC I2C comms - Need current limiting resistor?
PostPosted: Fri Jul 23, 2004 9:15 pm     Reply with quote

Connecting two PICs via i2c simply requires hooking up rc3/rc4 (scl/sda) and a pull-up resistor.

This works just fine as long as the PICs do not malfunction. But what about if there is a transient voltage, and the port latches up? While one PIC is driving the line low, a malfunctioning PIC may shoot 5V onto the same line. I2C's normal operation lets the line go high, and not driving it high.

Do any of you put current limiting resistors then on SDA and SCL? I figure 200 ohms ought to do the trick to make sure that sink and source currents do not exceed 25mA, which is the max current allowed thru an i/o pin.

-Mike
Ttelmah
Guest







Re: PIC-PIC I2C comms - Need current limiting resistor?
PostPosted: Sat Jul 24, 2004 8:09 am     Reply with quote

valemike wrote:
Connecting two PICs via i2c simply requires hooking up rc3/rc4 (scl/sda) and a pull-up resistor.

This works just fine as long as the PICs do not malfunction. But what about if there is a transient voltage, and the port latches up? While one PIC is driving the line low, a malfunctioning PIC may shoot 5V onto the same line. I2C's normal operation lets the line go high, and not driving it high.

Do any of you put current limiting resistors then on SDA and SCL? I figure 200 ohms ought to do the trick to make sure that sink and source currents do not exceed 25mA, which is the max current allowed thru an i/o pin.

-Mike

It would depend on the enviroment, and connection betwene the devices. generally, if both are operating from the same supply, on the same board, with the lines kept away from any external noise sources, latch-up is not a likely problem. If the cables run externally, and the supplies are not guaranteed to come up together, than it'd be better to add ferrite traps in the lines, and also add your own better clamp diodes, to prevent latch up occurring, and provide protection for the inputs.
The resistive solution, is not really 'good', since 25mA still flows, and once latch up has occurred, the chip will not recover without power being removed, leaving the unit in an inoperable state...
I have one unit with a very 'dirty' link, and use SPI, rather than I2C, since this is much easier to link using opto-couplers, and if these are placed close to the processors, and driven from the local supply, it makes latch up, no longer a problem...

Best Wishes
drh



Joined: 12 Jul 2004
Posts: 192
Location: Hemet, California USA

View user's profile Send private message

PostPosted: Sat Jul 24, 2004 12:35 pm     Reply with quote

The IIC specs can be found on the philips semiconductor website.
Document 39340011.pdf.
Here is the link www.semiconductors.philips.com/acrobat/literature/9398/39340011.pdf
Look at page 40.
Mark



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

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

PostPosted: Sat Jul 24, 2004 9:50 pm     Reply with quote

We connect as many or more than 16 devices in a system. It is a commerical lighting control so it sees many transients. I never drive the line high. Only pull it low. We use 6ma active pullups.
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Mon Jul 26, 2004 8:54 am     Reply with quote

You might look at a SMBus/I2C Accelerator - LTC1694-1. The specs can be found at http://www.linear-tech.com/pdf/16941fa.pdf. I have used it and it might help your application be a bit more stable.

Ronald
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