ADC

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

Experiment No.

PROBLEM DEFINITION: To interface Analog to


Digital Converter to 8051 microcontroller .

Department of Computer Science and Engineering, GIT 1


Objectives of the Experiment:

1. To Interface ADC 0809 to 8051 Microcontroller.


2. To develop an 8051 ‘C’ code to display the digital output of equivalent
analog input.

2
Department of Computer Science and Engineering, GIT
Theoretical Background of the Experiment
• The ADC 0809 chip allows us to monitor up to 8
different analog inputs using only a single chip.
• The 8 analog input channels are multiplexed and
selected according to A, B, C address pins.
• In ADC 0809 Vref(+) and Vref(-) set the reference
voltage. If Vref(-) =GND and Vref(+) =5V , the step size is
5V/256= 19.53mV.
• IN0 is selected by making ABC=0.
• Activate ALE to latch in the address.
• SC is for start of conversion.
• EOC is for end of conversion and OE is for output
enable.
3
Department of Computer Science and Engineering, GIT
Interfacing Block Diagram

Department of Computer Science and Engineering, GIT 4


ALGORITHM
STEP 1: INCLUDE THE HEADER FILE ‘’at89c51ed2.h’’
STEP 2: BEGIN MAIN
SELECT AN ANALOG CHANNEL BY PROVIDING BITS TO A, B AND C
ADDRESSES. (CBA=000 TO SELECT IN0)
STEP 3: ACTIVATE THE ALE (ADDRESS LATCH ENABLE) PIN BY SENDING LOW-
TO-HIGH PULSE TO LATCH THE ADDRESS.
STEP 4: ACTIVATE SC (START CONVERSION) BY AN LOW-TO-HIGH PULSE TO
INITIATE CONVERSION.
STEP 5: MONITOR EOC (END OF CONVERSION) TO SEE WHETHER THE
CONVERSION IS FINISHED. HIGH-TO-LOW OUTPUT INDICATES THAT THE
DATA IS CONVERTED AND READY TO BE PICKED UP.
STEP 5: ACTIVATE OE (OUTPUT ENABLE) TO READ DATA OUT OF THE ADC CHIP.
AN LOW-TO-HIGH PULSE TO THE OE PIN WILL BRING DIGITAL DATA OUT
OF THE CHIP.
STEP 6: DIGITAL OUTPUT AND ANALOG INPUT ARE DISPLAYED ON LCD.
(VARY THE POT TO CHANGE THE ANALOG INPUT).
STEP 7: END OF MAIN.

Department of Computer Science and


03/25/2020 5
Engineering, GIT
CONNECTION DETAILS

• PORT 0 TO CN15.

Department of Computer Science and


03/25/2020 6
Engineering, GIT
Learning Outcomes of the Experiment
At the end of the session, students should be able to :

• Write the 8051 ‘C’ program to display digital output for analog input voltage.

Department of Computer Science and Engineering, GIT 7

You might also like