Datasheet
24.4.2. Analog Comparator 1 Control Register
Name: AC1CON
Offset: 0x95
Reset: 0x0
Property:
R/W
Bit 7 6 5 4 3 2 1 0
AC1EN AC1IE AC1IS[1:0] AC1ICE AC1M[2:0]
Access
Reset 0 0 0 0 0 0 0 0
Bit 7 – AC1EN: Analog Comparator 1 Enable Bit
Value Description
1 Enable the Analog Comparator 1.
0 Disable the Analog Comparator 1.
Bit 6 – AC1IE: Analog Comparator 1 Interrupt Enable bit
Value Description
1 Enable the Analog Comparator 1 interrupt.
0 Disable the Analog Comparator 1 interrupt.
Bits 5:4 – AC1IS[1:0]: Analog Comparator 1 Interrupt Select bit
These two bits determine the sensitivity of the interrupt trigger.
Value Description
00 Comparator Interrupt on output toggle
01 Reserved
10 Comparator interrupt on output falling edge
11 Comparator interrupt on output rising edge
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 output 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.
In case ICES1 bit is set high, the rising edge of 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.
Clear this bit to disable this function. In this case, no connection between the analog comparator and the
input capture function exists.
Bits 2:0 – AC1M[2:0]: Analog Comparator 1 Multiplexer register
These three bits determine the input of the negative input of the analog comparator.
Value Description
000 “VREF”/6.40
001 “VREF”/3.20
Atmel ATmega16M1/32M1/64M1 [DATASHEET]
Atmel-8209F-ATmega16M1/32M1/64M1_Datasheet_Complete-10/2016
340