3
\$\begingroup\$

There's plenty of information on what to do with unused IO-pins on a microcontroller. You can set them to a floating output, ground them, or pull them up to Vcc or down to ground. However I can't find any information on what to do with non-IO pins. Do the same rules apply to those, or can they simply be ignored when they're not being used?

EDIT: Sorry for being unspecific. The microcontroller I am using is a Microchip PIC18F4550, and it has a Vusb-pin (non-IO). I was looking for a general answer for how to treat non-IO pins, but I guess it's specific to the individual pins.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ What kind of pins are you talking about? The only examples I can think of would be power/ground (Vcc/Vgnd) and possible ADC Vref pins (although that could still be considered an input) \$\endgroup\$ Commented Apr 28, 2015 at 22:13
  • 1
    \$\begingroup\$ This depends on the microcontroller and the specific pins in question - look at the datasheet. In general, all power (Vcc/Vdd) and ground (Vss) pins must be connected unless stated otherwise in the datasheet. Pins marked "no connect" or "do not connect" must be left floating unless otherwise specified. \$\endgroup\$
    – DoxyLover
    Commented Apr 28, 2015 at 23:51
  • 1
    \$\begingroup\$ This question is complete nonsense as long as the OP does not specify what type of non-IO pins he is refering to. E.g. power supply pins: of course you have to connect them to Vcc/GND; reset pin: of course it has to be set inactive/pulled up/be connected to a reset source; XTAL pins: of course you have to connect a XTAL or a clock source unless the controller can run on an internal oscillator; what other non-IO pins are there? Very likely the same applies for them. \$\endgroup\$
    – Curd
    Commented Apr 29, 2015 at 7:28

5 Answers 5

2
\$\begingroup\$

The data sheet for your micro will have a brief pin description for all pins that will generally tell you what to do with it if is going to go unused. For example, if pin x is unused, connect to 100nf capacitor to ground.

\$\endgroup\$
1
\$\begingroup\$

This question seems to be a less specific version of What to do with unused analog inputs? An answer to that question suggests connected unused ADC inputs to a pull-down resistor. An Analog Devices page says to ground such pins. A TI app note for C2000 MCUs says to connect unused ADC inputs to the analog ground, and to ground reference voltage inputs if the ADC is totally unused. A Freescale app note likewise says to ground unused ADC pins.

You should always defer to your MCU's datasheet or reference guide, but it seems like the rule of thumb is to ground unused analog inputs.

\$\endgroup\$
1
\$\begingroup\$

How unused non-IO pins should be connected depends on their function. The only reliable way to find out is to read the datasheet.

For example, here is what the MSP430 F5 series User's Guide says:

Connection of Unused Pins

\$\endgroup\$
0
\$\begingroup\$

You specified that you use microcontroller. Use the microcontroler's datasheet. It is written there. For PIC uC it says to put them to output and connect them to VSS

Unused I/Os

Unused I/O pins should be configured as outputs and driven to a logic low state. Alternatively, connect a 1 kΩ to 10 kΩ resistor to VSS on unused pins and drive the output to logic low.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ OP asked about non-IO pins, not IO pins. \$\endgroup\$
    – DoxyLover
    Commented Apr 28, 2015 at 23:48
  • \$\begingroup\$ Can you give an example of pins that are neither power nor IO? \$\endgroup\$
    – captcha
    Commented Apr 29, 2015 at 3:50
  • 1
    \$\begingroup\$ @captcha Analog pins, pins dedicated to a particular hardware peripheral, test pins, mode selection pins, oscillator & clock & PLL related pins, not used pins (not bounded)... and so on. \$\endgroup\$
    – Lundin
    Commented Apr 29, 2015 at 9:42
-1
\$\begingroup\$

At least for AVR 8-bit micros I've read that unused IO pins should be set as input and set high (or low if your micro supports it) with the internal pull-up (or pull-down) resistor. This also minimises power consumption in sleep modes.

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.

http://www.atmel.com/Images/doc8267.pdf

\$\endgroup\$
3
  • 1
    \$\begingroup\$ OP asked about unused non-IO pins, not IO pins. \$\endgroup\$
    – DoxyLover
    Commented Apr 28, 2015 at 23:46
  • \$\begingroup\$ Can you give an example of pins that are neither power nor IO? \$\endgroup\$
    – captcha
    Commented Apr 29, 2015 at 3:50
  • 1
    \$\begingroup\$ @captcha Analog/reference pins, pins dedicated to a particular hardware peripheral, test pins, mode selection pins, oscillator & clock & PLL related pins, not used pins (not bounded)... and so on. \$\endgroup\$
    – Lundin
    Commented Apr 29, 2015 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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