English
Language : 

LM3S5D91 Datasheet, PDF (1060/1340 Pages) Texas Instruments – Stellaris® LM3S5D91 Microcontroller
Analog Comparators
In each range, the internal reference, VIREF, has 16 pre-programmed thresholds or step values. The
threshold to be used to compare the external input voltage against is selected using the VREF field
in the ACREFCTL register.
In the high-range mode, the VIREF threshold voltages start at the ideal high-range starting voltage
of VDDA/3.875 and increase in ideal constant voltage steps of VDDA/31.
In the low-range mode, the VIREF threshold voltages start at:0V and increase in ideal constant voltage
steps of VDDA/23. The ideal VIREF step voltages for each mode and their dependence on the RNG
and VREF fields are summarized in Table 19-3 on page 1060.
Table 19-3. Internal Reference Voltage and ACREFCTL Field Values
ACREFCTL Register
EN Bit
Value
RNG Bit Value Output Reference Voltage Based on VREF Field Value
EN=0
RNG=X
0 V (GND) for any value of VREF. It is recommended that RNG=1 and VREF=0 to minimize noise
on the reference ground.
RNG=0 Total resistance in ladder is 31 R.
VIREF = VDDA × RVREF
VIREF
VVIIRREEFF
=
==
VDDA
VVDDDDAA
×
××
RVRRTEF
R(VVRRRTEEFF
RT
+ 8)
EN=1
RNG=1
TTohteVVVVVVVVVVVVVVVVVVVVVVVValrIIIIIIIIIIIIIIIIIIIIIIIIarRRRRRRRRRRRRRRRRRRRRRRRRenEEEEEEEEEEEEsEEEEEEEEEEEEgiFFFFFFFFFFFFFFFFFFFFFFFFsetaonf========================cineteVVVVVVVVVVVVVVVVVVV000000000inrnDDDDDDDDDDDDDDDDDDD.........laaDDDDDDDDDDDDDDDDDDD888888111ldAAAAAAAAAAAAAAAAAAArd444555555eef×××××××××××××××××××e333r r++++++iseVVVVVRRRRRRRRR(((((×××n2VVVVVc000000RRRRR3VVVVVVVVVRRRRRRR2222eRRRRRVVVRRRRRRRRR......REEEEETTTTTTTTT3333iEEEEEEEEEEEEEEnRRR.111111FFFFFFFFFFFFFF333333FFFFFtEEEh000000111111iFFFs666666+++++mo××××××88888deVVVVVV)))))isRRRRRR0EEEEEE.8FFFFFF5-2.448 V.
VIREF = V0D.D1A4×3 V×R2VE3RFEF
VIREF = 0.143 ×2V3REF
VIREF = 0.143 × VREF
19.4
The range of internal reference for this mode is 0-2.152 V.
Initialization and Configuration
The following example shows how to configure an analog comparator to read back its output value
from an internal register.
1060
Texas Instruments-Production Data
January 22, 2012