English
Language : 

PIC18LF24K Datasheet, PDF (442/594 Pages) –
PIC18(L)F26/45/46K40
31.5.5 BURST AVERAGE MODE
The Burst Average mode (ADMD = 011) acts the same
as the Average mode in most respects. The one way it
differs is that it continuously retriggers ADC sampling
until the ADCNT value is greater than or equal to
ADRPT, even if Continuous Sampling mode (see
Section 31.5.8 “Continuous Sampling mode”) is not
enabled. This allows for a threshold comparison on the
average of a short burst of ADC samples.
31.5.6 LOW-PASS FILTER MODE
The Low-pass Filter mode (ADMD = 100) acts similarly
to the Average mode in how it handles samples
(accumulates samples until ADCNT value greater than
or equal to ADRPT, then triggers threshold
comparison), but instead of a simple average, it
performs a low-pass filter operation on all of the
samples, reducing the effect of high-frequency noise
on the average, then performs a threshold comparison
on the results. (see Table 31-3 for a more detailed
description of the mathematical operation). In this
mode, the ADCRS bits determine the cut-off frequency
of the low-pass filter (as demonstrated by Table 31-4).
31.5.7 THRESHOLD COMPARISON
At the end of each computation:
• The conversion results are latched and held
stable at the end-of-conversion.
• The error is calculated based on a difference
calculation which is selected by the
ADCALC<2:0> bits in the ADCON3 register. The
value can be one of the following calculations
(see Register 31-4 for more details):
- The first derivative of single measurements
- The CVD result in CVD mode
- The current result vs. a setpoint
- The current result vs. the filtered/average
result
- The first derivative of the filtered/average
value
- Filtered/average value vs. a setpoint
• The result of the calculation (ADERR) is
compared to the upper and lower thresholds,
ADUTH<ADUTHH:ADUTHL> and
ADLTH<ADLTHH:ADLTHL> registers, to set the
ADUTHR and ADLTHR flag bits. The threshold
logic is selected by ADTMD<2:0> bits in the
ADCON3 register. The threshold trigger option
can be one of the following:
- Never interrupt
- Error is less than lower threshold
- Error is greater than or equal to lower
threshold
- Error is between thresholds (inclusive)
- Error is outside of thresholds
- Error is less than or equal to upper threshold
- Error is greater than upper threshold
- Always interrupt regardless of threshold test
results
- If the threshold condition is met, the threshold
interrupt flag ADTIF is set.
Note 1: The threshold tests are signed
operations.
2: If ADAOV is set, a threshold interrupt is
signaled.
 2016 Microchip Technology Inc.
Preliminary
DS40001816C-page 442