English
Language : 

PIC16LF18854 Datasheet, PDF (355/668 Pages) Microchip Technology – C Compiler Optimized RISC Architecture
PIC16(L)F18856/76
23.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 23.5.8 “Continuous Sampling Mode”)
is not enabled. This allows for a threshold comparison
on the average of a short burst of ADC samples.
23.5.6 LOWPASS FILTER MODE
The Lowpass 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 lowpass 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 23-3 for a more detailed
description of the mathematical operation). In this
mode, the ADCRS bits determine the cut-off frequency
of the lowpass filter (as demonstrated by Table 23-4).
23.5.7 THRESHOLD COMPARISON
At the end of each computation:
• The conversion results are latched and held
stable at the end-of-conversion.
• The difference value 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 23-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
• The threshold interrupt flag ADTIF is set when the
threshold condition is met.
Note 1: The threshold tests are signed
operations.
2: If ADAOV is set, a threshold interrupt is
signaled.
 2016 Microchip Technology Inc.
Preliminary
DS40001824A-page 355