User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 733
www.energymicro.com
OPA OPA bitfields OPA Configuration
OPA1 RESINMUX OPA1INP
Table 30.8. OPA1/OPA2 Differential Amplifier Configuration
OPA OPA bitfields OPA Configuration
OPA1 POSSEL POSPAD1, DAC1
OPA1 NEGSEL UG
OPA1 RESINMUX DISABLE
OPA1 NEXTOUT 1
OPA2 POSSEL POSPAD1
OPA2 NEGSEL OPATAP
OPA2 RESINMUX OPA1INP
30.3.2.8 Three Opamp Differential Amplifier
This mode enables the three opamps to be internally configured to form a three opamp differential
amplifier as shown in Figure 30.9 (p. 733) . Both OPA0 and OPA1 can be configured in the same
unity gain mode. For both OPA0/OPA1 the positive input can be connected to any input by configuring
the OPA0POSSEL/OPA1POSSEL bitfield. The OPA0/OPA1 feedback path must be configured to unity
gain by setting the OPA0NEGSEL/OPA1NEGSEL bitfield to UG. In addition the OPA0RESINMUX/
OPA1RESINMUX bitfields must be set to DISABLED. The OPA1 output must be connected to
OPA2 by setting the NEXTOUT bitfield in DACn_OPA1MUX and OPA2RESINMUX to OPA1INP in
DACn_OPA2MUX. In addition the OPA2POSSEL must be set to 0PATAP. The OPA2 output can be
configured by configuring the OUTPEN and OUTMODE bitfield.
Figure 30.9. Three Op-amp Differential Amplifier Overview
R1
R2
V2
-
+
VOUT
VOUT= (V2-V1)R2/R1
R1
R2
-
+
-
+
V1
OPA1
OPA0
OPA2
The gain values for the Three Opamp Differential Amplifier is determined by the combination of the gain
settings of OPA0 and OPA2. The 3 different gainvalues available, 1/3, 1 and 3, can be programmed
as shown in the table below.
Table 30.9. Three Opamp Differential Amplifier Gain Programming
Gain OPA0 RESSEL OPA2 RESSEL
1/3 4 0
1 1 1
3 0 4