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.
| Feature | AVR® AC | PIC32CM AC |
|---|---|---|
| Number of Comparators | One or more | 2–4 |
| Output on Pin | Supported | Supported |
| Input Selection |
Four positive Three negative Internal DACREF |
Four pins (positive/negative) Ground Band gap DAC AVDD scaler (64-level) |
| Internal Reference | Internal reference voltage generator (DACREF) | Band gap, DAC, AVDD scaler |
| Hysteresis | Selectable | Selectable |
| Output Inversion | Supported | Supported |
| Interrupt Generation |
Rising, falling, both edges Window function |
Rising, falling, toggle, end of comparison Window function |
| Window Mode | Yes (window function, window interrupts/events) | Yes (window function, window interrupts/events) |
| Event Generation | Comparator output, window function | Comparator output, window function (in/out) |
| Response Time | Selectable | Selectable |
| Digital Filter | N/A | Supported |
