Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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?
 
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,

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 :
Tony Nixon says:

A floating input WILL cause erratic chip operation. Maybe not while you force it to, but at some stage it will. I've had chips do all sorts of wierd things, until I eliminated a floating pin (or pins). Some of these chips froze just by placing a finger near them, some won't start, some start but run 'funny'. The worst problem is spending mutitudes of time finding out 'why', when you haven't realised the floating pin is the culprit. As far as I know, the excess currents are caused by input FETS not knowing what to do and the 'hi' and 'lo' ones turning on at the same time causing minute rail to rail shorts, which could be at any frequency. Surely this causes wonderful things to happen inside the die, false triggering the brown out detect etc. - who knows?.

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

I once inherited a design where current consumption was intended to be extremely low (~=60uA), and draw varied by the amount of ambient light falling of the PCB! Ends up, an LED was tied to an open-drain output. When the LED was off (normal), light level hitting the LED would change the voltage across it to the OD output (which was also an input, not unusual in a uP), and take the pin through different areas of the linear region. The solution was to pull-up the pin, so it was at VDD when the LED was off (the LED didn't care)."

Q: Recently, I had some odd problems with our [PICs] not going into sleep mode--or so it appears. Instead of the usual 30-70 uA of current draw from the battery, I am seeing 1-2 mA. Or what is even more baffling, a drop to sleep followed by a single slow rise to about 600 uA followed by a fall back to normal sleep current.

A: Dwayne Reid (dwayner at planet.eon.net) of Trinity Electronics Systems Ltd, Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax says:

I've had similar problems.

One of them turned out to be the oscillator pins floating. I added a 10M resistor from ocs1 to gnd - problem gone.

The other was an input pin floating - solution was to make it an output during sleep.

Use a high impedance probe and look around while the PIC is asleep - keep an eye on the quiescent current each time you touch something. Even a 10M scope probe will bring an input LO - you might not even see that it was floating if the pin / trace capacitance is really lo. But your quiescent current will plummet if you hit the problem pin.

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 :D

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

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.

New Articles From Microcontroller Tips

Back
Top