Datasheet
133
ATtiny828 [DATASHEET]
8371A–AVR–08/12
14. Analog Comparator
The analog comparator compares the input values on the positive pin (AIN0) and negative pin (AIN1). When the voltage
on AIN0 is higher than the voltage on 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 comparator output
rise, fall or toggle.
A block diagram of the comparator and its surrounding logic is shown in Figure 52.
Figure 52. Analog Comparator Block Diagram
Notes: 1. See Table 51 on page 149.
For pin placements, see Figure 1 on page 2.
The following options are available for positive input signals to the analog comparator:
z AIN0 pin
z Bandgap reference voltage
The following options are available for negative input signals to the analog comparator:
z AIN1 pin
z ADC multiplexer output
The ADC Power Reduction bit must be disabled in order to use the ADC input multiplexer. This is done by clearing the
PRADC bit in the Power Reduction Register. See “PRR – Power Reduction Register” on page 37 for more details.
HSEL
HLEV
AIN0
ACPMUX[2:0]
BANDGAP
REFERENCE
AIN1
ACNMUX[1:0]
ADC MUX
OUTPUT
VCC
ACD
ACIS1 ACIS0
ANALOG
COMPARATOR
IRQ
ACI
ACIC
ACO
TO T/C CAPTURE
TRIGGER MUX
ACIE