SLAU723A October 2017 – October 2018 MSP432E401Y , MSP432E411Y
The comparator compares the VIN– and VIN+ inputs to produce an output, VOUT.
VIN– < VIN+, VOUT = 1 VIN– > VIN+, VOUT = 0
As shown in Figure 12-2, the input source for VIN– is an external input, Cn–, where n is the analog comparator number. In addition to an external input, Cn+, input sources for VIN+ can be the C0+ or an internal reference, VIREF.
A comparator is configured through two status and control registers, Analog Comparator Control (ACCTL) and Analog Comparator Status (ACSTAT). The internal reference is configured through one control register, Analog Comparator Reference Voltage Control (ACREFCTL). Interrupt status and control are configured through three registers, Analog Comparator Masked Interrupt Status (ACMIS), Analog Comparator Raw Interrupt Status (ACRIS), and Analog Comparator Interrupt Enable (ACINTEN).
Typically, the comparator output is used internally to generate an interrupt as controlled by the ISEN bit in the ACCTL register. The output may also be used to drive one of the external pins (Cno), or generate an analog-to-digital converter (ADC) trigger.
NOTE
The ASRCP bits in the ACCTL register must be set before using the analog comparators.