Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
162
Добавлен:
01.03.2016
Размер:
3.56 Mб
Скачать

RM0016

Analog/digital converter (ADC)

 

 

24 Analog/digital converter (ADC)

24.1Introduction

ADC1 and ADC2 are 10-bit successive approximation Analog to Digital Converters. They have up to 16 multiplexed input channels (the exact number of channels is indicated in the datasheet pin description). A/D Conversion of the various channels can be performed in single, and continuous modes.

ADC1 has extended features for scan mode, buffered continuous mode and analog watchdog. Refer to the datasheet for information about the availability of ADC1 and ADC2 in specific product types.

24.2ADC main features

These features are available in ADC1 and ADC2.

10-bit resolution

Single and continuous conversion modes

Programmable prescaler: fMASTER divided by 2 to 18

External trigger option using external interrupt (ADC_ETR) or timer trigger (TRGO)

Analog zooming (in devices with VREF pins)

Interrupt generation at End of Conversion

Data alignment with in-built data coherency

ADC input range: VSSA VIN VDDA

24.3ADC extended features

These features are available in ADC1.

Buffered continuous conversion mode(1)

Scan mode for single and continuous conversion

Analog watchdog with upper and lower thresholds

Interrupt generation at analog watchdog event

The block diagrams of ADC1 and ADC2 are shown in Figure 159 and Figure 160

1. Data buffer size is product dependent (10 x 10 bits or 8 x 10 bits). Please refer to the datasheet.

Doc ID 14587 Rev 9

413/454

Analog/digital converter (ADC)

 

 

 

 

 

 

 

 

 

 

 

 

RM0016

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 159. ADC1 block diagram

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10

 

 

 

Analog Watchdog Event

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EOC

 

 

EOCIE

 

 

 

 

 

 

 

 

 

 

 

 

End of Conversion

AWD

 

AWDIE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flags

 

Masks

 

 

 

 

ADC Interrupt to ITC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AWEN Enable bits (10 channels)

ANALOG

AWS status bits (10 channels)

WATCHDOG

 

High Threshold (10-bits)

 

Low Threshold (10-bits)

 

DATA BUFFER

(10 x 10 bits) or (8 x 10 bits)

VDDA

 

 

 

 

 

VSSA

 

 

DATA REGISTER

 

 

 

 

bus

 

 

ANALOG

(1 x 10-bits)

 

 

 

AIN0

 

 

 

Address/data

 

MUX

 

 

 

 

ANALOG TO DIGITAL

fADC

Prescaler

fMASTER

AIN1

 

CONVERTER

 

 

/2, /3, /4, ..../18

 

 

 

 

 

 

 

 

 

 

AIN9

GPIO

 

 

 

 

 

 

 

 

 

AIN12

Ports

 

ADON Start conversion (software)

 

 

 

 

 

 

CONT Single/continuous mode

 

ADC_ETR

 

SPSEL Channel select

 

 

SCAN Scan mode

 

 

 

 

 

 

 

 

DBUF Buffered mode

 

 

Internal TRGO trigger from TIM1

1. Refer to the product datasheet for AIN12 availability.

414/454

Doc ID 14587 Rev 9

80/64-pin VREF+ devices
only VREF-
VDDA
VSSA
AIN0
AIN1
AIN15
ADC_ETR
RM0016
Figure 160. ADC2 block diagram

Analog/digital converter (ADC)

 

 

 

EOC Interrupt to CPU

 

 

DATA REGISTER

 

 

ANALOG

(1 x 10-bits)

 

 

 

 

 

 

MUX

 

 

 

 

ANALOG TO DIGITAL

fADC

Prescaler

fMASTER

 

CONVERTER

 

 

/2, /3, /4, ..../18

 

 

 

 

 

GPIO

 

 

 

 

Ports

3

 

 

 

 

 

 

 

 

 

CH[2:0] Channel select

 

 

CONT Single/Continuous

 

 

ADON Power on /Start conversion

 

Internal TRGO trigger from TIM1

Address/data bus

Doc ID 14587 Rev 9

415/454

Соседние файлы в папке Минимум документации STM8_1