does Arduino Mega2560 (based on ATMega 2560) has an input pull-up on analog inputs? Can I set the input pull-up as usual by software?
The reason is that I need to use the analog pins as extra digital inputs.
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
A pull up makes no sense on an analog input.
The Atmega 2560 datasheet ADC section(page 268) makes no mention of pull ups on the analog inputs.
The digital section (page 67) shows the switchable pull ups.
The internal pull-up resistors on analog inputs are mentioned in a tutorial:
The following tutorials use this in their sketches:
Typically "pull-up" is a function used for binary inputs (either high or low). It is not clear why one would even need "pull-up" in an an analog input? If you did need some sort of pull-up, it would be arranged externally since there is no way of offering a pull-up internally that would be appropriate for all analog sources.