Connect with us

Pins with pullup resistors built in

Discussion in 'General Electronics Discussion' started by bigone5500, Aug 19, 2017.

Scroll to continue with content
  1. bigone5500

    bigone5500

    712
    120
    Apr 9, 2014
    On the 328P-PU, do all digital and analog pins have pullup resistors built in? If not, which pins do have them?
     
  2. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    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
     
  3. bigone5500

    bigone5500

    712
    120
    Apr 9, 2014
    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.
     
  4. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    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;)
     
  5. bigone5500

    bigone5500

    712
    120
    Apr 9, 2014
    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!!
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,385
    2,772
    Jan 21, 2010
    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.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-