38.11.18 ADCCMPCON2 – ADC Digital Comparator 2 Control Register

These registers control the operation of Digital Comparator 2, including the generation of interrupts and the comparison criteria to be used. This register also provides the status when a comparator event occurs.

Name: ADCCMPCON2
Offset: 0x1690
Reset: 0x00000000
Property: -

Bit 3130292827262524 
          
Access  
Reset  
Bit 2322212019181716 
          
Access  
Reset  
Bit 15141312111098 
    AINID[4:0] 
Access R/HS/HCR/HS/HCR/HS/HCR/HS/HCR/HS/HC 
Reset 00000 
Bit 76543210 
 ENDCMPDCMPGIENDCMPEDIEBTWNIEHIHIIEHILOIELOHIIELOLO 
Access R/WR/WR/HS/HCR/WR/WR/WR/WR/W 
Reset 00000000 

Bits 12:8 – AINID[4:0] Digital Comparator 2 Analog Input Identification (ID) bits

When a digital comparator event occurs (DCMPED = 1), these bits identify the analog input being monitored by the digital comparator.

Note: Only analog inputs [8:1] can be processed by the Digital Comparator module ‘x’ (‘x’ = 1-2).
ValueDescription
11111

Reserved

11110Reserved
...
...
...
00011Reserved
000111AN7 is being monitored
...
00001

AN1 is being monitored

00000AN0 is being monitored

Bit 7 – ENDCMP Digital Comparator 2 Enable bit

ValueDescription
1

Digital comparator 2 is enabled

0

Digital comparator 2 is not enabled, and the DCMPED status bit (ADCCMP0CON[5]) is cleared

Bit 6 – DCMPGIEN Digital Comparator 2 Global Interrupt Enable bit

ValueDescription
1Digital comparator 2 interrupt is generated when the DCMPED status bit (ADCCMP0CON[5]) is set
0

Digital comparator 2 interrupt is disabled

Bit 5 – DCMPED Digital Comparator 2 “Output True” Event Status bit

The logical conditions where the digital comparator gets “True” are defined by the IEBTWN, IEHIHI, IEHILO, IELOHI and IELOLO bits.

Note: This bit is cleared by reading the AINID[5:0] bits (ADCCMP0CON[13:8]) or by disabling the Digital Comparator module (by setting ENDCMP to ‘0’).
ValueDescription
1

Digital comparator 2 output true event has occurred (output of comparator is ‘1’)

0

Digital comparator 2 output is false (output of comparator is ‘0’)

Bit 4 – IEBTWN Between Low/High Digital Comparator 2 Event bit

ValueDescription
1

Generate a digital comparator event when DCMPLO[15:0] bits DATA[31:0] bits [DCMPHI[15:0] bits

0

Do not generate a digital comparator event

Bit 3 – IEHIHI High/High Digital Comparator 2 Event bit

ValueDescription
1

Generate a digital comparator 2 event when DCMPHI[15:0] bits are less than or equal to DATA[31:0] bits

0

Do not generate an event

Bit 2 – IEHILO High/Low Digital Comparator 2 Event bit

ValueDescription
1

Generate a digital comparator 2 event when DATA[31:0] bits are less than DCMPHI[15:0] bits

0

Do not generate an event

Bit 1 – IELOHI Low/High Digital Comparator 2 Event bit

ValueDescription
1

Generate a digital comparator 2 event when DCMPLO[15:0] bits are less than or equal to DATA[31:0] bits

0

Do not generate an event

Bit 0 – IELOLO Low/Low Digital Comparator 2 Event bit

ValueDescription
1

Generate a digital comparator 2 event when DATA[31:0] bits are less than DCMPLO[15:0] bits

0

Do not generate an event