LM3S1138 Luminary Micro, Inc, LM3S1138 Datasheet - Page 415

no-image

LM3S1138

Manufacturer Part Number
LM3S1138
Description
Lm3s1138 Arm Microcontroller
Manufacturer
Luminary Micro, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
LM3S1138
Manufacturer:
DSP
Quantity:
490
Part Number:
LM3S1138-EQC50-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S1138-EQC50-A2T
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S1138-IBZ50-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S1138-IBZ50-A2T
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S1138-IQC50
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S1138-IQC50-A2
Manufacturer:
Texas Instruments
Quantity:
135
Part Number:
LM3S1138-IQC50-A2
Manufacturer:
TI/德州仪器
Quantity:
20 000
Part Number:
LM3S1138-IQC50-A2T
Manufacturer:
TI/德州仪器
Quantity:
20 000
16.3
16.4
July 26, 2008
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 416 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
LM3S1138 Microcontroller
415

Related parts for LM3S1138