English
Language : 

LM3S6753 Datasheet, PDF (483/625 Pages) Texas Instruments – Stellaris LM3S6753 Microcontroller
Stellaris® LM3S6753 Microcontroller
Table 17-1. Internal Reference Voltage and ACREFCTL Field Values (continued)
ACREFCTL Register
EN Bit Value RNG Bit Value
EN=1
RNG=0
Output Reference Voltage Based on VREF Field Value
Total resistance in ladder is 31 R.
RNG=1
The range of internal reference in this mode is 0.85-2.448 V.
Total resistance in ladder is 23 R.
17.3
17.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.
1. Enable the analog comparator 0 clock by writing a value of 0x0010.0000 to the RCGC1 register
in the System Control module.
2. In the GPIO module, enable the GPIO port/pin associated with C0- as a GPIO input.
3. Configure the internal voltage reference to 1.65 V by writing the ACREFCTL register with the
value 0x0000.030C.
4. Configure comparator 0 to use the internal voltage reference and to not invert the output by
writing the ACCTL0 register with the value of 0x0000.040C.
5. Delay for some time.
6. Read the comparator output value by reading the ACSTAT0 register’s OVAL value.
Change the level of the signal input on C0- to see the OVAL value change.
Register Map
Table 17-2 on page 484 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.
April 05, 2010
483
Texas Instruments-Production Data