32.2.2 Completion of a Conversion

When any individual conversion is complete, the value already in ADRES is written into 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 ADACC

After every conversion when ADDSEN = 0, or after every other conversion when ADDSEN = 1, the following events occur:

  • 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 will check ADTIF before reading filter and threshold results.