ATMEGA128-16AU SL383 Atmel, ATMEGA128-16AU SL383 Datasheet - Page 227

no-image

ATMEGA128-16AU SL383

Manufacturer Part Number
ATMEGA128-16AU SL383
Description
Manufacturer
Atmel
Datasheet
Analog
Comparator
Special Function IO
Register – SFIOR
Analog Comparator
Control and Status
Register – ACSR
2467S–AVR–07/09
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’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
Figure 107. Analog Comparator Block Diagram
Notes:
• Bit 3 – 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 selects the negative input to the Analog Comparator. When this bit is written
logic zero, AIN1 is applied to the negative input of the Analog Comparator. For a detailed
description of this bit, see
• Bit 7 – ACD: Analog Comparator Disable
When this bit is written logic one, the power to the Analog Comparator is switched off. This bit
can be set at any time to turn off the Analog Comparator. This will reduce power consumption in
Active and Idle mode. When changing the ACD bit, the Analog Comparator Interrupt must be
Bit
Read/Write
Initial Value
Bit
Read/Write
Initial Value
ADC MULTIPLEXER
REFERENCE
1. See
2. Refer to
ACME
ADEN
BANDGAP
Figure
OUTPUT
TSM
R/W
7
0
ACD
R/W
Table 94 on page
7
0
1)
107.
ACBG
Figure 1 on page 2
ACBG
R/W
R
6
0
6
0
“Analog Comparator Multiplexed Input” on page
ACO
N/A
229.
R
R
5
5
0
and
R/W
ACI
4
0
Table 39 on page 81
R
4
0
ACIE
R/W
ACME
3
0
R/W
3
0
ACIC
R/W
2
0
PUD
R/W
2
0
for Analog Comparator pin placement.
ACIS1
R/W
PSR0
1
0
R/W
1
0
ACIS0
PSR321
R/W
ATmega128
0
0
R/W
228.
0
0
ACSR
SFIOR
227

Related parts for ATMEGA128-16AU SL383