Datasheet
197
7734Q–AVR–02/12
AT90PWM81/161
16.4.1 AC1CON - Analog Comparator 1 Control Register
• Bit 7– AC1EN: Analog Comparator 1 Enable Bit
Set this bit to enable the analog comparator 1.
Clear this bit to disable the analog comparator 1.
• Bit 6– AC1IE: Analog Comparator 1 Interrupt Enable bit
Set this bit to enable the analog comparator 1 interrupt.
Clear this bit to disable the analog comparator 1 interrupt.
• Bit 5, 4– AC1IS1, AC1IS0: Analog Comparator 1 Interrupt Select bit
These two bits determine the sensitivity of the interrupt trigger.
The different setting are shown in Table 16-1.
• Bit 3– Reserved
• Bit 2, 1, 0– AC1M2, AC1M1, AC1M0: Analog Comparator 1 Multiplexer register
These three bits determine the input of the negative input of the analog comparator.
The different settings are shown in Table 16-2.
Bit 7 6543210
AC1EN AC1IE AC1IS1 AC1IS0 - AC1M2 AC1M1 AC1M0 AC1CON
Read/Write R/W R/W R/W R R/W R/W R/W R/W
Initial Value 0 0 0 0 0 0 0 0
Table 16-1. Interrupt sensitivity selection.
AC1IS1 AC1IS0 Description
0 0 Comparator Interrupt on output toggle
01Reserved
1 0 Comparator interrupt on output falling edge
1 1 Comparator interrupt on output rising edge
Table 16-2. Analog Comparator 1 negative input selection.
AC1M2 AC1M1 AC1M0 Description
000“V
REF
”/6.40
001“V
REF
”/3.20
010“V
REF
”/2.13
011“V
REF
”/1.60
100Band gap voltage
101DAC result
110Analog comparator negative input (ACMPM1 pin)
111Analog comparator negative input (ACMPM pin)