3

Possible Duplicate:
Is it really a bad idea to leave an MCU input pin floating?

I am using a pic microcontroller that has about 36 GPIO pins, I am only using 31 of them, is it ok to have the ones that I don't use just floating or do I have to connect them to Vdd or Vcc

  • datasheet link? But almost any modern uP is cool with floating pins as long as you're not expecting them to float to any particular voltage. – NickHalden Nov 17 '12 at 01:06
  • @apalopohapa I agree on one hand, and on the other that question has a very poor answer in my opinion, that is from our chiphacker.com days. – Kortuk Nov 17 '12 at 07:13

2 Answers2

6

Floating pins can cause high power consumption. Microchip recommends making unused pins outputs and setting them low.

Leon Heller
  • 38,774
  • 2
  • 60
  • 96
5

Not all IO pin architectures are the same. In fact, they are usually more different than one would expect. Usually either High-Z(floating) or Open Drain Low will yield the lowest power consumption, as documented in the datasheet or references for the part. On some devices not even all the IOs will have the same architecture so it is even possible that some unused pins should be left floating while others should be driven low or even configured for use by a certain peripheral for minimum consumption.
In some applications, other parameters may matter more than low power consumption, like ESD tolerance or handling ruggedness. Again, the answers may be different part to part and pin to pin and requirements should be considered.
In short, best not to make assumptions about black box systems. Look it up, take measurements, or contact a support engineer.

David Perek
  • 316
  • 1
  • 3