ADC0804 is an IC(integrated circuit) which converts the input analog voltage to its equivalent digital output. It is a stand alone analog to digital converter. Though now it is decades old and replaced by newer analog to digital converters which provide more flexibility, consumes less power, provides output in multiple formats and are smaller in size.
Previously ADC(analog to digital converts) were used with intelligent hardware/microcontroller etc because microcontrollers didn’t have build in analog to digital converts. Now almost every microcontroller has a built in ADC. Analog to digital converts were basically used with analog temperature sensors to measure temperature of a particular place for example measuring room temperature or measuring the internal temperature of a factory boiler or temperature of a car etc. Its not only limited to measuring temperature it can be use anywhere where analog signal is required to be measured.
Their are also other predecessors and successor’s of the same family ADC0801/ ADC0802/ ADC0803/ADC0804/ADC0805/ADC0808. They all are 8-bit CMOS Ic’s , performing exactly the same function with slightly difference in pins and working.
ADC0804 Usage
ADC0804 pin out description
Adc0804 comes in 20 pin package. The size of the ic is pretty large. DIP package in 20 pins gives the ic a look of bigger circuit residing inside. Individual ADC0804 pins functions are explained below.
PIN-1 – CS (chip select) Make this pin ground(0) low to active the ADC0804.
PIN-2 – RD (Read) Make this pin high(1) and after some time low(0). This will bring data from internal registers to the output pins after conversion (analog to digital converted value).
PIN-3 – WR (Write) Make this pin low(0) to high(10) to start conversion of data(analog to digital)
PIN-4 – Clock IN (CLK IN) Connect external clock to this pin.
PIN-5 – Interrupt (INTR) This pin automatically goes low when conversion is done by ADC0804 or when digital equivalent of analog input is ready..
PIN-6 – Vin (+) connect input analog sensor pin/input voltage to this pin.
PIN-7 – Vin (-) ground this pin.
PIN-8 – AnalogGround (AGND) ground this pin.
PIN-9 – Vref/2 set the reference voltage for analog input(Very important pin discussed below)
PIN-10 – DigitalGround (DGND) ground this pin
PIN-11 – |———————————————–
PIN-12 |
PIN-13 |
PIN-14 |PIN 11 TO 18 ARE DATA PINS!! OUTPUT DATA PINS
PIN-15 |
PIN-16 |
PIN-17 |
PIN-18 – |————————————————-
PIN-19 – Clock R (CLK R) Used with clock IN pin when internal clock source is used
PIN-20 – +5 volts
ADC0804 reference pin (Vref/2)
How to use ADC0804 analog to digital converter?
- Make Cs (chip select) low(0) to activate the adc0804.
- Make WR (write) pin low (0).
- Make WR (write) pin high (1) after some delay small delay. This low to high impulse at WR pin starts your conversion.
- Now check the INTR (interrupt) pin if it is high(1) conversion is running if it is low(0) the conversion is over.
- Make RD=low(0) and after some time high(1). This will bring the converted value to the 8 data output pins of ADC 0804.
Here is a simple code that implements the above logic in practical. The code is in c language, means when you are going to write code in c++ language. If you are programming in assembly the method is same, with little change in syntax.
cs=0; //select the chip
wr=0; //select write pin
delay(10); //delay for some time
wr=1; //start conversion analog to digital
rd=1; //Do not read. you can also skip this statement, but for efficiency use it.
while(intr==1); //The loop runs until intr==1 and when intr==0 it jumps to next iteration
rd=0; //Brings data from internal registers on output pins
Below is a simple project on interfacing adc0804 analog to digital converter with 8051 microcontroller. 89c51 microcontroller didn’t have a built in ADC so an external ADC is used to interface with it.
Filed Under: Featured Contributions
Tagged With: adc0804, analog to digital converter, integratedcircuits, pinout
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.