Datasheet
24. AC – analog comparator
24.1. Features
• Four analog comparators
• High speed clocked comparators
• ±30mV hysteresis
• Four reference levels
• Generating configurable interrupts
24.2. Overview
The Atmel ATmega16M1/32M1/64M1 features four fast analog comparators. The Analog Comparator
compares the input values on the positive pin ACMPx and negative pin ACMPM or ACMPMx.
Each comparator has a dedicated input on the positive input, and the negative input of each comparator
can be configured as:
• a steady value among the four internal reference levels defined by the V
REF
selected thanks to the
REFS1:0 bits in ADMUX register
• a value generated from the internal DAC
• an external analog input ACMPMx
When the voltage on the positive ACMPn pin is higher than the voltage selected by the ACnM multiplexer
on the negative input, the Analog Comparator output, ACnO, is set.
The comparator is a clocked comparator. A new comparison is done on the falling edge of CLK
I/O
or
CLK
I/O
/2. Depending on ACCKDIV fit of ACSR register, see ACSR.
Each comparator can trigger a separate interrupt, exclusive to the Analog Comparator. In addition, the
user can select Interrupt triggering on comparator output rise, fall or toggle.
The interrupt flags can also be used to synchronize ADC or DAC conversions.
Moreover, the comparator’s output of the Comparator 1 can be set to trigger the Timer/Counter1 Input
Capture function.
A block diagram of the four comparators and their surrounding logic is shown below.
Atmel ATmega16M1/32M1/64M1 [DATASHEET]
Atmel-8209F-ATmega16M1/32M1/64M1_Datasheet_Complete-10/2016
336