Unused pins?


Senior Member
Is there a recommendation of what to do programmatically with unused pins? I have a 20X2 that's pretty much only using hserial and I2C.


Well-known member
I don't think so. All the pins on a 20X2 are automatically configured as inputs unless programed otherwise, so you shouldn't have to worry about them

This isn't like CMOS where you have to ground all the unused pins.


Senior Member

Generally, it's recommended NOT to connect unused I/O pins to anything (or to each other) in case any get "accidentally" set as outputs by the program.

However, for Very Low Power (e.g. sleep) applications there is a small risk that a floating digital input may "leak" more current (between supply and ground rails) than if it is tied to a legitimate digital level (0 or 1). In this case, activating the Weak Pullup Resistors (all M2s and some X2s) is the best solution, or consider disabling the Digital Inputs by configuring the pins as ADC inputs or as Outputs (and accepting the obvious risks).

Cheers, Alan.