Thursday 25 September 2014

ADC0804

ADC0804



ADC0804 (pdf) 


Simple to computerized converters find colossal application as a halfway gadget to change over the signs from simple to advanced structure. These advanced signs are utilized for further preparing by the computerized processors. Different sensors like temperature, weight, power and so forth change over the physical qualities into electrical signs that are simple in nature. 
ADC0804 is a usually utilized 8-bit simple to advanced convertor. It is a solitary channel IC, i.e., it can take one and only simple flag as info. The computerized yields shift from 0 to a most extreme of 255. The stride size can be balanced by setting the reference voltage at pin9. At the point when this pin is not joined, the default reference voltage is the working voltage, i.e., Vcc. The stride size at 5V is 19.53mV (5V/255), i.e., for each 19.53mV ascent in the simple information, the yield fluctuates by 1 unit. To set a specific voltage level as the reference esteem, this pin is joined with a large portion of the voltage. Case in point, to set a reference of 4V (Vref), pin9 is associated with 2V (Vref/2), along these lines diminishing the stride size to 15.62mV (4V/255). 
ADC0804 needs a clock to work. The time taken to change over the simple quality to computerized worth is subject to this clock source. An outer time can be given at the Clock IN pin. ADC 0804 likewise has an inbuilt clock which can be utilized as a part of nonappearance of outer clock. A suitable RC circuit is associated between the Clock IN and Clock R pins to utilize the inner clock.


Pin No
Function
Name
1
Activates ADC; Active low
Chip select
2
Input pin; High to low pulse brings the data from internal registers to the output pins after conversion
Read
3
Input pin; Low to high pulse is given to start the conversion
Write
4
Clock Input pin; to give external clock.
Clock IN
5
Output pin; Goes low when conversion is complete
Interrupt
6
Analog non-inverting input
Vin(+)
7
Analog inverting Input; normally ground
Vin(-)
8
Ground(0V)
Analog Ground
9
Input pin; sets the reference voltage for analog input
Vref/2
10
Ground(0V)
Digital Ground
11
8 bit digital output pins
D7
12
D6
13
D5
14
D4
15
D3
16
D2
17
D1
18
D0
19
Used with Clock IN pin when internal clock source is used
Clock R
20
Supply voltage; 5V
Vcc

Present

PRESENT 




A preset is a three legged electronic segment which can be made to offer fluctuating resistance in a circuit. The resistance is shifted by changing the turning control over it. The change should be possible by utilizing a little screw driver or a comparative apparatus. The resistance does not shift straightly but instead differs in exponential or logarithmic way. Such variable resistors are generally utilized for modifying affectability alongside a sensor. 

The variable resistance is acquired over the single terminal at front and one of the two different terminals. The two legs at back offer altered resistance which is partitioned by the front leg. So at whatever point just the back terminals are utilized, a preset goes about as an altered resistor. Presets are determined by their altered quality resistance.

 Pin Diagram: 

Celsius scale digital thermometer using 8051 microcontroller (AT89C51)

Celsius Scale Digital Thermometer Using 8051 Microcontroller (AT89C51)


Celsius scale thermometer displays the ambient temperature through a LCD display. It consists of two sections. One is that which senses the temperature. This is a temperature sensor LM 35. The other section converts the temperature value into a suitable number in Celsius scale which is done by the ADC0804.

Description

Celsius scale thermometer shows the surrounding temperature through a LCD show. It comprises of two segments. One is what faculties the temperature. This is a Celsius Digital Scale utilizing 8051 

temperature sensor LM 35. The other segment changes over the temperature esteem into a suitable number in Celsius scale which is finished by the ADC0804. A computerized thermometer can be effortlessly made by interfacing a temperature sensor to the microcontroller AT89C51. The temperature sensor utilized as a part of the venture isLM35. The LM 35 IC produces a 10mV variety to its yield voltage for each degree Celsius change in temperature. The Output of the temperature sensor is simple in nature so we require a simple to computerized convertor for changing over the simple info to its proportionate parallel output.ADC 0804 is a simple to advanced convertor IC utilized as a part of the venture. 0804 is a solitary channel convertor which changes over the simple info up to a scope of 5V to an identical 8-bit paired yield. 

An advanced thermometer can be effectively made by interfacing a temperature sensor to the microcontroller AT89C51. The temperature sensor utilized as a part of the task is LM35. The LM 35 IC produces a 10mV variety to its yield voltage for each degree Celsius change in temperature. The Output of the temperature sensor is simple in nature so we require a simple to advanced convertor for changing over the simple info to its equal parallel yield. The ADC 0804 is the simple to computerized convertor IC utilized as a part of the undertaking. 0804 is a solitary channel convertor which changes over the simple info up to a scope of 5V to a proportional 8-bit paired yield.





The stride size is characterized by the voltage connected at the Vref/2 pin of the ADC IC. Case in point, if the voltage at Vref/2 pin is situated to 1.28V then ADC has a stage size of 10 mV. So if the data voltage is 1V the proportional parallel yield of ADC will be 100 or 0110 0100 in paired. The 8 bit parallel yield of the ADC is increased by one for each 10 mV ascent of information voltage. Diverse step size can be chosen by changing the voltage data to the Vref/2 pin. The stride size of the ADC is balanced utilizing a preset to coordinate the real temperature. Once the ADC is aligned it will give the right yield further. The double yield of ADC is nourished parallel to a port of the microcontroller .The microcontroller peruses the info through ADC and showcases the comparing decimal esteem on LCD


indicating the temperature.



 CIRCUIT DIAGRAM :


CODE :

//Program to make a digital thermometer with display in centigrade scale

#include<reg51.h>
#define port P3
#define adc_input P1
#define dataport P0
#define sec 100
sbit rs = port^0;
sbit rw = port^1;
sbit e = port^2;

sbit wr= port^3;
sbit rd= port^4;
sbit intr= port^5;

int test_intermediate3=0, test_final=0,test_intermediate1[10],test_intermediate2[3]={0,0,0};

void delay(unsigned int msec )
{
int i ,j ;
for(i=0;i<msec;i++)
  for(j=0; j<1275; j++);
}

void lcd_cmd(unsigned char item)  //Function to send command to LCD
{
dataport = item;
rs= 0;
rw=0;
e=1;
delay(1);
e=0;
return;
}

void lcd_data(unsigned char item) //Function to send data to LCD
{
dataport = item;
rs= 1;
rw=0;
e=1;
delay(1);
e=0;
//delay(100);
return;
}

void lcd_data_string(unsigned char *str)  // Function to send string to LCD
{
int i=0;
while(str[i]!='\0')
{
  lcd_data(str[i]);
  i++;
  delay(10);
}
return;
}

void shape()     // Function to create the shape of degree
{
lcd_cmd(64);
lcd_data(2);
lcd_data(5);
lcd_data(2);
lcd_data(0);
lcd_data(0);
lcd_data(0);
lcd_data(0);
lcd_data(0);
}
     
void convert()    // Function to convert the values of ADC into numeric value to be sent to LCD
{
int s;
test_final=test_intermediate3;
lcd_cmd(0xc1); 
delay(2);
lcd_data_string("TEMP:");
s=test_final/100;
test_final=test_final%100;
lcd_cmd(0xc8);
if(s!=0)
lcd_data(s+48);
else
lcd_cmd(0x06);
s=test_final/10;
test_final=test_final%10;
lcd_data(s+48);
lcd_data(test_final+48);
lcd_data(0);
lcd_data('c');
lcd_data(' ');
delay(2);
}

void main()
{
int i,j;
adc_input=0xff;
lcd_cmd(0x38); 
lcd_cmd(0x0c);  //Display On, Cursor  Blinking
delay(2);
lcd_cmd(0x01);  // Clear Screen
delay(2);

while(1)
{
  for(j=0;j<3;j++)
  {
   for(i=0;i<10;i++)
   {
    delay(1);
    rd=1;
    wr=0;
    delay(1);
    wr=1;
    while(intr==1);
    rd=0;
    lcd_cmd(0x88);
    test_intermediate1[i]=adc_input/10;
    delay(1);
    intr=1;
   }
   for(i=0;i<10;i++)
   test_intermediate2[j]=test_intermediate1[i]+test_intermediate2[j];
  }

test_intermediate2[0]=test_intermediate2[0]/3;
test_intermediate2[1]=test_intermediate2[1]/3;
test_intermediate2[2]=test_intermediate2[2]/3;
test_intermediate3=test_intermediate2[0]+test_intermediate2[1]+test_intermediate2[2];
shape();
convert();
}
}

Components :


LM35 Temperature Sensor :

LM35 is an exactness IC temperature sensor with its yield corresponding to the temperature (in oC). The sensor hardware is fixed and in this way it is not subjected to oxidation and other processes....

AT89C51 Microcontroller :

AT89C51 is a 8-bit microcontroller and fits in with Atmel's 8051 crew. ATMEL 89C51 has 4KB of Flash programmable and erasable read just memory

LCD :

LCD (Liquid Crystal Display) screen is an electronic presentation module and locate an extensive variety of uses. A 16x2 LCD showcase is exceptionally essential module and is usually utilized as a part of different gadgets and circuits.

ADC0804 :

Simple to computerized converters find tremendous application as a middle of the road gadget to change over the signs from simple to advanced structure. These advanced signs are utilized for further handling by the computerized processors. Different sensors like temperature, weight, power and so on believer the physical attributes into electrical signs that are simple in nature.