atmega32u4-16mu ATMEL Corporation, atmega32u4-16mu Datasheet - Page 308

no-image

atmega32u4-16mu

Manufacturer Part Number
atmega32u4-16mu
Description
Atmega32u4 8-bit Avr Microcontroller With 32k Bytes Of Isp Flash And Usb Controller
Manufacturer
ATMEL Corporation
Datasheet
24. Analog Comparator
24.0.1
24.0.2
308
ATmega32U4
ADC Control and Status Register B – ADCSRB
Analog Comparator Control and Status Register – ACSR
The Analog Comparator compares the input values on the positive pin AIN+ and negative pin
AIN-. When the voltage on the positive pin AIN+ is higher than the voltage on the negative pin
AIN-, the Analog Comparator output, ACO, is set. The comparator’s output can be set to trigger
the Timer/Counter1 Input Capture function. In addition, 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
AIN+ can be connected either to the AIN0 (PE6) pin, or to the internal Bandgap reference. AIN-
can only be connected to the ADC multiplexer.
The Power Reduction ADC bit, PRADC, in
must be disabled by writing a logical zero to be able to use the ADC input MUX.
Figure 24-1. Analog Comparator Block Diagram
Notes:
• Bit 6 – ACME: Analog Comparator Multiplexer Enable
When this bit is written logic one and the ADC is switched off (ADEN in ADCSRA is zero), the
ADC multiplexer is connected to the negative input to the Analog Comparator. When this bit is
written logic zero, the Bandgap reference is connected to the negative input of the Analog Com-
parator
“Analog Comparator Multiplexed Input” on page
Bit
Read/Write
Initial Value
Bit
Read/Write
ADC MULTIPLEXER
(See “Internal Voltage Reference” on page
1. See
2. Refer to
Figure 24-1
REFERENCE
REFERENCE
ACME
ADEN
BANDGAP
BANDGAP
OUTPUT
pin placement.
7
R
0
7
ACD
R/W
Table 24-2 on page
(1)
ACBG
“Pinout ATmega32U4” on page 3
.
6
ACBG
R/W
6
ACME
R/W
0
5
ACO
R
AIN-
AIN+
5
R
0
310.
4
ACI
R/W
4
R
0
“Power Reduction Register 0 - PRR0” on page 43
3
ACIE
R/W
3
-
R
0
310.
(2)
and
53.). For a detailed description of this bit, see
Table 10-3 on page 70
2
ACIC
R/W
2
ADTS2
R/W
0
R/W
1
ACIS1
1
ADTS1
R/W
0
0
ACIS0
R/W
R/W
0
ADTS0
0
for Analog Comparator
ACSR
ADCSRB
7766A–AVR–03/08

Related parts for atmega32u4-16mu