237
ATmega16M1/32M1/64M1 [DATASHEET]
8209E–AVR–11/2012
21.10.9
AMP1CSR – Amplifier 1 Control and Status register
Bit 7 – AMP1EN: Amplifier 1 Enable Bit
Set this bit to enable the Amplifier 1.
Clear this bit to disable the Amplifier 1.
Clearing this bit while a conversion is running will take effect at the end of the conversion.
Warning: Always clear AMP1TS0:1 when clearing AMP1EN.
Bit 6 – AMP1IS: Amplifier 1 Input Shunt
Set this bit to short-circuit the Amplifier 1 input.
Clear this bit to normally use the Amplifier 1.
Bit 5:4 – AMP1G[1:0]: Amplifier 1 Gain Selection Bits
These two bits determine the gain of the Amplifier 1.
To ensure an accurate result, after the gain value has been changed, the amplifier input needs to have a quite sta-
ble input value during at least four amplifier synchronization clock periods.
Bit 3 – AMPCMP1: Amplifier 1 - Comparator 1 connection
Set this bit to connect the amplifier 1 to the comparator 1 positive input. In this configuration the comparator clock
is adapted to the amplifier clock and AMP1TS2,AMP1TS1, AMP1TS0 bits have no effect.
Clear this bit to normally use the Amplifier 1.
Bit 2:0 – AMP1TS[2:0]: Amplifier 1 Clock Source Selection Bits
In accordance with the
Table 21-11, these three bits select the event which will generate the clock for the amplifier
1. This clock source is necessary to start the conversion on the amplified channel.
Bit
7
654
3
2
1
0
AMP1EN
AMP1IS
AMP1G1
AMP1G0
AMPCMP1
AMP1TS2
AMP1TS1
AMP1TS0
AMP1CSR
Read/write
R/W
Initial value
0
Table 21-10. Amplifier 1 gain selection.
AMP1G[1:0]
Description
00
Gain 5
01
Gain 10
10
Gain 20
11
Gain 40
Table 21-11. AMP1 clock source selection .
AMP1TS[2:0]
Clock source
000
ADC Clock/8
001
Timer/Counter0 compare match
010
Timer/Counter0 overflow
011
Timer/Counter1 compare Match B
100
Timer/Counter1 overflow