Go Down

Topic: How to prevent Nano A6 and A7 from floating (Read 143 times) previous topic - next topic


We are taught not to leave CMOS inputs floating, and I've seen videos showing considerable power savings by intializing all of the digital I/O pins so they are at one rail or the other.  And I assume that works for A0-A5 as well in digital mode.  But what about the Nano's A6 and A7?  Will they also consume current if left floating?  I've burned the "bare minimum" sketch to my Nano, and the those pins are indeed floating, as are all the others except D0, D1 and D13.

So, short of adding externai pullup or pulldown resistors, is there any way to get A6 and A7 to a rail?  Or instead of resistors, could they just be tied directly to ground or Vcc if they won't be used?  Or tied to A5?


You can enable the internal pull-ups on analog pins.  You could also hard-wire unused input pins to +5V (or to ground) or you can wire them all together to a single pull-up resistor.   Or, you can program those pins as (digital) outputs and write them high or low.

Will they also consume current if left floating?
I don't know but I'm betting you can't measure the difference.   I know it's "bad practice" to leave inputs floating but with a microcontroller where the software is totally ignoring certain pins, I've never even thought about it.


A6 and A7 on the Nano do not have pullups.  They are inputs to the analog mux only.  No digital hardware on those pins.  If I were worried about power I would just tie them low with a high value resistor.


And since they do not have digital hardware, they will also not consume extra current when floating in "mid-range".  :smiley-lol:

Go Up