Project Report
Project Report
Project Report
PROJECT REPORT
ON
TEMPRATURE
CONTROLLER AND
DISPLAY
PREPARED BY:
PATEL
PATEL
PATEL
DHIREN
JAY
PIYUSH
GUIDED BY:
(086440311526)
(086440311528)
(086440311536)
MR. H.H.AGRAWAL
Certificate
This is certified that
1. Patel Dhiren Bharatbhai
2. Patel Jay Sureshbhai
3. Patel Piyush Dashrathbhai
Of diploma
in Electronics and Communication Engineering (6 th
semester) of the academic year Dec-2009 as
satisfactory completed their term work in project on
TEMPRATURE CONTROLLER AND DISPLAY
They worked with full interest and here with
submit their report in partial fulfillment of the Diploma
in Electronics & Communication Engineering.
Date of submission:
Sign of Guide:
Head of department
1.
Introduction
2.
Circuit Diagram
3.
Circuit Description
4.
Component List
5.
Data sheets
6.
Reference
for
8051.this
system
is
called
7.
8.
9.
Vref/2: This pin is used to set the reference
voltage. If this is not connected the default reference
voltage is 5V. In some application it is required to reduce
the step size. This can be done by using this pin.
10. DGND: Digital Ground.
11-18. Output Data Bits (D7-D0).
19. CLKR: Clock Reset.
20. Vcc: Positive Supply
Controlling functions :-
sfr
sfr
sfr
sfr
P0=0x80;
P1=0x80;
P1=0x90;
P2=0xA0;
sfr P3=0xB0;
sbit relay = P1^0;
Sbit inc = P1^1;
sbit dec = P1^2;
#define adcdata P3
sbit intr = P2^2; //5
sbit rd
= P2^0; //2
sbit wr
= P2^1; //3
sbit rs = P2^5;
sbit rw = P2^6;
sbit en = P2^7;
unsigned char line[4] = {0x80,0xC0,0x90,0xD0};
#define DBUS
P0
#define BLINKLCD 0x09
#define ONCURSOR
0x0A
#define ONLCD
0x0C
#define CLEARLCD
0x01
#define HOMELCD 0x02
#define ENTRYMODE
0x06
#define FUNCSET 0x38
void wrlcd_cmd(unsigned char cmd );
void wrlcd_data(unsigned char Data );
void delay(unsigned int count);
void wrmsg(char LineNo,char endloc, unsigned char msg[]);
void getdata();
static unsigned char sp=0;
code unsigned char scr5[2] [16] = {" Temp:
" SP:
",
"};
P2=0x0f;
relay=0;
wrlcd_cmd(FUNCSET);
//set data length,no of
disp,2-line display
wrlcd_cmd(ONLCD);
//display and cursor on
wrlcd_cmd(ENTRYMODE); //inc. DDram address,
wrlcd_cmd(CLEARLCD); //Clear display
for(i=0;i<2;i++)
{
delay(100);
wrmsg(line[i],16,scr1[i]);
}
for(i=0;i<15;i++)
delay(50000);
for(i=0;i<2;i++)
{
delay(100);
wrmsg(line[i],16,scr5[i]);
}
while(1)
{
wr=0;
delay(100);
wr=1;
while(intr != 1);
while(intr != 0);
rd=0;
delay(10);
val=adcdata;
rd=1;
wrlcd_cmd(line[0]+9);
x=val/10;
d1=val%10;
d2=x%10;
d3=x/10;
wrlcd_data(d3+0x30);
delay(10);
wrlcd_data(d2+0x30);
wrlcd_data(d1+0x30);
delay(10);
a=(d3*100)+(d2*10)+d1;
wrlcd_data('C');
wrlcd_cmd(line[1]+9);
wrlcd_data((sp/10)+0x30);
wrlcd_data((sp%10)+0x30);
if(inc==0)
{
while(inc==0);
sp++;
}
if( (dec==0) && sp>0 )
while(dec==0);
sp--;
}
if(a>sp)
relay=1;
else
relay=0;
delay(25000);
}
}
void wrlcd_cmd(unsigned char cmd )
{
DBUS = cmd;
delay(10);
rs = 0;
delay(10);
rw = 0;
delay(10);
en = 1;
delay(300);
en = 0;
delay(20);
//write mode
}
void wrlcd_data(unsigned char Data )
{
DBUS = Data;
delay(10);
rs = 1;
//select data reg
delay(10);
rw = 0;
delay(10);
en = 1;
delay(300);
en = 0;
delay(10);
rs = 0;
delay(20);
}
void wrmsg(char LineNo,char endloc, unsigned char msg[])
{
unsigned char i;
wrlcd_cmd(LineNo);
for(i =0;i<=endloc;i++)
{
wrlcd_data(msg[i]);
delay(50);
}
}
void delay(unsigned int dly)
{
while(dly>0)
dly--;
}
V = IR
Resistors are elements of electrical
networks and electronic circuits
10k Variable
Resistor:-
TRANSISTOR:-
RELAY:-
Despite
the
speed
of
technological
developments,
AT89S52 :-
SENSOR-LM35:-
IC-7805:-
LCD:-
80 81 82 83 84 85 86
Second line
C0
C1 C2 C3 C4
through CF
through
C5
C6
1) Enable (E)
This line allows access to the display through R/W
and RS lines. When this line is low, the LCD is disabled
and ignores signals from R/W and RS. When (E) line is
high, the LCD checks the state of the two control lines
and responds accordingly.
2) Read/Write (R/W)
This line determines the direction of data between
the LCD and microcontroller.
When it is low, data is written to the LCD. When it is high,
data is read from the
LCD
.
PIN DESCRIPTION
Most LCDs with 1 controller has 14 Pins and LCDs with 2
controller has 16 Pins
(two pins are extra in both for back-light LED connections).
1. http://www.westfloridacomponents.com
2. http://www.futurlec.com
3. http://www.pdf-search-engine.com/
4. http://www.westfloridacomponents.com
5. http:// www.google.com
6. http://www.datasheetscatalog.com
Books:1. Electronic devices and circuits-2 (R.P Ajwaliya)
2. Mazidee