243
AT90PWM216/316 [DATASHEET]
7710H–AVR–07/2013
20.10 Amplifier Control Registers
The configuration of the amplifiers are controlled via two dedicated registers AMP0CSR and AMP1CSR. Then the
start of conversion is done via the ADC control and status registers.
The conversion result is stored on ADCH and ADCL register which contain respectively the most significant bits
and the less significant bits.
20.10.1
Amplifier 0 Control and Status register – AMP0CSR
Bit 7 – AMP0EN: Amplifier 0 Enable Bit
Set this bit to enable the Amplifier 0.
Clear this bit to disable the Amplifier 0.
Clearing this bit while a conversion is running will take effect at the end of the conversion.
Warning: Always clear AMPnTS0:1 when clearing AMPxEN
Bit 6– AMP0IS: Amplifier 0 Input Shunt
Set this bit to short-circuit the Amplifier 0 input.
Clear this bit to normally use the Amplifier 0.
Bit 5, 4– AMP0G1, 0: Amplifier 0 Gain Selection Bits
These 2 bits determine the gain of the amplifier 0.
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 4 Amplifier synchronization clock periods.
Bit 1, 0– AMP0TS1, AMP0TS0: Amplifier 0 Trigger Source Selection Bits
In accordance with the
Table 20-9, these 2 bits select the event which will generate the trigger for the amplifier 0.
This trigger source is necessary to start the conversion on the amplified channel.
Bit
7
654
3
2
1
0
AMP0EN
AMP0IS
AMP0G1
AMP0G0
-
AMP0TS1
AMP0TS0
AMP0CSR
Read/Write
R/W
-
R/W
Initial Value
0
Table 20-8.
Amplifier 0 Gain Selection
AMP0G1
AMP0G0
Description
00
Gain 5
01
Gain 10
10
Gain 20
11
Gain 40
Table 20-9.
AMP0 Auto Trigger Source Selection
AMP0TS1
AMP0TS0
Description
0
Auto synchronization on ADC Clock/8
0
1
Trig on PSC0ASY
1
0
Trig on PSC1ASY
1
Trig on PSC2ASY