Analog comparator, 1 analog comparator multiplexed input, Attiny43u – Rainbow Electronics ATtiny43U User Manual

Page 112

Advertising
background image

112

8048B–AVR–03/09

ATtiny43U

15. 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 inter-
rupt, 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 15-1 on page 112

.

Figure 15-1. Analog Comparator Block Diagram

Notes:

1. See

Table 15-1 on page 113

.

See

Figure 1-1 on page 2

and

Table 11-3 on page 70

for Analog Comparator pin placement.

The ADC Power Reduction bit, PRADC, must be disabled in order to use the ADC input multi-
plexer. This is done by clearing the PRADC bit in the Power Reduction Register, PRR. See

“PRR – Power Reduction Register” on page 35

for more details.

15.1

Analog Comparator Multiplexed Input

It is possible to select any of the ADC[3:0] pins to replace the negative input to the Analog Com-
parator. 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), MUX[1:0] in ADMUX
select the input pin to replace the negative input to the Analog Comparator, as shown in

Table

15-1

. If ACME is cleared or ADEN is set, AIN1 is applied to the negative input to the Analog

Comparator.

ACBG

BANDGAP

REFERENCE

ADC MULTIPLEXER

OUTPUT

ACME

ADEN

(1)

Advertising