User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 732
www.energymicro.com
OPA OPA bitfields OPA Configuration
OPA2 NEGSEL OPATAP
OPA2 RESINMUX VSS, NEGPAD2
30.3.2.7 Two Opamp Differential Amplifier
This mode enables OPA0 and OPA1 or OPA1 and OPA2 to be internally configured to form a two opamp
differential amplifier as shown in Figure 30.8 (p. 732) . When using OPA0 and OPA1, the positive input
of OPA0 can be connected to any input by configuring the OPA0POSSEL bitfield in DACn_OPA0MUX.
The OPA0 feedback path must be configured to unity gain by setting the OPA0NEGSEL bitfield to UG in
DACn_OPA0MUX. In addition, the OPA0RESINMUX bitfield must be set to DISABLED. The OPA0OUT
must be connected to OPA1 by setting NEXTOUT in DACn_OPA0MUX, and OPA1RESINMUX to
OPA0INP. The positive input on OPA1 can be set by configuring OPA1POSSEL. The OPA1 output can
be configured by configuring the OUTPEN and OUTMODE bitfield.
When using OPA1 and OPA2, the positive input of OPA1 can be connected to any input by configuring
the OPA1POSSEL bitfield in DACn_OPA1MUX. The OPA1 feedback path must be configured to unity
gain by setting the OPA1NEGSEL bitfield to UG in DACn_OPA1MUX. In addition, the OPA1RESINMUX
bitfield must be set to DISABLED. The OPA1OUT must be connected to OPA2 by setting NEXTOUT
in DACn_OPA1MUX, and OPA2RESINMUX to OPA1INP. The positive input on OPA2 can be set
by configuring OPA2POSSEL. The OPA2 output can be configured by configuring the OUTPEN and
OUTMODE bitfield.
Note
When making a differential connection with the ADC, only OPA1 and OPA2 can be used
Figure 30.8. Two Op-amp Differential Amplifier Overview
R1
R2
V2
-
+
-
+
V1
VDIFF= (V2-V1)R2/R1
OPA0
OPA1
R1
R2
V2
-
+
-
+
V1
VDIFF= (V2-V1)R2/R1
OPA1
OPA2
Table 30.7. OPA0/OPA1 Differential Amplifier Configuration
OPA OPA bitfields OPA Configuration
OPA0 POSSEL POSPAD1, DAC1
OPA0 NEGSEL UG
OPA0 RESINMUX DISABLE
OPA0 NEXTOUT 1
OPA1 POSSEL POSPAD1
OPA1 NEGSEL OPATAP