Hi - Been trying to read up on this but TBH can't find much - maybe I'm using the wrong search terms?
As I understand it, if a microprocessor (or any other IC?) is un-powered but it's inputs/outputs are held high by some external device, then those inputs/outputs can latch up and even be permanently damaged.
I have a feeling I've seen (possibly) the effects of this before when I've had my Arduino connected to my PC parallel port with the PC on and the Arduino not plugged into the USB - i.e. un-powered.
Am I correct here - or have I got the wrong end of the stick?
The I/O pins have diodes on them going down to Vcc.
If you connect voltage higher than (Vcc+0.7) to a pin, the excess voltage goes through the diode into Vcc. This protects the pin from overvoltages (up to a point, if there's a lot of amps the diode won't cope).
If the chip is unpowered you can send voltage into Vcc through these diodes (it's no different than putting a diode into the +5V hole on the edge connector then connecting power to it).
Will it damage the chip? That depends on how much current the chip tries to use and what's attached to it. The diodes are pretty small...
Atmega Spec says IO should not be higher than Vcc + 0.5V.
Diodes are only good for 1mA as well.
External signals should not be applied to IO pins when power is not on.
If it's going to be a regular occurrence:
Signals that are applied to input pins can have series resistors added to limit the current the diodes. Zener diodes can be added to limit the voltage.
A 5V '328P only needs 1uA and 3V for a valid high, so you can protect the pin externally quite a bit with a couple of components.
See the Ruddeduino at www.RuggedCircuits.com to see this taken out to every pin and then some. http://www.ruggedcircuits.com/ruggeduino
Am I correct here - or have I got the wrong end of the stick?
You are correct.
I expected to find more info on this than I have been able to. Is it not quite a common issue?
It is not too common as normally component modules connected together are through pins that have some sort of protection in the form of series resistance, or input to an open collector transistor. However it is very common when trying to design circuits that have sleep or power down mode.
If you do have a problem then an open collector output is a good way of stopping latch-up.
@CrossRoads: Just some clarification please on the zeners for limiting pin voltage to 3V (say). I can see how that's beneficial when the chip is powered but when it isn't that's STILL 2.5V above Vcc so is it going to achieve anything?
No, you need to prevent the current flow through the diodes being too large, since
that is what sends the chip into latch-up. Series resistors of a few k work.
Latch-up can be chip-wide and can destroy the chip. It happens when the chip is
powered and excess current goes into a pin. When the chip is unpowered there
may be no latch-up, the protection diode just gets fried. Of course applying 5V to
any pin will power the chip up via the protection diode, which then goes into latch
up if the protection diode can still carry enough current (a fried diode can become
a very low resistance path).
Modern CMOS chips are more latch-up resistant (often 100's of mA are needed),
and its rare to see it. Symptom is the chip gets very hot very quickly and then
fails. Removing all power ASAP can save the chip, but luck is needed.
Older CMOS chips were very sensitive to latchup from small currents and noise
pulses could trigger it.
Just been reading up on Grumpy_Mike's open collectors - seems that something like a 7407 would be the way to go? If so am I correct in thinking I can forget about current limiting resistors i.e. the buffers on their own will suffice?
yaafm:
Just been reading up on Grumpy_Mike's open collectors - seems that something like a 7407 would be the way to go? If so am I correct in thinking I can forget about current limiting resistors i.e. the buffers on their own will suffice?
Arduinos can do "open collector". You simply switch the pin between OUTPUT_LOW and INPUT_NOPULLUP (ie. change the port direction bit, "DDR") instead of going OUTPUT_LOW<->OUTPUT_HIGH.
Not when they are off they can't. Anyway when they are on the only open collector outputs are the two I2C lines. Changing the lines to an input is not an issue here as the lines that will give trouble are inputs already.
Yes a 7407 is an open collector output but the 7407 chip itself can go into latch up so it is best to use separate transistors or a transistor array.