State of IC pins when not powered

Status
Not open for further replies.

nickagian

Member
I have a quick question: When an IC (memory, opamp etc.) is not supplied what happens internally to its pins? Are they in High-Z? Are they pulled-up or -down?
 
It will depend on the exact IC type, and the exact pin - but essentially you shouldn't assume anything - and design accordingly.
 
For example, if I have an SPI memory and want to turn the power supply off during sleep mode (for low power consumption) what state should I put the SPI pins from the side of the MCU in order not to have sink/source leakage currents?
 
For example, if I have an SPI memory and want to turn the power supply off during sleep mode (for low power consumption) what state should I put the SPI pins from the side of the MCU in order not to have sink/source leakage currents?

Fairly obviously setting the pins as inputs will cure any potential problems, but if you're removing the positive power to the chip, then setting the processor pins LOW will avoid any issues as well.
 
Hi,

Interestingly, if you drive a pin on some micro controllers high while the power is off the upper clamp diode will conduct and could actually start to power the device, turning it on. The current path is into the pin, through the clamp diode, to the +5v supply. Even though there is not much current available it could be enough to power the device.
 

Hi,

very interesting... so, you recommend to put all GPIOs of the uC to input state with no internal pull-ups / pull-downs? Or better to configure them as inputs, with pull-downs?
 
Hello again,


Well, if you turn off the +5v supply to the device (+Vcc) then probably the best is to set the outputs all to lows. That will make the device more immune to static discharge. You can probably set them to inputs when you power up the device and that will eliminate buss conflicts during power up.
 
Fairly obviously setting the pins as inputs will cure any potential problems, but if you're removing the positive power to the chip, then setting the processor pins LOW will avoid any issues as well.

If you don't have any pull-up or pull-down on the lines, and you set your GPIO to inputs, then the voltage can float. If it happens to float in no man's land, current consumption can increase in the uC as the input begins to switch. Setting to output low would be a better choice. In some Atmel AVR datasheets I've read in years past, it was stated that this could increase current consumption by as much as 20mA.

The only problem I see with setting output and low is that when you power up your SPI device, the CS will be asserted.
 
Last edited:
If you don't have any pull-up or pull-down on the lines, and you set your GPIO to inputs, then the voltage can float. If it happens to float in no man's land, current consumption can increase in the uC as the input begins to switch.

In extensive tests done by the PIClist members way back last century, it was found it made sod all difference - you're thinking of standard CMOS gates.
 
The OP never identified his MCU as a PIC. I'm not up to speed on the different types of gates used as inputs on MCUs.

I did a quick search in google and found this on :

I would hope that there isn't any shoot through when changing input state!



So some of the guys reported strange behavior with floating inputs and such, and the last one I quoted actually suggested how to find out which pin is the culprit. Perhaps my statement of 20mA was a bit high, but I'll still stand by my recommendation not allowing inputs to float in general on nearly any device whether it is an BJT, logic gate, op-amp, or uC.
 
I have a PIC16f886 that had PORTB3 analog floating hi, when PORTB5 goes low (dig output), the floating B3 also goes low, with no other encouragement than B5 going low.

Solution was to switch the analog input to an output.
 
Last edited:
I have a PIC16f886 that had PORTB3 analog floating hi, when PORTB5 goes low (dig output), the floating B3 also goes low, with no other encouragement than B5 going low.

Solution was to switch the analog input to an output.

Unless you were reading the state of the unused pin, what difference did it make?.

And if you are reading the state of it, then it's NOT an unused pin

Although it seems pretty pointless setting pins as unused analogue inputs anyway

You also need to consider what you were doing, and how analogue inputs work - as you switch the ADC between the pins the source impedance feeding the new pin charges, or discharges, the sample and hold capacitor. As you had infinite source impedance this didn't happen.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…