|
|
View previous topic :: View next topic |
Author |
Message |
valemike Guest
|
PIC-PIC I2C comms - Need current limiting resistor? |
Posted: Fri Jul 23, 2004 9:15 pm |
|
|
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? |
Posted: Sat Jul 24, 2004 8:09 am |
|
|
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
|
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sat Jul 24, 2004 9:50 pm |
|
|
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
|
|
Posted: Mon Jul 26, 2004 8:54 am |
|
|
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 |
|
|
|
|
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
|