Prevent random analog inputs

Hi,

I want to know if exist a method to prevent a random number being generated from the analog pin.

Like a pull-down/up resistors that is used over the digital pins.

Thanks.

Sure, add external 20K pullup resistors to 5V so they read 1023 unless being driven.

Sure, add external 20K pullup resistors to 5V so they read 1023 unless being driven.

Or perhaps a high value resistor to ground so the value will be 0 when no external voltage is being applied.

Why are you reading an analog input pin with nothing wired to it? Why do you care what it's reading if it's not wired to anything? Explain your root problem and possible we can explore best solutions with you.

Lefty