39.1 Overview

The Analog Comparator (AC) supports two individual comparators: one shared (with built-in supply voltage monitor (MVREF)) AC_CMP1 and one dedicated AC_CMP0.

A continuous mode of operation on a shared comparator is supported only if MVREF is disabled: PMU.CLKCTRL.MVREFFSMEN bit = 0 (Disabled). Each comparator (COMP) compares the voltage levels on two inputs and provides a digital output based on the comparison. Each comparator may be configured to generate interrupt requests and/or peripheral events upon several different combinations of input change.

The input selection includes up to four shared analog port pins and several internal signals. Each Comparator Output state can also be output on a pin for use by external devices.

The comparators are grouped in pairs on each port. The AC peripheral implements a pair of comparators. These are called Comparator 0 (COMP0) and Comparator 1 (COMP1) . They have identical behaviors but separate Control registers. The pair can be set in Window mode to compare a signal to a voltage range instead of a single voltage level.

Note: MVREF will not be able to monitor the supply voltage for 275 μs from the time MCLR is released.