• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ADC 0809 interfacing with 8051

Not open for further replies.


New Member
I have to interface AdC 0809 to 8051 in my project. Can anyone give me the programming code for ADC interfacing to 8051?


New Member
First make clear, how many AD channels you want. As ADC0808/9 is having 8 channels, meaning you can input 8 different analog inputs and select any one of them at any time with the help of onchip mux. If you want to scan a single analog input, then use ADC0801.
Everything is given in the datasheet regarding connecting ADC with uC etc.
Anyway you simply ground the chip select pin (CS) of ADC, connect the read(start) pin and write pin to uC. Connect the INTR pin of ADC to INT1 pin of uC (8051) and the data of ADC to any port of your interrest (Precaution with P0 is you need to give pull ups).
This much is enough to interface ADC0801. If using ADC0808/9, you need to give select lines from uC to ADC.
Program sequence will be.
apply active low pulse at write pin of ADC
wait till interrupt comes.
write ISR for hardware interrupt 1 as follows.
apply active low pulse at read pin of ADC
read the port.

Lastly, you will get everything regarding ADC0801 here.


New Member
This ADC is designed to be memory mapped. You can connect it to the external memory bus on your 8051. The MOVX instruction can be used to read and write to the ADC. Just connect RD,WR and DB0-7 to the coresponding 8051 bus pins. You can pick an Address pin (AD8-15) and connect it to CS. When you do a MOVX to a memory location that sets that address pin high the write or read will go to the ADC.

Your code then becomes one instruction: MOVX A, @DPTR to read the ADC through the bus.


New Member
program for 0809

clr p3.6
setb p3.6
clr p3.6
mov p0,10100000b
setb p3.7
clr p3.7
setb p3.7
setb p1.7
clr p1.7
setb p1.6
herr: jb p1.6,herr
setb p3.6
mov p2,#11111111b
mov r5,p2
;------------------------------ to 0809
p3.7 to ale ((adress lach eneble)
p3.6 to oe (out eneble)
p1.7 to start :
p1.6 to eoc
p0 canect to 0809 adress (abc) :idea:


I have to interface AdC 0809 to 8051 in my project. Can anyone give me the programming code for ADC interfacing to 8051?

Hope you have find the solution,
if not then my code might help you

; Pin Definations
adc_data_bus    equ     90h             ; Port 0
adc_add_a       equ     b4h             ; P3.4
adc_add_b       equ     b3h             ; P3.3
adc_ale_soc     equ     b5h             ; P3.5
adc_eoc         equ     b6h             ; P3.6
adc_oe          equ     b7h             ; P3.7
; Main Program starts from here
adctemp:        clr adc_add_a           ; Channel 0 is ie Temp is selected
                clr adc_add_b           ;Add b = 0, Add a = 0
                setb adc_ale_soc        ;ale and soc is made high
                clr adc_ale_soc            ;ale and soc is made low        
                jb adc_eoc,$               ;check for eoc 
                jnb adc_eoc,$             ;check for eoc                                        
                setb adc_oe                ;if eoc high,make oe high
                mov a,adc_data_bus     ;Read port0 data to accumulator
                mov 40h,a              ;Copy this data in 40h for furher processing
                clr adc_oe                ;make oe low
Program ENDS here
Please let me know if you need any more help
Last edited:


New Member
inter facing ckt for adc 0809 with 8051

hi,i'm new one for this site.plz tell me how we can interface the adc0809 with 8051 with ckt diagram.it wiil be very useful for my project.[/FONT]
Not open for further replies.

Latest threads

EE World Online Articles