Arduino Projects    |   Raspberry Pi  |     Electronic Circuits   |    AVR    |    PIC    |    8051    |    Electronic Projects

How to interface ADC0808 with 8051 microcontroller (AT89C51) using clock from D-flip flop

Summary

Developed By: 
Himanshu Choudhary

An analog-to-digital converter is a device which converts continuous signals to discrete digital numbers. Typically, an ADC is an electronic device that converts an input analog voltage (or current) to a digital number proportional to the magnitude of the voltage or current. This circuit demonstrates the interfacing of ADC0808 with 8051 microcontroller (AT89C51). The output is taken on the LEDs. This is an intermediate circuit, which finds lot of applications. ADC0808 needs an external clock to run. The circuit describes how a D-flip flop can be used to provide the external clock.

 

Description

 

Analog-to-digital converters are among the most widely used devices for data acquisition. Digital computers use binary values, but in physical world everything is analog. Therefore, we need an analog-to-digital converter to translate the analog signals to digital signals. An ADC has n-bit resolution where n can be 8,10,12,16 etc. The ADC chips are either parallel or serial. In parallel ADC we have 8 or more pins dedicated to bringing out the binary data. ADC0808 is a parallel ADC with 8-bit resolution.
 
ADC0808 has 8 input channels i.e., it can take eight analog signals. To select these input pins three select pins are available. In this circuit the controller sends the control and enabling signal to ADC.
 
The circuit takes only one input pin of ADC, IN1 (pin27). ALE (pin22) of ADC is connected to P1.0 of the microcontroller AT89C51. Selector pins A, B, C (pins 25, 24 & 23) of ADC are connected to P1.4, P1.5, and P1.6 pins of controller, AT89C51 respectively. SC (pin6) of controller is connected to P1.1 of microcontroller. EOC (pin7) of ADC is connected to P1.2 of controller. OE (pin 9) of ADC is connected to P1.3 of controller. Output of ADC goes to port P0 (pins 32-39) of controller. (Also see interfacing ADC0808 using clock from AT89C51).
 
The clock for driving the ADC0808 is taken from the crystal of the microcontroller AT89C51. The controller uses a crystal of frequency 11.0592 MHz. As this frequency is too high for the ADC, it is divided using a D flip-flop and then given to the ADC0808. The circuit uses four D-flip flops to divide the frequency by 16. For D flip-flop, IC 74LS74 is used. It is a 14 pin IC with two internal D flip flops. The circuit uses two ICs to divide the frequency by 16. The circuit diagram shows the connection of the D flip-flop ICs.
 
 
The program continuously reads the input of ADC on the port P0 and outputs the same value on the port P2. LEDs are connected on the port P2 to display the output.

 

Circuit Diagram

Video

Code

This Code is only visible to Registered users. Please Login/Register

 

Components

LEDs | Light Emitting Diode
LED
 
Light emitting diodes (LEDs) are semiconductor light sources. The light emitted...
AT89C51 Microcontroller, Atmel 89C51 Controller Image
AT89C51 Microcontroller

AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory (...

ADC0808 Image
IC ADC0808

ADC0808 is an 8 bit analog to digital converter with eight input analog channels, i.e., it can take eight different analog inputs. The input which is to be converted to digital form can be selected by using three address lines. The voltage reference can be set using the Vref+ and Vr...

74LS47 Decoder/Driver IC
IC 74LS47

74LS47 is a BCD to 7-segment decoder/driver IC. It accepts a binary coded decimal as input and converts it into a pattern to drive a seven-segment for displaying digits 0 to 9. Binary coded decimal (BCD) is an encoding in which each digit of a number is represented by its own binary sequence (usually of...

You are here