Maker Pro
Maker Pro

Pins with pullup resistors built in

The answer to your question is "hidden" on the AVR datasheet on chapter 14 (page 75).

Why on earth do you think an analog input should have a pullup resistor?o_O
 
The answer to your question is "hidden" on the AVR datasheet on chapter 14 (page 75).

Why on earth do you think an analog input should have a pullup resistor?o_O
Because I am new to this???

And I have looked at the datasheet on the chip. Didn't really know what I was looking at, hence this question.

Thanks though.
 
O.K
The term pull-up(down) resistor is a term coined in the digital world.

It is related to the inputs of digital circuits-in which we would want to decide the input logic state of an un-used input as well as a default logic state for a used input(weak pull).

It is also related to the outputs of digital circuits in devices(sometimes used for wired-or/and) which have open-collector(drain),open-emitter(source),
as well as devices with Tri-State ,the state the output isn't driven(buses etc.)

The term pull-up(down) resistor is meaningless in the analog circuit world.

Hope this helps clarify things;)
 
X-IV!

I did follow the link above and carefully read through a couple pages on the digital pins. I finally saw what you referenced.

Thanks!!
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
In the PIC environment, making a pin an analog input disables the input buffer, so the setting of a weak pull-up is mooted.

However, it appears that atmel don't follow the same strategy because there is a warning that setting weak pull-up on a pin set for analog input will affect the values reported by analogread.

I would recommend a deep read of the datasheet(s). I have read the datasheet again, and while I can see that the pull-up can be functional on an analog input pin, I didn't find the warning. However I did find people using this feature to read light levels using an LDR (where the weak pull-up forms the upper part of a voltage divider).

Note that this doesn't detract from anything @dorke has said. However, it also doesn't mean that you can't think up a situation in which this pull-up could be used for some purpose in conjunction with analogread.
 
Top