22. Analog Feature Considerations
22.1 Purpose
The ATmega16/32/64/M1/C1 features several analog features such as ADC, DAC, Amplifiers, Comparators...
The purpose of this section is to describe the interaction between these features. This section explains how to set the
specific registers to get the system running.
Particularly the different peripheral clocks can interfere together, so special care has to be considered.
22.2 Use of an Amplifier as Comparator Input
The internal amplifiers provide differential amplification for ADC converter. To allow signed result with the ADC, the output
level of the amplifiers is shifted up with a Vref/2 voltage.
For this reason, when used with a comparator, a Vref/2 voltage is added to the voltage of the amplifier outputs.
Figure 22-1. Amplifier and Comparator
Comparator
Clock
ACMPx
+
-
Amplifier
Clock
Analog Comparator
Output
AMPx
Analog Comparator
Negative Input
AMPx+
AMPx-
+
-
ACxEN
AMPCMPx
The amplifier clock comes from the ADC and is equal to the ADC Clock divided by 8.
22.3 Use of an Amplifier as Comparator Input and ADC Input
The amplifier can be used as ADC input while it is used as comparator input. In that case, each time the amplifier is selected
as ADC input, the sampling and hold circuit of the ADC loads the amplifier output. It results a decrease of the amplifier output
voltage which can toggle the comparator output.
ATmega16/32/64/M1/C1 [DATASHEET]
237
7647O–AVR–01/15