Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
БЭМЗ полищук доки / Склад / Datasheet_LM3S6965.pdf
Скачиваний:
10
Добавлен:
21.12.2020
Размер:
6.13 Mб
Скачать

Analog Comparators

17.1Block Diagram

Figure 17-1. Analog Comparator Module Block Diagram

C1-

-ve input

Comparator 1

 

 

 

 

C1+

+ve input

output

<none>

 

 

 

 

 

+ve input (alternate)

 

 

ACCTL1

trigger

trigger

 

ACSTAT1

interrupt

 

 

 

 

 

reference input

 

C0-

-ve input

Comparator 0

 

 

 

 

C0+

+ve input

output

C0o

 

 

 

 

 

 

+ve input (alternate)

 

 

ACCTL0

trigger

trigger

 

ACSTAT0

interrupt

 

 

reference input

 

 

 

 

 

Voltage

 

Interrupt Control

 

Ref

 

 

 

 

 

ACRIS

internal

ACREFCTL

 

ACMIS

bus

 

 

 

 

 

 

 

 

ACINTEN

 

 

 

interrupt

17.2Functional 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 VINand VIN+ inputs to produce an output, VOUT.

VIN- < VIN+, VOUT = 1

VIN- > VIN+, VOUT = 0

As shown in Figure 17-2 on page 475, the input source for VINis an external input. In addition to anexternalinput,inputsourcesforVIN+canbethe+veinputofcomparator0oraninternalreference.

474

November 16, 2008

Preliminary

LM3S6965 Microcontroller

Figure 17-2. Structure of Comparator Unit

- ve input +ve input

+ ve input (alternate)

reference input

0

output

1

CINV

 

IntGen

2

TrigGen

ACCTL

ACSTAT

internal bus

trigger interrupt

Acomparatorisconfiguredthroughtwostatus/controlregisters(ACCTL and ACSTAT ). Theinternal reference is configured through one control register (ACREFCTL). Interrupt status and control is configured through three registers (ACMIS, ACRIS, and ACINTEN).

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.

17.2.1Internal Reference Programming

The structure of the internal reference is shown in Figure 17-3 on page 475. This is controlled by a singleconfigurationregister(ACREFCTL). Table17-1onpage475showstheprogrammingoptions to develop specific internal reference values, to compare an external voltage against a particular voltage generated internally.

Figure 17-3. Comparator Internal Reference Structure

AVDD

 

 

 

8R

 

 

 

 

8R

R

R

R

 

 

 

•••

 

 

EN

15

14

1

0

 

 

 

•••

 

internal

VREF

 

Decoder

 

reference

 

 

 

RNG

 

 

 

 

Table 17-1. Internal Reference Voltage and ACREFCTL Field Values

ACREFCTL Register

Output Reference Voltage Based on VREF Field Value

EN Bit Value RNG Bit Value

 

EN=0

RNG=X

0 V (GND) for any value of VREF; however, it is recommended that RNG=1 and VREF=0

for the least noisy ground reference.

November 16, 2008

475

Preliminary

Соседние файлы в папке Склад