246
ATmega16M1/32M1/64M1 [DATASHEET]
8209E–AVR–11/2012
23.4.2
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– AC1IS[1:0]: Analog Comparator 1 Interrupt Select bit
These two bits determine the sensitivity of the interrupt trigger.
Bit 3– AC1ICE: Analog Comparator 1 Interrupt Capture Enable bit
Set this bit to enable the input capture of the Timer/Counter1 on the analog comparator event. The comparator out-
put is in this case directly connected to the input capture front-end logic, making the comparator utilize the noise
canceler and edge select features of the Timer/Counter1 Input Capture interrupt. To make the comparator trigger
the Timer/Counter1 Input Capture interrupt, the ICIE1 bit in the Timer Interrupt Mask Register (TIMSK1) must be
set.
AC1O is the capture/trigger event of the Timer/Counter1, in case ICES1 is set to zero, it is the falling edge which is
taken into account.
Table 23-2.
Analog Comparator 0 negative input selection.
AC0M[2:0]
Description
000
“VREF”/6.40
001
“V
REF”/3.20
010
“VREF”/2.13
000
“VREF”/1.60
111
Bandgap (1.1V)
101
DAC result
110
Analog comparator negative input (ACMPM pin)
111
Reserved
Bit
7
654
3
2
1
0
AC1EN
AC1IE
AC1IS1
AC1IS0
AC1ICE
AC1M2
AC1M1
AC1M0
AC1CON
Read/write
R/W
Initial value
0
Table 23-3.
Interrupt sensitivity selection.
AC1IS[1:0]
Description
00
Comparator Interrupt on output toggle
01
Reserved
10
Comparator interrupt on output falling edge
11
Comparator interrupt on output rising edge