Process Diagram:
At Maximum Temperature:
At minimum Temperature:
Parts Needed:
1.89s52 microcontroller
2.LM35
3.ADC 0804
4.LCD
1.89s52 microcontroller:
It is used to receive digital values from adc and control the lcd
2.LM35
It is used to sense Temperature.
3.ADC 0804:
It is used to convert analog signal into digital signal
4.LCD:
It will show the output according to the temperature getting from LM35.
How it works:
This project is all about using the ADC feature in 89s52 Microcontroller. ADC will get Analog input from LM35 Fire Sensor. LCD Will show the output variation from 0 to 255 based on temperature degree.
Circuit Diagram:
Code:
org 0x00
mov r1,#38H
call command
mov r1,#0EH
call command
mov r1,#06H
call command
mov r1,#01H
call command
start: clr p3.6
nop
setb p3.6
wait:jb p3.2,wait
acall read
acall conversion
call data2
call data1
call epr
call delay
call delay
call delay
call delay
call delay
call delay
mov r1,#01H
call command
call delay
jmp start
read:
clr p3.7
mov a,p0
mov 30h,a
setb p3.7
ret
delay:
mov r1,#255
l2: mov r0,#255
l1: djnz r0,l1
djnz r1,l2
ret
command:
clr p3.4
mov p2,r1
setb p3.5
call delay
clr p3.5
ret
data2:
setb p3.4
mov p2,r4
setb p3.5
call delay
clr p3.5
ret
data1:
setb p3.4
mov p2,r3
setb p3.5
call delay
clr p3.5
ret
epr:
setb p3.4
mov p2,r2
setb p3.5
call delay
clr p3.5
ret
conversion:
mov b,#10
div ab
mov r2,b
mov b,#10
div ab
orl a,#30h
mov r4,a
mov a,b
orl a,#30h
mov r3,a
mov a,r2
orl a,#30h
mov r2,a
ret
end
Output Image:
Video:
At Maximum Temperature:
At minimum Temperature:
Parts Needed:
1.89s52 microcontroller
2.LM35
3.ADC 0804
4.LCD
1.89s52 microcontroller:
It is used to receive digital values from adc and control the lcd
2.LM35
It is used to sense Temperature.
3.ADC 0804:
It is used to convert analog signal into digital signal
4.LCD:
It will show the output according to the temperature getting from LM35.
How it works:
This project is all about using the ADC feature in 89s52 Microcontroller. ADC will get Analog input from LM35 Fire Sensor. LCD Will show the output variation from 0 to 255 based on temperature degree.
Circuit Diagram:
Code:
org 0x00
mov r1,#38H
call command
mov r1,#0EH
call command
mov r1,#06H
call command
mov r1,#01H
call command
start: clr p3.6
nop
setb p3.6
wait:jb p3.2,wait
acall read
acall conversion
call data2
call data1
call epr
call delay
call delay
call delay
call delay
call delay
call delay
mov r1,#01H
call command
call delay
jmp start
read:
clr p3.7
mov a,p0
mov 30h,a
setb p3.7
ret
delay:
mov r1,#255
l2: mov r0,#255
l1: djnz r0,l1
djnz r1,l2
ret
command:
clr p3.4
mov p2,r1
setb p3.5
call delay
clr p3.5
ret
data2:
setb p3.4
mov p2,r4
setb p3.5
call delay
clr p3.5
ret
data1:
setb p3.4
mov p2,r3
setb p3.5
call delay
clr p3.5
ret
epr:
setb p3.4
mov p2,r2
setb p3.5
call delay
clr p3.5
ret
conversion:
mov b,#10
div ab
mov r2,b
mov b,#10
div ab
orl a,#30h
mov r4,a
mov a,b
orl a,#30h
mov r3,a
mov a,r2
orl a,#30h
mov r2,a
ret
end
Output Image:
Video:
No comments:
Post a Comment