0% found this document useful (0 votes)
17 views

Unit-3 ADC Interfacing

The document describes an 8-bit analog to digital converter circuit and provides an algorithm to sample an analog input and store the digital value in memory. The algorithm involves sending a start pulse to the ADC, waiting for an end-of-conversion signal, and then reading and storing the data from the ADC.

Uploaded by

sreenivasa reddy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Unit-3 ADC Interfacing

The document describes an 8-bit analog to digital converter circuit and provides an algorithm to sample an analog input and store the digital value in memory. The algorithm involves sending a start pulse to the ADC, waiting for an end-of-conversion signal, and then reading and storing the data from the ADC.

Uploaded by

sreenivasa reddy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Analog to Digital Converter

CLK

PA0
PA1
PA2
PA3
PA4
PA5
PA6
PA7

ANALOG INPUT
8255 8-BIT
ADC

PC0
START
PC7
EOC

2
WRITE A PROGRAM FOR 8-BIT ADC TO SAMPLE
ANALOG INPUT AND STORE THE DIGITAL VALUE IN MEMORY
ALGORITHM

1.SEND THE START PULSE TO ADC


2.WAIT FOR EOC TO BECOME ACTIVE
3.READ THE DATA FROM ADC AND STORE IT IN MEMORY

3
DATA SEGMENT
PORTA EQU 0FFE0H CHK: IN AL,DX
PORTC EQU 0FFE4H AND AL,80H
CNTPRT EQU 0FFE6H JZ CHK
MEM DW 2000H
DATA ENDS MOV DX,PORTA
IN AL,DX
CODE SEGMENT
ASSUME CS:CODE,DS:DATA MOV MEM,AL
START: MOV AX,DATA INT 3H
MOV DS,AX
CODE ENDS
MOV DX,CNTPRT END START
MOV AL,98H
OUT DX,AL

MOV DX,PORTC
MOV AL,01H
OUT DX,AL
4

You might also like