microcontrollerswebpages.iust.ac.ir/s_ebadollahi/files/micro/chapter 8a.pdf1439/09/15 1...

Post on 20-May-2020

15 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1439/09/15

1

MICROCONTROLLERSChapter 8

STM32 Peripherials - ADC

Dr. Saeed Ebadollahi

References:

•ARM® Cortex® M4 Cookbook – Mark Fischer – Packt publishing – 2016

•The Definitive Guide to ARM Cortex-M3 and Cortex-M4 Processors – Joseph Yiu –Newnes – 2014

•Discovering the STM32 Microcontroller - Geoffrey Brown - 2012

1439/09/15

2

Introduction

Introduction (Cont.)

1439/09/15

3

How does it works ?

How does it works ? (Cont.)

1439/09/15

4

Signal Comparator

Sample and Hold Block

1439/09/15

5

Our Microcontroller

Different Types of ADCs

.1Successive Approximation ADC

.2Flash ADC

.3Sigma Delta ADC

.4Dual Slope ADC

1439/09/15

6

Flash ADC

Flash ADC

1439/09/15

7

Sigma Delta ADC

Sigma Delta ADC

1439/09/15

8

Sigma Delta ADC

•Visit this link for more information

a.pdf423a/slyt423www.ti.com/lit/an/slythttp://

Dual Slope ADC

1439/09/15

9

Dual Slope ADC

Getting Started with ADC in Cube

1439/09/15

10

Example 1:

•Write a code to read A1 pin voltage on your discovery board.

•First connect it to GND and then connect it to VDD and read numbers !

•Use debugger to read outputs.

Example 2:

•Write a code to read LDR

•Which kind of circuit we have to made for it ?

•Write a code to read potentiometer

1439/09/15

11

DMA

DMA (Cont.)

1439/09/15

12

DMA (Cont.)

Example 3:

•Use ADC DMA to read both of LDR and Potantiometer

top related