0% found this document useful (1 vote)
887 views

Adc Interfacing With 8051

The document describes interfacing an ADC with an 8051 microcontroller to generate a digital output from an analog input voltage. It explains that the ADC connects to ports on an 8255 PPI chip which is connected to ports on the 8051. The program selects channel 0 of the ADC as the input, reads the data and stores it in the accumulator, then writes the digital output to memory address 9000H. It performs this process continuously in a loop.

Uploaded by

Sumukha Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
887 views

Adc Interfacing With 8051

The document describes interfacing an ADC with an 8051 microcontroller to generate a digital output from an analog input voltage. It explains that the ADC connects to ports on an 8255 PPI chip which is connected to ports on the 8051. The program selects channel 0 of the ADC as the input, reads the data and stores it in the accumulator, then writes the digital output to memory address 9000H. It performs this process continuously in a loop.

Uploaded by

Sumukha Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ADC 0808/0809 INTERFACING WITH 8051

AIM:
To interface ADC with 8051 to generate digital output by giving an analog input voltage.
APPARATUS REQUIRED;
8051 Trainer Kit
ADC Interface Board
This program selects channel 0 as input channel reads from it & saves in the accumulator.
NOTE: In the LAB, ADC is interfaced with 8051 Microcontroller through 8255 PPI.
Port 2 of 8051 is connected to Port C of 8255, Port 1 of 8051 is connected to Port A of 8255,
Port C is for interfacing signals and Port A is for Reading data from ADC.

PROGRAM:

MOV DPTR, #2023


MOV A, #90: PA-I/P PORT, PORT B, C-O/P PORTS
MOVX @DPTR, A
BEGIN: MOV DPTR, #2022; Select CH-0
MOV A, #00
MOVX @DPTR, A
MOV A, #0DH; Set PC6 (OE)
MOV DPTR, #2023

MOVX @DPTR, A
MOV A, #0FH; SET SOC
MOVX @DPTR, A
LCALL DELAY
MOV A, #0EH
MOVX @DPTR, A
MOV A, #0CH
MOVX @DPTR, A
MOV DPTR, #2020
BACK: MOVX A,@DPTR
JB 0E7, BACK
MOV DPTR, #2020
REP: MOVX A,@DPTR
ANL A, #80H
JNB 0E7, REP
MOV A, #0DH
MOV DPTR, #2023
MOVX @DPTR, A
MOV DPTR, #2020
MOVX A,@DPTR
MOV DPTR, #9000H; Read the digital output from this address
MOVX @DPTR, A
SJMP BEGIN
DELAY: MOV R3, #30H
AGAIN: MOV R4, #FFH
BACK: NOP
NOP
DJNZ R4, BACK
DJNZ R3, AGAIN
RET

You might also like