Adc interfacing

7,468 views 25 slides Apr 23, 2020
Slide 1
Slide 1 of 25
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25

About This Presentation

study of ADC0804 and ADC 0809.And their interfacing with 8051 microcontroller.


Slide Content

Dr. Vithalrao Vikhe Patil College of Engineering,
Ahmednagar
Department of Information Technology
Lecture on
Unit No 6
ADC Interfacing with 8051 Microcontroller
Processor Architecture & Interfacing (S.E.I.T.)
Presentation By
Prof. Ms. M. S. Gunjal
Department of Information Technology

Objectives
What is ADC
Pin diagram of ADC0804
Pin description of ADC0804
Interfacing Diagram of ADC with 8051
Working of ADC
Timing Diagram
ADC0808/0809
April 23, 2020 2

ADCStandsfor“AnalogtoDigitalConversion"
ADCconvertsthegivenanalogvaluetoa
digitalvalue.
Sensorsandtransducersusedinindustryare
analoginnature.
Itisnecessarytoconverttheanalogoutput
fromthesensorstodigitalsothatthe
correspondingsignalcanbeprocessedbythe
controller.
ADC?
April 23, 2020 3

Continue…
ADCsareusedeverywherewhenwehaveto
process,storeortransmitananalogsignal
indigitalform.
ADCsareusedinTVtunercards.
TherearelotofdigitalICsavailableto
convertanalogtodigital.
InMicrocontrollerinterfacingthefrequently
usedICsare0804and0808
ADCchipsareeitherparallelorserial.
April 23, 2020 4

ADC0804
TheADC0804ICis20Pin8-bitparallelADC.
Itworkswith+5voltsandhasaresolutionof
8bits.
TheADC0804isacommonlyusedADC
module,forprojectswhereanexternalADC
isrequired.
InthisADCtheconversiontimevaries
dependingontheclockingsignalsappliedto
CLKINpin.
Buttheconversiontimecannotbefaster
than110microseconds.
April 23, 2020 5

Features ofADC0804 Family:
8-bitresolutionADC
Conversiontime110μs
Accesstime135ns.
Ithasanon-chipclockgenerator.
Itdoesnotrequireanyzeroadjustment.
Itoperatesonsingle5Vpowersupply.
OutputmeetTTLvoltagelevelspecifications.
April 23, 2020 6

ADC0804 chip Pin diagram
April 23, 2020 7

Pin Diagram Description
Pin Symbol Descriptions
1 CS# Chipselect is an active low input used to
activate the ADC0804 chip.
2 RD This is activelow input signal.RD(Read)
Make this pin high(1) and after some time
low(0). This will bring data from internal
registers to the output pins after conversion
3 WR WR(Write) Make this pin low(0) to high(1) to
start conversion of data(analog to digital)
4 CLKIN Clock IN(CLK IN) Connect external clock to
this pin.
5 INTR# Interrupt(INTR) This pin automatically goes
low when conversion is done by ADC0804 or
when digital equivalent of analoginput is
ready.
6 Vin(+) Vin(+) connect input analog sensor pin/input
voltage to this pin.
7 Vin(-) Vin(-) ground this pin.
April 23, 2020 8

Continue…
PinSymbol Description
8 AGND AnalogGround(AGND) ground this pin.
9 Vref/2 Vref/2set the reference voltage for analog
input(Very important pin discussedfurther)
10 DGND DigitalGround(DGND) ground this pin
11 to
18
D0t0 D7PIN 11 TO 18 ARE DATA PINSOUTPUT DATA
PINS
19 CLK R Clock R(CLK R) Used with clock IN pin when
internal clock source is used
20 Vcc +5 volts
April 23, 2020 9

ADC0804 reference pin (Vref/2)
Vref/2isvoltagereferencepinofADC0804.
Referencemeansthatafterthismuch
amountofvoltagechangeatinput,output
mustincreaseby1orthesetlimit.
Vref/2(pin-9)leftopenmeansinput
voltagespanis0-5voltsandstepsizeis
5/256=19.53mV.
VoltagespanmeansthattheADCcan
measureintherangeforexampleforthe
abovecasefrom0-5volts.
stepsizeitmean’saftertheriseof19.53mv
atinputtheoutputincreasesbyoneunit.If
nowoutputis2thenafter19.53mv
increaseininputvoltageoutputwillbe3.
April 23, 2020 10

Different Vref/2 voltages and
corresponding analogue input voltage
spans.
Vref/2 (pin 9) VoltsInput Voltage (volt)Step size(mv)
Left open 0-5 5/256=19.53
2 0-4 4/256=15.62
1.5 0-3 3/256=11.71
1.28 0-2.56 2.56/256=10
1.0 0-2 2/256=7.812
0.5 0-1 1/256=3.906
April 23, 2020 11

Interfacing Diagram
April 23, 2020 12

Working of ADC…
For every interfacing initialization is needed.
For ADC the initial values are
INTR=1; // interrupt for completion of ADC
process
rd=1; // read from 0804
wr=0; // start conversion write..
Nextstepistostarttheprocessof
convertinganalogvoltagetodigitaldata
Bychangingthestateofthewritepin
transitionfrom0to1willstartthe
conversion.
Endofconversionwillbeacknowledgedby
achangeintheINTRstate.
April 23, 2020 13

Steps for converting the analogue
input and reading the output from
ADC0804.
MakeCS=0andsendalowtohighpulseto
WRpintostarttheconversion.
NowkeepcheckingtheINTRpin.
Ifconversionisnotfinished(INTR=1),poll
untilitisfinished.
Ifconversionisfinished(INTR=0),gotothe
nextstep.
MakeCS=0andsendahightolowpulseto
RDpintoreadthedatafromtheADC.
April 23, 2020 14

Timing Diagram
April 23, 2020 15

ADC0808/0809
ADC0809isan8channel,8bitADC.
Itcanconvertananalogvoltageinputinto
an8bitdigitaldataoutput.
Toselectaninputoutof8options,thereare
threeselectlines(C,BandA).
Weputachannelnumberontheselines
(0…7)andlatchitusingALE.
SCsignalisgiventoindicatestartof
conversion.
Referencevoltageforconversionisprovided
using+Vrefand–Vref.Theclocksupply
neededforconversionisgiventhroughCLK
(typically~1MHz).
April 23, 2020 16

ADC0808/0809
Theendofconversionisindicatedbythe
ADCusingEOCsignal.
ThereisnoVref/2intheADC0808/0809
chip.
April 23, 2020 17

ADC0808/0809
April 23, 2020 18

Analog Channel Selection
Selected Analog
Channel
C B A
IN0 0 0 0
IN1 0 0 1
IN2 0 1 0
IN3 0 1 1
IN4 1 0 0
IN5 1 0 1
IN6 1 1 0
IN7 1 1 1
April 23, 2020 19

VrefRelation to Vin
Vref(V) Vin (V) Step Size (mv)
Not Connected0 to 5 5/256=19.53
4.0 0 to 4 4/256=15.62
3.0 0 to 3 3/256=11.71
2.56 0 to 2.56 2.56/256=10
2.0 0 to 2 2/256=7.81
1.0 0 to 1 1/256=3.90
April 23, 2020 20

Steps to program the
ADC0808/0809
Selectananalogchannelbyprovidingbitsto
A,BandCaccordingtoanalogchannel
selection.
ActivatetheALE(AddressLatchEnable)pin
byprovidinglowtohighpulsetolatchinthe
address.
ActivateSC(startconversion)byLtoHpulse
toinitiateconversion.
MonitorEOC(endofconversion)tosee
whetherconversionisfinished.
HtoLoutputindicatedataisconvertedand
isreadytopickedup.
April 23, 2020 21

Continue…
IfwedonotuseEOC,wecanreadthe
converteddataafteratimedelay.
ActivateOE(outputenable)toreaddataout
ofADCchip.
AnHtoLpulsetotheOEpinwillbring
digitaldataoutofthechip.
OEpinissameasRDpininotherADCchips.
April 23, 2020 22

Read and Write Timing for
ADC0809
April 23, 2020 23

Interfacing Diagram
April 23, 2020 24

Thank You !!!
April 23, 2020 25
Tags