English
Language : 

LM3S3749 Datasheet, PDF (724/898 Pages) Texas Instruments – Stellaris® LM3S3749 Microcontroller
Analog Comparators
17.3
Functional Description
Important: It is recommended that the Digital-Input enable (the GPIODEN bit in the GPIO module)
for the analog input pin be disabled to prevent excessive current draw from the I/O
pads.
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 17-2 on page 724, the input source for VIN- is an external input. In addition to
an external input, input sources for VIN+ can be the +ve input of comparator 0 or an internal reference.
Figure 17-2. Structure of Comparator Unit
- ve input
0
+ ve input
1
+ ve input (alternate)
2
reference input
CINV
output
IntGen
TrigGen
ACCTL
ACSTAT
A comparator is configured through two status/control registers (ACCTL and ACSTAT ). The internal
reference is configured through one control register (ACREFCTL). Interrupt status and control is
configured through three registers (ACMIS, ACRIS, and ACINTEN). The operating modes of the
comparators are shown in the Comparator Operating Mode tables.
Typically, the comparator output is used internally to generate controller interrupts. It may also be
used to drive an external pin or generate an analog-to-digital converter (ADC) trigger.
Important: The ASRCP bits in the ACCTLn register must be set before using the analog
comparators. The proper pad configuration for the comparator input and output pins
are described in the Comparator Operating Mode tables.
Table 17-2. Comparator 0 Operating Modes
ACCTL0
ASRCP
00
01
10
11
Comparator 0
VIN-
C0-
C0-
C0-
C0-
VIN+
C0+
C0+
Vref
reserved
Output
C0o
C0o
C0o
C0o
Interrupt
yes
yes
yes
yes
ADC Trigger
yes
yes
yes
yes
724
November 17, 2011
Texas Instruments-Production Data