33.2.2 Completion of a Conversion
When any individual conversion is complete, the value already in ADRES33.7.15 ADRES is written into ADPREV33.7.16 ADPREV (if ADPSIS = 0) and the new conversion results appear in ADRES. When the conversion completes, the ADC module will:
- Clear the ADGO bit (unless the ADCONT bit is set)
- Set the ADIF Interrupt Flag bit
- Set the ADMATH bit
- Update ADACC33.7.17 ADACC
After every conversion when ADDSEN = 0, or after every other conversion when ADDSEN = 1, the following events occur:
- ADERR33.7.19 ADERR is calculated
- ADTIF interrupt is set if ADERR calculation meets threshold comparison
Important: Filter and threshold computations occur after the conversion itself is
complete. As such, interrupt handlers responding to ADIF should check ADTIF before reading
filter and threshold results.