Interfacing ADC0804 with Serial port (RS232) using 8051 micocontroller (AT89C51)

Summary

This circuit demonstrates the principle and operation of collecting data from ADC0804 and sending it to PC via serial communication using 8051 microcontroller (AT89C51). The circuit is divided into three parts: ADC, Controller and Serial Port. This circuit can be used as an intermediate in many applications.Click to  read more about Serial Port(RS232).

Interfacing ADC0804 with 8051 Microcontroller (AT89C51) using Serial Port (RS232

Description

ADC0804 which is an 8-bit resolution ADC has only one input channel connected to variable resistance (preset) to give the analog input. In place of preset, analog input from a sensor can also be used. (Refer interfacing ADC0804 with AT89C51)

 

 
The output pins of the ADC are connected to port P1 of the microcontroller. Write (WR) pin 3 is connected to P2.0 i.e. pin 21 of controller. Read (RD) pin 2 is connected to P2.1 i.e. pin 22 of controller. Interrupt (INTR) pin 5 is connected to P2.2 i.e. pin 23 of controller.
 
The data coming on the port P1 is stored in the SBUF register of the MCU. The serial communication of controller with PC is done using the TxD pin 11 of the microcontroller AT89C51. The IC Max 232 is used to ensure compatibility between controller and serial port (Refer serial port interfacing through controller).
 
The program continuously monitors the output of ADC0804 and transmits it to the serial port. The input to the ADC is supplied through a preset. When the value of preset changes, the corresponding output changes and is displayed on the hyper-terminal.
 
Hyper Terminal shows character corresponding to the ASCII values 0-255 (Refer serial port interfacing through controller for hyper-terminal settings).

 

 

Circuit Diagram

Video

Code

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

Components

MAX232 | IC MAX232
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 (...

ADC0804 | ADC 0804
ADC0804

Analog to digital converters find huge application as an intermediate device to convert the signals from analog to digital form. These digital signals are used for further processing by the digital processors. Various sensors like temperature, pressure, force etc. convert the physical characteristics into electrical signals that are analog in nature....