Datasheet

134
7701F–AVR–10/12
Atmel ATtiny24/44/84 [Preliminary]
17. Analog Comparator
The analog comparator compares the input values on the positive pin (AIN0) and negative pin
(AIN1). When the voltage on the positive pin (AIN0) is higher than the voltage on the negative
pin (AIN1), the analog comparator output (ACO) is set. The comparator can trigger a separate
interrupt, exclusive to the analog comparator. The user can select Interrupt triggering on com-
parator output rise, fall or toggle. A block diagram of the comparator and its surrounding logic
is shown in Figure 17-1 on page 134.
Figure 17-1. Analog Comparator Block Diagram
(1)
Notes: 1. See Table 17-1 on page 135.
2. See Figure 1-1 on page 2 and Table 12-9 on page 70 for Analog Comparator pin placement.
17.1 Analog Comparator Multiplexed Input
When the analog-to-digital converter (ADC) is configured as a single-ended input channel, it is
possible to select any of the ADC7..0 pins to replace the negative input to the analog compar-
ator. The ADC multiplexer is used to select this input, and, consequently, the ADC must be
switched off to utilize this feature. If the analog comparator multiplexer enable bit (ACME in
ADCSRB) is set and the ADC is switched off (ADEN in ADCSRA is zero), MUX1..0 in ADMUX
select the input pin to replace the negative input to the analog comparator, as shown in Table
17-1. If ACME is cleared or ADEN is set, AIN1 is applied to the negative input of the analog
comparator.
ACBG
BANDGAP
REFERENCE
ADC MULTIPLEXER
OUTPUT
ACME
ADEN
(1)