15.3 Functional Description
15.3.1 Response Time and Supply Current
Response time is the amount of time delay between a change at the comparator inputs and the comparator's reaction at the output.
The comparator response time may be configured in software via the CPMD field in the CMPnMD register. Selecting a longer response
time reduces the comparator supply current, while shorter response times require more supply current.
15.3.2 Hysteresis
The comparator hysteresis is software-programmable via its Comparator Control register CMPnCN. The user can program both the
amount of hysteresis voltage (referred to the input voltage) and the positive and negative-going symmetry of this hysteresis around the
threshold voltage.
The comparator hysteresis is programmable using the CPHYN and CPHYP fields in the Comparator Control Register CMPnCN. The
amount of negative hysteresis voltage is determined by the settings of the CPHYN bits. Settings of 20, 10, or 5 mV (nominal) of nega-
tive hysteresis can be programmed, or negative hysteresis can be disabled. In a similar way, the amount of positive hysteresis is deter-
mined by the setting the CPHYP bits.
CPn-
Positive programmable
hysteresis (CPHYP)
CPn+
Negative programmable
hysteresis (CPHYN)
CP0 (out)
Figure 15.2. Comparator Hysteresis Plot
15.3.3 Input Selection
Comparator inputs may be routed to port I/O pins or internal signals. When connected externally, the comparator inputs can be driven
from –0.25 V to (VDD) +0.25 V without damage or upset. The CMPnMX register selects the inputs for the associated comparator. The
CMXP field selects the comparator’s positive input (CPnP.x) and the CMXN field selects the comparator’s negative input (CPnN.x).
Note:
Any port pins selected as comparator inputs should be configured as analog inputs in their associated port configuration register,
and configured to be skipped by the crossbar.
EFM8SB2 Reference Manual
Comparators (CMP0 and CMP1)
silabs.com
| Smart. Connected. Energy-friendly.
Rev. 0.1 | 148