33
\$\begingroup\$

This is somewhat similar to this question about NC pins. In cases where the datasheet doesn't specify what to do with unused IC pins, what is the recommendation to do with these pins? In particular I'm thinking of GPIO pins for the AT32UC3C microcontroller, but also more generally for other IC types (for example multi op-amp IC's).

I can think of a few possible combinations:

  1. Provide a solder pad/hole so the chip is secured but leave pin floating.
  2. Connect the pin to ground (possible through a resistor/capacitor/etc.)
  3. Connect the pin to a supply source
  4. Something I can't possibly think of
\$\endgroup\$
31
\$\begingroup\$
  1. "Provide a solder pad". Of course you will. All the IC's pins should be soldered. Always. Leaving it floating is NOT a good idea. It may change level all the time, which may have undesired effects to the internally connected circuitry. You always want to have predictive behavior. If the input has an internal pull-up resistor this is a good solution, though, as long as you don't forget to enable it.

  2. "Connect the pin to ground". That's a good solution, provided that you can guarantee that the pin will never become an output. Output high and you short-circuit the power supply. A resistor would prevent that, but that's an extra cost. Don't use a capacitor; it would leave the pin floating, and the microcontroller doesn't like the capacitive load in case it would become output.

  3. "Connect the pin to a supply source". Same as above: if the pin should become output low you'll have a short-circuit.

  4. "Leave unconnected, but make the pin output". That's the best solution. Don't use the possible alternate functions, like ADC or serial. A high level is preferred in case you forgot to switch off the internal pull-up resistors, which otherwise would cause a (small) leakage current.

For opamps the output can be left open, and the inputs to a fixed voltage, but not both to the same! I recently saw in a Linear Technology application note how they connected the non-inverting input to V+, the inverting input to V-. Szymon rightly points out that this can't be used if the inputs have clamping diodes.

The best thing to do with a surplus op-amp it is to use it. There are lots of places in an analog circuit where a buffer amplifier may improve performance - and a unity gain buffer uses no extra components. (from this article, linked to by Szymon)

| improve this answer | |
\$\endgroup\$
  • 3
    \$\begingroup\$ For unused opamps the recommended practice is making them into followers and connecting the input to a potential within the output voltage swing. pdfserv.maxim-ic.com/en/an/AN1957.pdf analog.com/static/imported-files/rarely_asked_questions/… \$\endgroup\$ – Szymon Bęczkowski Aug 12 '12 at 7:31
  • 1
    \$\begingroup\$ @Szymon - I saw that recently in a Linear Technology application note, unfortunately can't find it back right now. If I have to choose between advice from Maxim or Linear I go for Linear. \$\endgroup\$ – stevenvh Aug 12 '12 at 7:38
  • \$\begingroup\$ I guess this depends on the input/output stages of opamps. If the inputs are clamped you cannot use your solution. Also, did you notice link to AD in my comment? They give the same advice as Maxim. \$\endgroup\$ – Szymon Bęczkowski Aug 12 '12 at 7:55
  • \$\begingroup\$ @Szymon - Good point about the clamping, I updated my answer. Yes, I read the Analog article too, quote added to answer as well. :-). Thanks for the feedback. \$\endgroup\$ – stevenvh Aug 12 '12 at 8:07
11
\$\begingroup\$

I'll start by saying there is no right answer to this question. Usually the microcontroller manufacturer will have recommendations for each pin category. This is certainly the case for the MSP430 chips I've worked with where power consumption is a major consideration.

The problem you will encounter if you don't terminate GPIO is that the default state of the pins is often "input". Depending on the input circuit, this could cause your pins to float in at a non-digital value, and your IC's transistors will behave accordingly, drawing more static power than the would otherwise.

If the datasheet doesn't say anything it is likely that there is an app note from the manufacturer that discusses it. The closest thing I could find was one related to the XMega family (AVR1010) that states:

To minimize power consumption, enable pull-up or -down on all unused pins, and disable the digital input buffer on pins that are connected to analog sources.

If you search the interwebs on this topic, you'll find a lot of different opinions. The context of your chip matters a lot.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ +1 for clearly stating why setting (leaving) them as input is actually a problem (the usual "because it would let it floating" alone is too vague) \$\endgroup\$ – Sz. Dec 13 '15 at 18:19
8
\$\begingroup\$

For microcontrollers, generally the best idea is to make the pin an output and drive it either high or low (or pullup/pulldown can be used)
What you don't want is the floating halfway scenario where both the input transistors are half on and passing current.

For opamps, the general way is to connect the output to the inverting input, and then connect the non-inverting input to the supply midpoint (or somewhere between rails)
Basically you don't want the output to saturate, it should be somewhere within the output swing of the opamp.
Be careful with non-unity gain stable opamps though. In "specialised" cases the datasheet is likely to have a suggestion for what to do with any unused opamps.

| improve this answer | |
\$\endgroup\$

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