![](http://datasheet.mmic.net.cn/90000/MEGA32M1-15AZ_datasheet_3507761/MEGA32M1-15AZ_268.png)
268
7647F–AVR–04/09
ATmega16/32/64/M1/C1
20.4.5
Analog Comparator Status Register – ACSR
Bit 7– AC3IF: Analog Comparator 3 Interrupt Flag Bit
This bit is set by hardware when comparator 3 output event triggers off the interrupt mode
defined by AC3IS1 and AC3IS0 bits in AC2CON register.
This bit is cleared by hardware when the corresponding interrupt vector is executed in case the
AC3IE in AC3CON register is set. Anyway, this bit is cleared by writing a logical one on it.
This bit can also be used to synchronize ADC or DAC conversions.
Bit 6– AC2IF: Analog Comparator 2 Interrupt Flag Bit
This bit is set by hardware when comparator 2 output event triggers off the interrupt mode
defined by AC2IS1 and AC2IS0 bits in AC2CON register.
This bit is cleared by hardware when the corresponding interrupt vector is executed in case the
AC2IE in AC2CON register is set. Anyway, this bit is cleared by writing a logical one on it.
This bit can also be used to synchronize ADC or DAC conversions.
Bit 5– AC1IF: Analog Comparator 1 Interrupt Flag Bit
This bit is set by hardware when comparator 1 output event triggers off the interrupt mode
defined by AC1IS1 and AC1IS0 bits in AC1CON register.
This bit is cleared by hardware when the corresponding interrupt vector is executed in case the
AC1IE in AC1CON register is set. Anyway, this bit is cleared by writing a logical one on it.
This bit can also be used to synchronize ADC or DAC conversions.
Bit 4– AC0IF: Analog Comparator 0 Interrupt Flag Bit
This bit is set by hardware when comparator 0 output event triggers off the interrupt mode
defined by AC0IS1 and AC0IS0 bits in AC0CON register.
This bit is cleared by hardware when the corresponding interrupt vector is executed in case the
AC0IE in AC0CON register is set. Anyway, this bit is cleared by writing a logical one on it.
This bit can also be used to synchronize ADC or DAC conversions.
Table 20-8.
Analog Comparator 3 negative input selection
AC3M2
AC3M1
AC3M0
Description
000“Vref”/6.40
001“Vref”/3.20
010“Vref”/2.13
011“Vref”/1.60
100Bandgap (1.1V)
101DAC result
110Analog Comparator Negative Input (ACMPM pin)
111Reserved
Bit
7
654
3
2
1
0
AC3IF
AC2IF
AC1IF
AC0IF
AC3O
AC2O
AC1O
AC0O
ACSR
Read/Write
R/W
R
Initial Value
0