Analog input with INPUT_PULLUP

If I use pinMode(A1, INPUT_PULLUP) and then later pinMode(A1, INPUT) to use A1 as an analog input does this turn off the pullup (it doesn't seem to)?

If not, how can I turn off the pullup?

(Arduino IDE 1.8.5)

digitalWrite(A1, LOW);

BTW: the pinMode function does only set the digital direction. You can always use analogRead() without setting the pin to input with pinMode().

Aha, thanks, that works.

pylon:

digitalWrite(A1, LOW);

BTW: the pinMode function does only set the digital direction. You can always use analogRead() without setting the pin to input with pinMode().

On your BTW, if the pin was set as a digital output and then an analogRead would presumably read the actual output voltage of the pin. Or would it it set it as an input before the read?

The analogRead() function disconnects the digital section of the pin, and connects that pin to the analog to digital converter. However, the input pullup resistor is a completely separate function, and can interfere with ADC readings.

Yep, I got it, thanks.