...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
672
www.silabs.com
Figure 26.2. 20 mV Hysteresis Selected
In
NEG
ACMPOUT wit h hyst eresis
In
NEG
+ 20m V
In
NEG
- 20m V
ACMPOUT wit hout hyst eresis
Tim e
In
POS
26.3.4 Input Selection
The POSSEL and NEGSEL fields in ACMPn_INPUTSEL controls which signals are connected to the
two inputs of the comparator. 8 external pins are available for both the negative and positive input. For
the negative input, 5 additional internal reference sources are available; 1.25 V bandgap, 2.5V bandgap,
DAC channel 0, DAC channel 1, and V
DD
. The V
DD
reference can be scaled by a configurable factor,
which is set in VDDLEVEL (in ACMPn_INPUTSEL) according to the following formula:
V
DD
Scaled
V
DD_SCALED
= V
DD
×VDDLEVEL/63
(26.1)
A low power reference mode can be enabled by setting the LPREF bit in ACMPn_INPUTSEL. In this
mode, the power consumption in the reference buffer (V
DD
and bandgap) is lowered at the cost of
accuracy. Low power mode will only save power if V
DD
with VDDLEVEL higher than 0 or a bandgap
reference is selected.
Normally the analog comparator input mux is disabled when the EN (in ACMPn_CTRL) bit is set low.
However if the MUXEN bit in ACMPn_CTRL is set, the mux is enabled regardless of the EN bit. This will
minimize kickback noise on the mux inputs when the EN bit is toggled.
26.3.5 Capacitive Sense Mode
The analog comparator includes specialized hardware for capacitive sensing of passive push buttons.
Such buttons are traces on PCB laid out in a way that creates a parasitic capacitor between the button
and the ground node. Because a human finger will have a small intrinsic capacitance to ground, the
capacitance of the button will increase when the button is touched. The capacitance is measured by
including the capacitor in a free-running RC oscillator (see Figure 26.3 (p. 673) ). The frequency
produced will decrease when the button is touched compared to when it is not touched. By measuring
the output frequency with a timer (e.g. through PRS), the change in capacitance can be calculated.
The analog comparator contains a complete feedback loop including an optional internal resistor.
This resistor is enabled by setting the CSRESEN bit in ACMPn_INPUTSEL. The resistance can be
set to one of four values by configuring the CSRESSEL bits in ACMPn_INPUTSEL. If the internal
resistor is not enabled, the circuit will be open. The capacitive sense mode is enabled by setting
the NEGSEL field in ACMPn_INPUTSEL to CAPSENSE. The input pin is selected through the
POSSEL bits in ACMPn_INPUTSEL. The scaled V
DD
in Figure 26.3 (p. 673) can be altered by
configuring the VDDLEVEL in ACMPn_INPUTSEL. It is recommended to set the hysteresis (HYSTSEL
in ACMPn_CTRL) higher than the lowest level when using the analog comparator in capacitive sense
mode.
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......