ACMP CTRL addressOffset = 0x000

This register enables the comparator, configures the interrupts, and controls the input multiplexers on both sides of the comparator. All bits not shown in ACMP registerName = CTRL addressOffset = 0x000 are reserved and should be written as 0.

Table 1. ACMP registerName = CTRL addressOffset = 0x000
Bit Symbol Value Description Reset value
2:0 -   Reserved. Write as 0. 0
4:3 EDGESEL   This field controls which edges on the comparator output set the COMPEDGE bit (bit 23 below): 0
    0x0 Falling edges  
    0x1 Rising edges  
    0x2 Both edges  
    0x3 Both edges  
5 -   Reserved. Write as 0. 0
6 COMPSA   Comparator output control 0
    0 Comparator output is used directly.  
    1 Comparator output is synchronized to the bus clock for output to other modules.  
7 -   Reserved. Write as 0. 0
10:8 COMP_VP_SEL   Selects positive voltage input 0
    0x0 Voltage ladder output  
    0x1 ACMP_I1  
    0x2 ACMP_I2  
    0x3 Reserved  
    0x4 Reserved  
    0x5 Reserved  
    0x6 Internal reference voltage (bandgap)  
    0x7 Reserved  
13:11 COMP_VM_SEL   Selects negative voltage input 0
    0x0 Voltage ladder output  
    0x1 ACMP_I1  
    0x2 ACMP_I2  
    0x3 Reserved  
    0x4 Reserved  
    0x5 Reserved  
    0x6 Internal reference voltage (bandgap)  
    0x7 Reserved  
19:14 -   Reserved. Write as 0. 0
20 EDGECLR   Interrupt clear bit. To clear the COMPEDGE bit and thus negate the interrupt request, toggle the EDGECLR bit by first writing a 1 and then a 0. 0
21 COMPSTAT   Comparator status. This bit reflects the state of the comparator output. 0
22 -   Reserved. Write as 0. 0
23 COMPEDGE   Comparator edge-detect status. 0
24 -   Reserved. Write as 0. 0
26:25 HYS   Controls the hysteresis of the comparator. When the comparator is outputting a certain state, this is the difference between the selected signals, in the opposite direction from the state being output, that will switch the output. 0
    0x0 None (the output will switch as the voltages cross)  
    0x1 5 mV  
    0x2 10 mV  
    0x3 20 mV  
31:27 -   Reserved -

-->