0% found this document useful (0 votes)
37 views4 pages

Listing Program

The document contains code for controlling a heating system. It uses timers and buttons to control components like a motor, heater, and conveyor. Temperature is also measured using an analog to digital converter.

Uploaded by

barrunsiswo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views4 pages

Listing Program

The document contains code for controlling a heating system. It uses timers and buttons to control components like a motor, heater, and conveyor. Temperature is also measured using an analog to digital converter.

Uploaded by

barrunsiswo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

#include <sfr51.

inc>
mov tmod,#01h
mov p0,#0
mov p2,#0
mov p3,#0
main: jnb p2.0,main
acall ambil
acall aal
acall ce!"tombol
sjmp main
timer:
mov r3,#100
mov th0,#1000
timers: setb tr0
acall ambil
ait: jnb tf0,ait
clr tr0
clr tf0
djn# r3,timers
acall ambil
ret

ti$a"puluhdeti!: acall timer
djn# r1,ti$a"puluhdeti!
ret
ti$a"menit: acall timer
djn# r1,ti$a"menit
ret
aal: setb p2.1
setb p2.2 %heater
mov r1,#3
acall ti$a"puluhdeti!
clr p2.1 %motor
acall ce!"suhu
setb p2.1
mov r1,#&
acall ti$a"menit
clr p2.2
clr p2.1
setb p2,5 % !onve'or
jalan: jnb p2.&,jalan % infrared
setb p2.3 % selenoid
mov r1,#1
()(** sepuluh"deti!
clr p2.3 %selenoid
jb p2.0,main
ret
sepuluh"deti!: acall timer
djn# r1,sepuluh"deti!
ret
ce!"tombol: acall ambil
jnb p2.5,ce!"tombol
acall ambil
jb p2.0,main
setb p2.3
mov r1,#2
acall sepuluh"deti!
clr p2.3
sjmp ce!"tombol
ret

ce!"suhu: clr (
acall (+,-*
mov (,.0
)/01 (,#20,ce!"suhu
.13

(+,-*: ()(** 4-3506
()(** 417,)8
()(** 09(*(
ret
(8): )*. :3.2
;13, :3.3
)*. :3.3
;13, :3.3
.13
%:.<;185. :106(+,-*(0 8(3(
%==================================
4-3506: +<> (, :1
()(** (8)
+<> 8:3.,#3(,1*09(
+<>) (,?(@8:3.
+<> .0,(
.13


%:.<;185. A<0>1.;- 417( A1 ,)8
417,)8: +<> 224, #004
A"1000: +<> (, .0
;5,, (, #01B4
+<> 304, (
+<> (,.2
;5,, (, #034
+<> 314, (
/,) )9, ;(35;
-0) 224
+<> .0, 304
+<> .2, 314
;/+: A"1000
;(35;: +<> 2C4, #004
A"100: +<> (, .0
;5,, (, #2&4
+<> 304, (
+<> (, .2
;5,, (, #004
+<> 314, (
/,) )9, ;:*4
-0) 2C4
+<> .0, 304
+<> .2, 314
;/+: A"100
;:*4: +<> ,, #0(4
+<> (, .0
8-> (,
+<> 2B4, (
+<> (, ,
+<> 2D4, (
.13
%:.<;185. +109(*(A(0 ;1>10 ;16+103
09(*(: +<> .&, #304
09(*(1: +<> (, 224
<.* (, #C04
+<> :0, (
()(** 3508(
+<> (, 2C4
<.* (, #0,04
+<> :0, (
()(** 3508(
+<> (, 2B4
<.* (, #0804
+<> :0, (
()(** 3508(
+<> (, 2D4
<.* (, #0104
+<> :0, (
()(** 3508(
8/0E .&,09(*(1
.13
3508(: +<> .C, #004
*<<:: +<> .2, #004
*<<:1: -0) .2
)/01 .2, #200,*<<:1
-0) .C
)/01 .C, #1,*<<:
.13
3(,1*09(: 8,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,B,D,10,11,12,13,1&,15,12,1C,1B,1D,20,21,22,
23,2&,25,22,2C
8,
2B,2D,30,31,32,33,3&,35,32,3C,3B,3D,&0,&1,&2,&3,&&,&5,&2,&C,&B,&D,50,51,52,53,5&,55,
52,5C,5B,5D,20,20,21,22,23,2&,25,22,2C,2B,2D,C0,C1,C2,C3,C&,C5
8,
C2,CC,CB,CD,B0,B1,B2,B3,B&,B5,B2,BC,BB,BD,D0,D1,D2,D3,D&,D5,D2,DC,DB,DD,100

108

You might also like