Is there a way to use an ADC pin with internal pull up enabled? I am using ATmega169PV.
If everything seems to be coming onto your way, then you are probably driving on a wrong lane..
You can't. Why would you want to?
Leon Heller G1HSM
Sensing a 300mV AC signal, need to bias to midway of ADC, missed putting a resistor on the PCB :(
You'll have to add the resistor, somehow. If it's only 300 mV, you probably need to amplify it, anyway.
Do the new V or P series disallow this somehow? I wouldn't think so, but I don't think I ever tried to use the feature on those. Now I'd also have to check if the pullup has an effect if DIDRx is set--I'd think not.
So it might be true for some generations, but certainly not for all AVR models.
Where we use the feature, it is for coarse measurements and the pullup value from chip to chip and batch to batch was "close enough". You'd have to calibrate if you needed accuracy. I wouldn't think the effective value would drift over time, temperature, and Vcc level but it might.
You can put lipstick on a pig, but it is still a pig.
I've never met a pig I didn't like, as long as you have some salt and pepper.
Except in the case of a dedicated ADC pin, which cannot be configured as a GPIO. There is nothing that says you can't use the internal pull-up. The ADC pins are just GPIO's that are set as inputs. In fact you can read the ADC value of the pin, even if it is configured as an output. Now if you set the PUD bit, then indeed you can't use the internal pull-ups.
Writing code is like having sex.... make one little mistake, and you're supporting it for life.
Hmmm, interesting answers, I've never tried to read an multiplexed ADC pin which is configured as an input pulled up. Interesting exercise.
I agree with the fact that strength of internal pullup varies across chips and production batches. Missed out in layout having a resistor tied to ADC pin and Vcc, and now suffering with PCB :(
© 2020 Microchip Technology Inc.