![](http://datasheet.mmic.net.cn/Energy-Micro/EFM32TG840F16_datasheet_97240/EFM32TG840F16_431.png)
Preliminary
...the world's most energy friendly microcontrollers
2011-05-19 - d0034_Rev0.91
431
www.energymicro.com
Figure 26.2. OPAMP Overview
-
+
4
:1
4
:1
8
:1
OPA0TAP
NEXTOUT0
DAC0
3
:1
NEXTOUT0
VSS
OPA0
RESSEL [ 2:0]
RESINMUX[ 1:0]
alt ernat ive out put
POSSEL[ 2:0]
NEGSEL[ 1:0]
R
e
s
is
to
r
L
a
d
e
r
OUTPEN[ 3:0]
NEXTOUT0
POS0
NEG0
m ain out put
2:1
UG
OUTMODE[ 1]
PPEN
NPEN
OUTPEN[ 4]
ADC CH0
Input m ux
-
+
4
:1
4
:1
8
:1
OPA1TAP
NEXTOUT0
DAC1
3
:1
NEXTOUT0
VSS
OPA1
RESSEL [ 2:0]
RESINMUX[ 1:0]
alt ernat ive out put
POSSEL[ 2:0]
NEGSEL[ 1:0]
R
e
s
is
to
r
L
a
d
e
r
OUTPEN[ 3:0]
NEXTOUT1
POS1
NEG1
m ain out put
2:1
UG
OUTMODE[ 1]
PPEN
NPEN
OUTPEN[ 4]
ADC CH1
Input m ux
-
+
4
:1
4
:1
8
:1
OPA2TAP
OPA0TAP
NEXTOUT1
3
:1
NEXTOUT1
VSS
OPA2
RESSEL [ 2:0]
RESINMUX[ 1:0]
POSSEL[ 2:0]
NEGSEL[ 1:0]
R
e
s
is
to
r
L
a
d
e
r
OUTPEN[ 0]
POS2
NEG2
UG
OUTMODE
PPEN
NPEN
OUTPEN[ 1]
ADC CH0
Input m ux
ADC CH5
Input m ux
26.3.1 Opamp Configuration
Since two of the three opamps (OPA0, OPA1) are part of the DAC, the opamp configuration registers
are located in the DAC. The mux registers for OPA0/OPA1 together with OPA2 registers are separate
registers, also located under the DAC module. All three opamps can be enabled individually by setting
OPAxEN in DACn_OPACTRL.
26.3.1.1 Input Configuration
The inputs to the opamps are controlled through a set of input muxes. The mux connected to the
positive input is configured by the POSSEL bitfield in the DACn_OPAxMUX register. Similarly, the mux
connected to the negative input is configured by setting the NEGSEL bitfield in DACn_OPAxMUX.
To connect the pins to the input muxes, the pin switches must also be enabled. Setting the PPEN
bitfield enables to POSPADx, while setting the NPEN bitfield enables the NEGPADx, both located in
DACn_OPAxMUX. The input into the resistor ladder can be configured by setting the RESINMUX bitfield
in DACn_OPAxMUX.
26.3.1.2 Output Configuration
The outputs of the opamps are connected to switches making it possible to route the outputs to various
output destinations. There are two outputs from the opamp, a main output and an alternative output
with lower drive strength. The main output is connected directly to the DACx pin and can be turned
on by setting OUTMODE to MAIN in DACn_OPAxMUX. There are several alternative outputs that can
be driven from the opamp. These include the ADC, another opamp, and several alternative output
connections. These outputs can be driven by the alternative opamp output by setting OUTMODE to
ALT in DACn_OPAxMUX. The main opamp output can also be configured to drive the alternative output
together with the main output by setting OUTMODE to ALL in DACn_OPAxMUX. The alternative outputs
are controlled through switches. Setting NEXTOUT in DACn_OPAxMUX enables the output to the next
opamp (OPA1 for OPA0, and OPA2 for OPA1), while the alternative output locations can be individually
enabled by setting bits in OUTPEN in DACn_OPAxMUX.
The opamps can also be routed to the ADC. OPA0 can be connected to ADC CH0, OPA1 to ADC CH1
and OPA2 can be connected to both ADC CH1 and CH5. The ADC connections are created by routing