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

Interfacing ADC0808 with Serial port (RS232) using interrupt clock from 8051 microcontroller (AT89C51)


Developed By: 
Himanshu Choudhary

In many applications data collected from multiple sensors is transmitted to PC for display or further analysis. The conversion of data from analog to digital form is done using an ADC. The digital data from the ADC is transferred to the computer using serial port. This circuit demonstrates the principle and operation of interfacing an ADC0808 with serial port of PC using the microcontroller AT89C51. The circuit is divided into three parts: ADC, controller and serial port. This circuit can be used as an intermediate circuit in many applications.



Interfacing ADC0808 with 8051 Microcontroller (AT89C51) using Interrupt clock


ADC0808 which is an 8-bit resolution ADC has eight input channels i.e., it can take a maximum of eight analog inputs. The circuit uses the first analog input pin to take the analog input signals from the preset.

To provide clock input to the ADC, Timer0 is used in interrupt enabled mode to generate a clock of frequency 500 KHz.  To enable the Timer0 in interrupt enable mode, the register IE is loaded with the value 0x82. Every time the timer completes the counting, pin P1.2 toggles its state. (Refer interfacing ADC0808 using clock from AT89C51).
The output pins of ADC are connected to the port P0 of the controller. The pin10 of the ADC is connected to pin8 (P1.7) of the controller for clock input. ALE, pin 22 of the ADC is connected to pin 1 (P1.0) of controller. OE, pin9 of the ADC is connected to pin 4 (P1.3) of controller. SC, pin6 of the ADC is connected to pin 2 (P1.1) of the controller. EOC, pin7 is connected to pin 3 (P1.2) of controller. Selector pins A (25), B (24) and C (24) of ADC are connected to the pins 4, 5 and 6 of the controller respectively.  
The port P0 is continuously scanned and the output of the ADC is transmitted via serial port. The value of the port P0 is loaded in the SBUF register and sent via TxD (pin11) of the controller. Hyper Terminal shows character corresponding to the ASCII values 0-255 (Refer serial port interfacing with AT89C51 for hyper terminal settings).



Circuit Diagram



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



MAX232 | IC MAX232
The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial communication of microcontrollers with PC. The controller operates at TTL logic level (0-5V) whereas the serial communication in PC works...
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...

Browse 4m+ Electronic Products

Pick the right product for your next design project with "Mouser Store". Mouser Electronics brings broadest range of semiconductors and electronic components from over 500 industry leading suppliers. 
Mouser specializes in the rapid introduction of new products and technologies for design engineers and buyers that includes semiconductors, interconnects, passives, and electro-mechanical components. Providing the best possible service with the flexibility of not requiring a minimum order and same-day shipping, Mouser has it all.
When you need the right part right now, think of Mouser
Thank you
Team EG


You are here