8
\$\begingroup\$

There are microcontrollers (for example all the ATmega chips as far as I know) that allow ports to be set to "output", "input tristate" or "input internal pull-up resistor".

What are the advantages/disadvantages of either of those options in case of not connected pins? As I know, leaving them on output is the worst solution. The chips are shipped (I think) with all ports as input, tristate.

I'm asking specifically about the situation where those pins are not soldered anywhere. (or possibly soldered to ground, but the general case should be not soldered anywhere)

\$\endgroup\$
  • 1
    \$\begingroup\$ possible duplicate of General "rule of thumb" for unused IC pins \$\endgroup\$ – Leon Heller Dec 3 '12 at 9:51
  • \$\begingroup\$ @LeonHeller I don't think so, as that question includes (and has as its answer) that those pins should be soldered to ground, or have other external circuits added. My question specifically asks about the situation where no external connections exist and the pin is not soldered anywhere. Also, that question is exclusively about hardware. This question asks for a specific internal setting. \$\endgroup\$ – vsz Dec 3 '12 at 9:56
6
\$\begingroup\$

When you have a not connected pin, the first thing you need is to clamp it to a rail, either Vcc or ground. You need this because a floating state may cause an intermediate state in the input buffers, leading to static power absorption.

To force a level, you can either set the pin as output or input with internal pull-up. My measurements didn't show any difference in the power absorbed with the two solutions, but the manual (of a Jennic microcontroller) suggested to use the latter (input with pull-up). I'd say it's reasonable, because it uses a weaker pull-up than the output mode, and this may reduce leakage.

\$\endgroup\$
5
\$\begingroup\$

An old FPGA hack is to connect unused pins to the ground plane on the PCB, and configure them as outputs driving 0. This improved the ground connection, and reduced ground bounce from the outputs you were switching fast.

This certainly doesn't matter for low power micros like the AVRs, I would leave the pins unconnected, and configure them "input with pull-up" so that they aren't just left floating.

However it might become more important as we move towards near-GHz ARM chips for a dollar...

\$\endgroup\$
  • \$\begingroup\$ Very interesting the first paragraph about the ground connection! \$\endgroup\$ – clabacchio Dec 3 '12 at 18:34
  • \$\begingroup\$ Yeah but in a micro, it could raise the prospect of software-induced magic smoke! There's a bit more you can do in FPGA to make such failures less likely... \$\endgroup\$ – Brian Drummond Dec 3 '12 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.