LM3S2139 Luminary Micro, Inc, LM3S2139 Datasheet - Page 432

no-image

LM3S2139

Manufacturer Part Number
LM3S2139
Description
Lm3s2139 Arm Microcontroller
Manufacturer
Luminary Micro, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
LM3S2139-EQC25-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S2139-EQC25-A2T
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S2139-IBZ25-A2
Manufacturer:
Intersil
Quantity:
85
Part Number:
LM3S2139-IBZ25-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S2139-IBZ25-A2T
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S2139-IQC25-A2
Manufacturer:
SMSC
Quantity:
1 001
Part Number:
LM3S2139-IQC25-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S2139-IQC25-A2T
Manufacturer:
FREESCALE
Quantity:
23
Analog Comparators
16.3
16.4
432
Initialization and Configuration
The following example shows how to configure an analog comparator to read back its output value
from an internal register.
1.
2.
3.
4.
5.
6.
Change the level of the signal input on C0- to see the OVAL value change.
Register Map
Table 16-5 on page 433 lists the comparator registers. The offset listed is a hexadecimal increment
to the register’s address, relative to the Analog Comparator base address of 0x4003.C000.
ACREFCTL Register
EN Bit Value
EN=1
Enable the analog comparator 0 clock by writing a value of 0x0010.0000 to the RCGC1 register
in the System Control module.
In the GPIO module, enable the GPIO port/pin associated with C0- as a GPIO input.
Configure the internal voltage reference to 1.65 V by writing the ACREFCTL register with the
value 0x0000.030C.
Configure comparator 0 to use the internal voltage reference and to not invert the output on the
C0o pin by writing the ACCTL0 register with the value of 0x0000.040C.
Delay for some time.
Read the comparator output value by reading the ACSTAT0 register’s OVAL value.
RNG Bit Value
RNG=0
RNG=1
Output Reference Voltage Based on VREF Field Value
Total resistance in ladder is 31 R.
The range of internal reference in this mode is 0.85-2.448 V.
Total resistance in ladder is 23 R.
The range of internal reference for this mode is 0-2.152 V.
Preliminary
July 25, 2008

Related parts for LM3S2139