5.4.3 Analog Comparator (AC)

Analog Comparators (AC) compare the voltage levels of two inputs and provide a digital output based on the comparison. Both AVR and PIC32CM ACs offer features suitable for zero-cross detection, threshold monitoring, and windowed analog signal analysis. Table 5-16 shows a comparison of features between the two.

Table 5-16. AVR® and PIC32CM AC Features
FeatureAVR® ACPIC32CM AC
Number of ComparatorsOne or more2–4
Output on PinSupportedSupported
Input Selection

Four positive

Three negative

Internal DACREF

Four pins (positive/negative)

Ground

Band gap

DAC

AVDD scaler (64-level)

Internal ReferenceInternal reference voltage generator (DACREF)Band gap, DAC, AVDD scaler
HysteresisSelectableSelectable
Output InversionSupportedSupported
Interrupt Generation

Rising, falling, both edges

Window function

Rising, falling, toggle, end of comparison

Window function

Window ModeYes (window function, window interrupts/events)Yes (window function, window interrupts/events)
Event GenerationComparator output, window functionComparator output, window function (in/out)
Response TimeSelectableSelectable
Digital FilterN/ASupported