36.13.16 ADCCMPCON1 – ADC Digital Comparator 1 Control Register
This register controls the operation of Digital Comparator 1, including the generation of interrupts, comparison criteria to be used and provides status when a comparator event occurs.
| Name: | ADCCMPCON1 |
| Offset: | 0x1680 |
| Reset: | 0x00000000 |
| Property: | - |
| Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
| CVD_DATA[15:8] | |||||||||
| Access | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | |
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
| CVD_DATA[7:0] | |||||||||
| Access | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | |
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
| AINID[4:0] | |||||||||
| Access | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | R/HS/HC | ||||
| Reset | 0 | 0 | 0 | 0 | 0 | ||||
| Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| ENDCMP | DCMPGIEN | DCMPED | IEBTWN | IEHIHI | IEHILO | IELOHI | IELOLO | ||
| Access | R/W | R/W | R/HS/HC | R/W | R/W | R/W | R/W | R/W | |
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bits 31:16 – CVD_DATA[15:0] CVD Differential Output Data
In the CVD mode, this 16-bit field gets the CVD differential output data whenever a DCMPED interrupt is generated. The value in this field is ADCCON1.FRACT-compliant and always signed because it is the result of the subtraction between the CVD positive and negative measurements.
Bits 12:8 – AINID[4:0] Digital Comparator 1 Analog Input Identification (ID) bits
When a digital comparator event occurs (DCMPED = 1), these bits identify the analog input being monitored by Digital Comparator 1.
| Value | Description |
|---|---|
| 11111 | Reserved |
| ... | — |
| ... | — |
| ... | — |
| 01011 | AN11 is being monitored |
| ... | — |
| 01000 | AN8 is being monitored |
| 00111 | AN7 is being monitored |
| ... | — |
| 00001 | AN1 is being monitored |
| 00000 | AN0 is being monitored |
Bit 7 – ENDCMP Digital Comparator 1 Enable bit
| Value | Description |
|---|---|
| 1 | Digital Comparator 1 is enabled |
| 0 | Digital Comparator 1 is not enabled, and the DCMPED status bit (ADCCMPCON[5]) is cleared |
Bit 6 – DCMPGIEN Digital Comparator 1 Global Interrupt Enable bit
| Value | Description |
|---|---|
| 1 | A Digital Comparator 1 interrupt is generated when the DCMPED status bit (ADCCMPCON[5]) is set |
| 0 | A Digital Comparator 1 interrupt is disabled |
Bit 5 – DCMPED Digital Comparator 1 Output True Event Status bit
The logical conditions where the digital comparator becomes True are defined by the IEBTWN, IEHIHI, IEHILO, IELOHI and IELOLO bits.
0’).| Value | Description |
|---|---|
| 1 | Digital Comparator 1 output true event has occurred (output of comparator is
‘ |
| 0 | Digital Comparator 1 output is false (output of comparator is ‘ |
Bit 4 – IEBTWN Between Low/High Digital Comparator 1 Event bit
| Value | Description |
|---|---|
| 1 | Generate a digital comparator event when DATA[31:0] is less than DCMPHI[15:0] and greater than DCMPLO[15:0] |
| 0 | Do not generate a digital comparator event |
Bit 3 – IEHIHI High/High Digital Comparator 1 Event bit
| Value | Description |
|---|---|
| 1 | Generate a Digital Comparator 1 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 1 Event bit
| Value | Description |
|---|---|
| 1 | Generate a Digital Comparator 1 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 1 Event bit
| Value | Description |
|---|---|
| 1 | Generate a Digital Comparator 1 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 1 Event bit
| Value | Description |
|---|---|
| 1 | Generate a Digital Comparator 1 event when DATA[31:0] bits are less than DCMPLO[15:0] bits |
| 0 | Do not generate an event |
