I am wondering if unused I/O ports which are configured as inputs can be left floating, or should they be tied to the supply rail or ground?
admin's test signature
I'd set them for internal weak pull-up if the pin really is N.C
( no connection) but you don't want to set it up as an output.
Hi-z inputs are generally for external pull-up situations.
Agree to Jeff's answer!
The reason that you want to add the pull-up to the NC pin is to avoid that the input buffer is leaking internally.
If the pin is floating (TRI-stated) there will flow a small current internally in the gate, wich is highest when the level of the pin is somewhere in the middel between high and low level. So you should allways connect unused pins to limit the power consumption of the part.
Jacob L. Lassen,
Field Application Engineer, AVR products, Atmel
© 2020 Microchip Technology Inc.