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

Analog Comparators

ACREFCTL Register

Output Reference Voltage Based on VREF Field Value

EN Bit Value RNG Bit Value

 

EN=1

RNG=0

Total resistance in ladder is 31 R.

 

The range of internal reference in this mode is 0.85-2.448 V.

RNG=1

Total resistance in ladder is 23 R.

The range of internal reference for this mode is 0-2.152 V.

17.3Initialization 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.

17.4Register Map

Table 17-2 on page 477 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.

476

November 16, 2008

Preliminary

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