LM3S6918 Luminary Micro, Inc, LM3S6918 Datasheet - Page 460

no-image

LM3S6918

Manufacturer Part Number
LM3S6918
Description
Lm3s6918 Arm Microcontroller
Manufacturer
Luminary Micro, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
LM3S6918-EQC50-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S6918-EQC50-A2
Manufacturer:
TI/德州仪器
Quantity:
20 000
Part Number:
LM3S6918-EQC50-A2T
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S6918-IBZ50-A2
Manufacturer:
TI
Quantity:
218
Part Number:
LM3S6918-IBZ50-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S6918-IBZ50-A2T
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S6918-IQC50-A2
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S6918-IQC50-A2
Manufacturer:
TI/德州仪器
Quantity:
20 000
Analog Comparators
17.3
17.4
460
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 17-4 on page 461 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 26, 2008

Related parts for LM3S6918