
NUC126
Aug. 08, 2018
Page
251
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
ACMP0_P
ACMP0_N
ACMPO0
PCLK
1 2 3 4
1 2 3 4
1
Comparing Result
Comparing Result
1 2 3 4
Figure 6.5-4 Filter Function Example
6.5.5.4
Interrupt
The outputs of ACMP0 and ACMP1 are reflected at ACMPO0 (ACMP_STATUS[4]) and ACMPO1
(ACMP_STATUS[5]) respectively. Then they are processed by window latch and filter functions.
Finally, the output signal could be utilized to assert interrupts. If ACMPIE of ACMP_CTL0/1 register is
set to 1, the interrupt will be enabled. If the output state ACMPO0/1 is changed as the setting of
INTPOL (ACMP_CTL0/1[9:8]), the comparator interrupt will be asserted and the corresponding flag,
ACMPIF0 (ACMP_STATUS[0]) and ACMPIF1 (ACMP_STATUS[1]), will be set to 1. The interrupt flag
can be cleared to 0 by writing 1.
If ACMP wakeup function enabled and system wakeup from power down by ACMP with interrupt
enabled (ACMPIE), the WKIF (ACMP_STATUS[8], ACMP_STATUS[9]) will be set and cause interrupt
rising.
Figure 6.5-5 shows the interrups of ACMP is coming from ACMPIF or WKIF and enabled or disabled
by ACMPIE.
ACMPIF0 (ACMP_STATUS[0])
ACMPIE (ACMP_CTL0[1])
ACMPIF1 (ACMP_STATUS[1])
ACMPIE (ACMP_CTL1[1])
ACMP01_INT
WKIF0 (ACMP_STATUS[8])
WKIF1 (ACMP_STATUS[9])
Figure 6.5-5 Comparator Controller Interrupt
6.5.5.5
Comparator Reference Voltage (CRV)
The comparator reference voltage (CRV) module is responsible for generating reference voltage for
comparators. The CRV module consists of resistor ladder and analog switch. User can set the CRV
output voltage that is equal to CRV source voltage * (1/6+CRVCTL/24) by setting CRVCTL
(ACMP_VREF[3:0]). The CRV output voltage can be selected as the negative input of comparator by
setting NEGSEL (ACMP_CTL0[5:4], ACMP_CTL1[5:4]).
The resistor ladder will be disabled by hardware to reduce power consumption when NEGSEL
(ACMP_CTL0[5:4], ACMP_CTL1[5:4]) is not selected to CRV module. The reference voltage of
resistor ladder can be the voltage of AV
DD
pin or the INT_VREF voltage which is controlled by
SYS_VREFCTL register.