English
Language : 

LM3S9997 Datasheet, PDF (967/1218 Pages) Texas Instruments – Stellaris® LM3S9997 Microcontroller
Stellaris® LM3S9997 Microcontroller
21.3
Functional Description
The comparator compares the VIN- and VIN+ inputs to produce an output, VOUT.
VIN- < VIN+, VOUT = 1
VIN- > VIN+, VOUT = 0
As shown in Figure 21-2 on page 967, the input source for VIN- is an external input, Cn-. In addition
to an external input, Cn+, input sources for VIN+ can be the C0+ or an internal reference, VIREF.
Figure 21-2. Structure of Comparator Unit
- ve input
+ ve input 0
1
+ ve input (alternate)
2
reference input
CINV
output
IntGen
TrigGen
ACCTL
ACSTAT
21.3.1
A comparator is configured through two status/control registers, Analog Comparator Control
(ACCTL) and Analog Comparator Status (ACSTAT). The internal reference is configured through
one control register, Analog Comparator Reference Voltage Control (ACREFCTL). Interrupt
status and control are configured through three registers, Analog Comparator Masked Interrupt
Status (ACMIS), Analog Comparator Raw Interrupt Status (ACRIS), and Analog Comparator
Interrupt Enable (ACINTEN).
Typically, the comparator output is used internally to generate an interrupt as controlled by the ISEN
bit in the ACCTL register. The output may also be used to drive an external pin, Co or generate an
analog-to-digital converter (ADC) trigger.
Important: The ASRCP bits in the ACCTL register must be set before using the analog comparators.
Internal Reference Programming
The structure of the internal reference is shown in Figure 21-3 on page 968. The internal reference
is controlled by a single configuration register (ACREFCTL). Table 21-3 on page 968 shows the
programming options to develop specific internal reference values, to compare an external voltage
against a particular voltage generated internally (VIREF).
June 15, 2010
967
Texas Instruments-Advance Information