Sujet : Re: ATmega328PB and ADC
De : pozzugno (at) *nospam* gmail.com (pozz)
Groupes : comp.arch.embeddedDate : 20. Nov 2024, 09:40:43
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vhk7aa$2fm1q$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
Il 13/11/2024 12:36, pozz ha scritto:
I couldn't understand if the first conversion after ADC is enabled (ADEN bit) must be discarded or not.
The datasheet suggests to discard the first conversion result after changing the reference signal, but nothing after enabling ADC or changing input signal (ADMUX).
The only note is about the conversion time that is longer for the first conversion after ADC is enabled.
I'm asking this question because I'm noting a different behaviour if I start conversion and enable ADC at the same time for each conversion against leaving ADC enabled and starting only the conversion (ADSC bit).
For the future readers, I found my issue. Occasionally I put the MCU in sleep mode after enabling ADC and starting conversion. Even if ADC clock still runs in this mode, the result is not good.