adc avr

Upload: hoang-manh

Post on 17-Feb-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/23/2019 ADC AVR

    1/39

    Kuliah MikrokontrolerKuliah Mikrokontroler

    AVRAVR

    ADC AVRADC AVR

    EruSeptember 2009EruSeptember 2009PENSPENS

  • 7/23/2019 ADC AVR

    2/39

    ADCADC

    8 Channel ADC8 Channel ADCMultiplee!Multiplee!" 8 Sin#le$en!e!8 Sin#le$en!e!

    " 2 Di%%erential &ith2 Di%%erential &ith

    Pro#rammable 'ain at ()Pro#rammable 'ain at ()(0) or 200(0) or 200

    8*(0 bit re+olution8*(0 bit re+olution

    Variable Clo,k Spee!Variable Clo,k Spee!

    Variou+ Re%eren,e Volta#eVariou+ Re%eren,e Volta#e

    -ree*Controlle! Runnin#-ree*Controlle! Runnin#

    Pollin#*.nterrupt E/CPollin#*.nterrupt E/C

    Noi+e Re!u,tionNoi+e Re!u,tion

  • 7/23/2019 ADC AVR

    3/39

  • 7/23/2019 ADC AVR

    4/39

  • 7/23/2019 ADC AVR

    5/39

    ADC Clo,k " ,lkADCADC Clo,k " ,lkADC

    he ADC i+ pro1i!e! &ith a !e!i,ate!he ADC i+ pro1i!e! &ith a !e!i,ate!

    ,lo,k !omain,lo,k !omain

    hi+ allo&+ haltin# the CP3 an! .*/ ,lo,k+hi+ allo&+ haltin# the CP3 an! .*/ ,lo,k+in or!er to re!u,e noi+e #enerate! b4in or!er to re!u,e noi+e #enerate! b4

    !i#ital ,ir,uitr4!i#ital ,ir,uitr4

    hi+ #i1e+ more a,,urate ADC ,on1er+ionhi+ #i1e+ more a,,urate ADC ,on1er+ion

    re+ult+re+ult+

  • 7/23/2019 ADC AVR

    6/39

    -eature+-eature+

    (0$bit Re+olution(0$bit Re+olution05 6S7 .nte#ral Non$linearit405 6S7 .nte#ral Non$linearit4

    2 6S7 Ab+olute A,,ura,42 6S7 Ab+olute A,,ura,4

    ( $ 2:0 ;+ Con1er+ion ime( $ 2:0 ;+ Con1er+ion ime

    3p to (5 kSPS at Maimum Re+olution3p to (5 kSPS at Maimum Re+olution

    8 Multiplee! Sin#le En!e! .nput Channel+8 Multiplee! Sin#le En!e! .nput Channel+

    < Di%%erential .nput Channel+< Di%%erential .nput Channel+2 Di%%erential .nput Channel+ &ith /ptional 'ain o% (0 an! 200=(>2 Di%%erential .nput Channel+ &ith /ptional 'ain o% (0 an! 200=(>

    /ptional 6e%t a!?u+tment %or ADC Re+ult Rea!out/ptional 6e%t a!?u+tment %or ADC Re+ult Rea!out

    0 $ VCC ADC .nput Volta#e Ran#e0 $ VCC ADC .nput Volta#e Ran#e

    Sele,table 25:V ADC Re%eren,e Volta#eSele,table 25:V ADC Re%eren,e Volta#e

    -ree Runnin# or Sin#le Con1er+ion Mo!e-ree Runnin# or Sin#le Con1er+ion Mo!e

    ADC Start Con1er+ion b4 Auto ri##erin# on .nterrupt Sour,e+ADC Start Con1er+ion b4 Auto ri##erin# on .nterrupt Sour,e+

    .nterrupt on ADC Con1er+ion Complete.nterrupt on ADC Con1er+ion Complete

    Sleep Mo!e Noi+e Can,elerSleep Mo!e Noi+e Can,eler

    Note@ ( he !i%%erential input ,hannel+ are not te+te! %or !e1i,e+ in PD.PNote@ ( he !i%%erential input ,hannel+ are not te+te! %or !e1i,e+ in PD.PPa,ka#e hi+ %eature i+ onl4 #uarantee! to &ork %or !e1i,e+ in -P an!Pa,ka#e hi+ %eature i+ onl4 #uarantee! to &ork %or !e1i,e+ in -P an!

    -N*M6- Pa,ka#e+-N*M6- Pa,ka#e+

  • 7/23/2019 ADC AVR

    7/39

  • 7/23/2019 ADC AVR

    8/39

  • 7/23/2019 ADC AVR

    9/39

  • 7/23/2019 ADC AVR

    10/39

  • 7/23/2019 ADC AVR

    11/39

  • 7/23/2019 ADC AVR

    12/39

  • 7/23/2019 ADC AVR

    13/39

  • 7/23/2019 ADC AVR

    14/39

  • 7/23/2019 ADC AVR

    15/39

  • 7/23/2019 ADC AVR

    16/39

  • 7/23/2019 ADC AVR

    17/39

  • 7/23/2019 ADC AVR

    18/39

  • 7/23/2019 ADC AVR

    19/39

  • 7/23/2019 ADC AVR

    20/39

  • 7/23/2019 ADC AVR

    21/39

    ADC Con1er+ion Re+ultADC Con1er+ion Re+ult

    A%ter the ,on1er+ion i+ ,omplete =AD.- i+ hi#h>)A%ter the ,on1er+ion i+ ,omplete =AD.- i+ hi#h>)the ,on1er+ion re+ult ,an be %oun! in the ADCthe ,on1er+ion re+ult ,an be %oun! in the ADC

    Re+ult Re#i+ter+ =ADC6) ADCB>Re+ult Re#i+ter+ =ADC6) ADCB>

    -or +in#le en!e! ,on1er+ion) the re+ult i+-or +in#le en!e! ,on1er+ion) the re+ult i+&here V.N i+ the 1olta#e on the +ele,te! input&here V.N i+ the 1olta#e on the +ele,te! inputpin an! VRE- the +ele,te! 1olta#e re%eren,epin an! VRE- the +ele,te! 1olta#e re%eren,e=+ee=+ee

    able 22$ on pa#e 22( an! able 22$ on pa#eable 22$ on pa#e 22( an! able 22$ on pa#e222> 0000 repre+ent+ #roun!) an! 0--222> 0000 repre+ent+ #roun!) an! 0--

    repre+ent+ the +ele,te! re%eren,e 1olta#e minu+repre+ent+ the +ele,te! re%eren,e 1olta#e minu+one 6S7one 6S7

  • 7/23/2019 ADC AVR

    22/39

    .% !i%%erential ,hannel+ are u+e!) the re+ult i+.% !i%%erential ,hannel+ are u+e!) the re+ult i+

    &here VP/S i+ the 1olta#e on the po+iti1e input pin) VNE' the 1olta#e on the ne#ati1e input pin)&here VP/S i+ the 1olta#e on the po+iti1e input pin) VNE' the 1olta#e on the ne#ati1e input pin)

    'A.N the +ele,te! #ain %a,tor) an! VRE- the +ele,te! 1olta#e re%eren,e he re+ult i+ pre+ente!'A.N the +ele,te! #ain %a,tor) an! VRE- the +ele,te! 1olta#e re%eren,e he re+ult i+ pre+ente!

    in t&o+ ,omplement %orm) %rom 0200 =$5(2!> throu#h 0(-- =5((!> Note that i% the u+erin t&o+ ,omplement %orm) %rom 0200 =$5(2!> throu#h 0(-- =5((!> Note that i% the u+er

    &ant+ to per%orm a Fui,k polarit4 ,he,k o% the re+ult+) it i+ +u%%i,ient to rea! the MS7 o% the re+ult&ant+ to per%orm a Fui,k polarit4 ,he,k o% the re+ult+) it i+ +u%%i,ient to rea! the MS7 o% the re+ult

    =ADC9 in ADCB> .% thi+ bit i+ one) the re+ult i+ ne#ati1e) an! i% thi+ bit i+ Gero) the re+ult i+ po+i$=ADC9 in ADCB> .% thi+ bit i+ one) the re+ult i+ ne#ati1e) an! i% thi+ bit i+ Gero) the re+ult i+ po+i$

    ti1e -i#ure 22$( +ho&+ the !e,o!in# o% the !i%%erential input ran#eti1e -i#ure 22$( +ho&+ the !e,o!in# o% the !i%%erential input ran#e

    able 22$2 +ho&+ the re+ultin# output ,o!e+ i% the !i%%erential input ,hannel pair =ADCn $ ADCm>able 22$2 +ho&+ the re+ultin# output ,o!e+ i% the !i%%erential input ,hannel pair =ADCn $ ADCm>i+ +ele,te! &ith a #ain o% 'A.N an! a re%eren,e 1olta#e o% VRE-i+ +ele,te! &ith a #ain o% 'A.N an! a re%eren,e 1olta#e o% VRE-

    ADCADC

    V.N (02 V.N (02

    VRE-VRE-

    $$$$$$$$$$$$$$$$$$$$$$$$$$ H$$$$$$$$$$$$$$$$$$$$$$$$$$ H

    ADCADC

    VP/S VNE' " => 'A.N 5(2

    VP/S VNE' " => 'A.N 5(2VRE-VRE-

    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ H

  • 7/23/2019 ADC AVR

    23/39

  • 7/23/2019 ADC AVR

    24/39

  • 7/23/2019 ADC AVR

    25/39

  • 7/23/2019 ADC AVR

    26/39

  • 7/23/2019 ADC AVR

    27/39

  • 7/23/2019 ADC AVR

    28/39

  • 7/23/2019 ADC AVR

    29/39

  • 7/23/2019 ADC AVR

    30/39

  • 7/23/2019 ADC AVR

    31/39

  • 7/23/2019 ADC AVR

    32/39

  • 7/23/2019 ADC AVR

    33/39

  • 7/23/2019 ADC AVR

    34/39

  • 7/23/2019 ADC AVR

    35/39

    Contoh Aplika+iContoh Aplika+i

  • 7/23/2019 ADC AVR

    36/39

  • 7/23/2019 ADC AVR

    37/39

  • 7/23/2019 ADC AVR

    38/39

  • 7/23/2019 ADC AVR

    39/39