Datasheet
194
7734Q–AVR–02/12
AT90PWM81/161
16. Analog Comparator
The Analog Comparator compares the input values on the positive pin ACMPx and negative pin
ACMPM or ACMPMx.
16.1 Features
• Three analog comparators
• High speed analog comparators
• ±25mV or ±10mV or 0 hysteresis
• Four reference levels
• Generation of configurable interrupts
16.2 Overview
The AT90PWM81/161 features three fast analog comparators.
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.
Each comparator can trigger a separate interrupt, exclusive to the Analog Comparator. In addi-
tion, 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 comparators and their surrounding logic is shown in Figure 16-1 on page
195.