See “amp1csr, See “amp1csr – amplifier 1 control, Table 22-9 – Rainbow Electronics ATmega64M1 User Manual
Page 250

250
8209A–AVR–08/09
ATmega16M1/32M1/64M1
22.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 2 bits determine the gain of the amplifier 1.
The different setting are shown in
.
To ensure an accurate result, after the gain value has been changed, the amplifier input needs
to have a quite stable input value during at least 4 Amplifier synchronization clock periods.
Table 22-9.
AMP0 Clock Source Selection
AMP0TS[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
101
PSC Module 0 Synchronization Signal (PSS0)
110
PSC Module 1 Synchronization Signal (PSS1)
111
PSC Module 2 Synchronization Signal (PSS2)
Bit
7
6
5
4
3
2
1
0
AMP1EN
AMP1IS
AMP1G1
AMP1G0
AMPCMP1
AMP1TS2
AMP1TS1
AMP1TS0
AMP1CSR
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
Table 22-10. Amplifier 1 Gain Selection
AMP1G[1:0]
Description
00
Gain 5
01
Gain 10
10
Gain 20
11
Gain 40