study of ADC0804 and ADC 0809.And their interfacing with 8051 microcontroller.
Size: 668.1 KB
Language: en
Added: Apr 23, 2020
Slides: 25 pages
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
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
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
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