3 ?
T |?
!y?
3 ?
T C?y# 
?
"d 7?
? cI?y??
!9
'c1?
$I?y? 2¥'ì
T
à·
7¥?
?¨
I¥à
Q
??
!9¥??'ZE
¨???
s|??
?ì??
°V??
???
?I?y??
!9'à
Q
I?y# ? 2
S|?T
<
"¥?T
÷?T
> ?
d
I?y??
!9?¥
9
o
MY=é?
—— ·
7
e'
^
? a
M訥
E
Bé?

Eé?
¥b
 ·
7
"S}

?}
F?¥?T
D?T
b
=é?
?F?ao?ép¥
?b
?#
ja#C
E
Bé?
L?:k¥=é?
¥e?
Tb

j"j'a)I
#$%
¨=é?
Vr¥
Eé?
b

jV
U1j#a#C
)I
I?yI?'5
I?y¨ù:?
í
¥·
7¥"b
I??I?yI¥??1ùIry 
Ir?1
"S}

9
?
MYb??Iry 
?1I??b
<S|>?T
<
"¥?T
><
÷?T
><?
d>
?·
7?[ "—' 7h¥
E
Bé?
-A?@B?
“”b
?=é?
A?{a,#”,C”
E
Bé?
A?
{a,)”,I”
Eé?
¥a
^,%”,E”í
à·
7
I
H  e?T¨1
&i?á
3 
7
?
^1I?¥Bt·
7?1à·
7bà·
7?
?$·
7"db
訥à·
7μ[/+?
? 
Sà·
7 03( 0SJHJO
?
?03(/
"S??¥ 
S1? b

T03(ê1?
03()
45"35.07")
"%%")
.07)"
03()V
U?à·
7/
?BH·
7¥ 
S1?
^)'.07")·
7¥?B?3?1?1
)S|45"35}V¥1?1)b
?2
à·
7 &/%
?
I?y÷??¥2
S?b
&/%a
¥·
7I???) ? b

T&/%
à?′à·
7 &26
&RVBUF

T 3?
? &26
I?|
?
|B?
+?¥I?|?í?
¥3?
?b
è ? 11&263 113
.07"11 "3
? ú|11?′1I?|3·
7?11ü V[}9
3 ?
P¨b
á
1??′à·
7 %"5"

T 3?
? %"5" Vr
T
?
|
1?}
1??í?¥
3?
?b
? ?l3?à·
7%#
%FGJOF#ZUF

T %#ê=é?
V
?
V·?¥1??í 7
S?l ??
?ê
=i?í¥
b
D
-W¨,”séb
è ?
03()
5"# %#)“"”“”
5"#%##
[
·
7üIa|) 7
S¥ ??
=i?
í?′b )
) )
%) ?¥
é?


? ?l3à·
7%8
%FGJOF8PSE

T %8ê=é?
V
?
V·?¥1??í 7
S?l
???ê
b
? ?lê1?à·
7#*5
?
|ê1??í
?¥3?
?b

T 3?
? #*5 ê1?
"2#*51
%&'#*5)
ü1¥ê1??ó3?"2üê1?)?ó3
?%&'b a¥I??"2 VT1
P¨%&' VT
ê1?)
P¨b
?I
|I?y÷??D19

MY
¥ ?y}
??¥V??1Ib
I Vs1
?
myI
? 9
I
/
??é?
myI b
1??
!9¥'ZE
I??1 p
??1???¥?
?7 O1 p
3?
 ya]¨
=i
aH ? b a
ZLaL?M±a F
ó7
L¨b
B???[/+???é?
òsù5 ??
E35
±
^
ó
@?m
?I÷??
?I?
k
@?m?|
a
ü
?=?I?y??
!9  è
B
¨???
¨???
^·?
¨?GQ3?¥??9
?1e???°L??b
¨???2
ù ?1?e??9
??
B?¥?
?
^?ˉ??¥$b
$0/5.07 "
3 ?ê
$1- "  |Q
"%% "
 F
.07 3
" i?ê
.07 "
3 úê
$1- "  |Q
"%%$ "
) Féê#?|ê
.073
" iúê
3&5 
X?ê=é?μ
ib33?
k p 
?
i|2Ti33?b
3=é?μ
¥ p?ZE VB21o pQFp?|
ê?Mb ?¨$1-·
7
LC pQ F
H5??ê5F
úêF
?ê¥éêb?i? ú?
¨*/$·
7
y1*/$·
7??YS?êb
?? ?/
è|3?#$%
1=é?
ié3b

N0??/B è?1¨?
03()
#$%#.07" 3 | ? g

"/-" ') |
Eê
48"1"úê ? ê
.07# ")
.6-"#
Eêe
.073" ié3
.07" 3 | ? g

"/-" ') |?ê
"%%" 3
.073"2T 3
3&5 ??
^0?? V¨&/%
=s|??
? ?]Hq_?]¥) ???
??2¥???1s|??b
$·
7"d?¥ HqM·
7 a
1?M·
7

êM·
7  V[
LCs
|??b
X?9a: (1ê=é?μ?|
sYi
))?
kI?
LC/
?|f
¥??
LC?? ?/
|"4$**
D1
E
Bé?
b
!"4$**
b ?F
"?D2Tb?#?b
3?"4$**
V V
V?)j)1
j¥"4$**
)j)1"j'¥"4$**
b|
"4$**
h) j
) "j'
ü V¤?¥
E
Bé?
b?? ?/
X?è
^ ?m
U1 p
LC
?4???/
£§

?§

? 4???/
s§

? §

è ? f ?

b
3?? ?/
4(/-"/-1
#£
s§
03-1
#?1a1
{ ?

1j1
?M
4-+/#1
4- 1
4??/

4
+/#1
3&% 1
4?/ O1
4??/
£§
:&-84&5#1 §
$-31 £§
$-31 
s§
4+.14- ?ì
4-+/#1
:&-8 1
4??/1
4??/
§
(3&/4&5#1 
s§
$-31 £§
$-31 §
4+.14- ?ì
3&%4&5#1 £§
$-31 
s§
$-31 §
4+.14- ?ì
[
5

^#§
1 p]

} è~5 ?? a
H·
7 +/#1

+/#1?/
1 p?
?
k×?I?b
ò +# 1l
+# 1l
ó +# 1l
+/#1l
? +/#1l
+# 1l
? ?ì??
?ì??B? ?[/+??s
ò?ì′
ó?ì8
??ì??
??ì e?
[

1?s V[μ
?F??
Tb
!9J (1?3?
i?
¨?ib[ )1
n1?
¥
= 3".i%?í?
é
?
 /i 3?
kI? p 49 9 &?&? 9/i| 4
3?ib
 33?
! 4!b
3?? ?/
49/.073
/  ?
é ?ìQ

.073
)?í úê
b
.073
)?í ?ê
b
.073
) p
u
n?
-001.07"
3   -Q?ê
"%%"
!3  ?ê ?F
.073
"  i?ê
$-3"
"%%$"
3 úêFéê
.073
" iúê
*/$3 ·_/B
?ì??
%+/;3
-001
/?
?F??$ ?ì e?
3&5 |?ì |?ì
?
?


′
?

8
!
=3".) 7
S¥i% uμ ???3?
3X?
KaB?13?,” i Ooμ?BB?

kd9?t3?

3¥?
d92Ti |)?íb
3?? ?/
=?3".)?í 7
Siμ?

ks ?K
v¥

?."9?íb
3?? ?/
èq?ìü
HN4 ??.)[
- 5NV4N4V4
- .073O EBUB /01
^? ?
ù·
7
- %+/;3OSFM
^
 ?
ù·
7
- $)')
03()
%&-":.0735N
-001.0735N
/015N
-001%+/;3-0015N
%+/;3-0015N
3&55N
  
Y


 

Y
èq?ìü
H4 ??.)[
- 5NV44V4
- .073O EBUB
^? ?
ù·
7
- %+/;3OSFM
^
 ?
ù·
7
03()
%-4 .073
%-.073
%-.073

%-%+/;3
%-
%+/;3%-
%+/;3%-
3&5
Iü
HNT0??
GPTD.)[b
3GPTD.)[B? ?
ù1 μTb
%:NT.073
???ìQ
%-1.073
?
=?ìQ
%-1%+/;3
%-1???
%+/;3
%-1???
3&5
a
ü.073O·
71? ?
ù
%+/;·
71? ?
ù
3&5·
71? ?
ù
\} [
5~ ?/
1 pIü
H0??
ò ü
HNTGPTD.)[
ó ü
HNTGPTD.)[
? ü
HTGPTD.)[
I?B??ì ú
-§¥??b
!$?
¥ 1 gT1
{ gü z?è
^
-4 QM ?

 z? 


o?;=5 ?m

Ub?
{ê1 op
H?;=5?

{ê1
op
H1àb
kI?
LC
?§ ú
-?
QM
?/B?§ ú
-?
Q?ì??b
'-"4).07"
) ?§
′
'4).073
")? ú
-Q
'-01.071
" ?
-$"--%:T ü
H T
.071
)
-$"--%:T ü
H T
%+/;3
'-01 ú
- Q
3- " PMBê
4+.1'4) ?ì
3&5 
3?? ?/

H0?? V? ü
Hé
1?Ib
X? 1 g

? NT
?BQ
k p 
T
=¥
ü (′

ü (′i )b
3'53 p?
¥
ü (′
B?μ
?ZE
B?
^ ?? ?Fa
ü (
6B?
^H
ü (H ?F
Có
?ZE¥??b
"73(.073
 ? ê ?F7i  b 
.073
 úú ê ?F7i  b 
.073
 ?
ü (Q
"-01.07"
1  1 g

"%%"
3 ? ê ?F
.073
" íi
$-3" úú êDéê ?F
"%%$"
3 
.073
" íi
-$"--%:NT ü
H NT
%+/;3
"-01 
Q ?F??$????
.07"
3 Q ?F?
p
ü (′
$"
1"a#
.07#
3 
.073
) ?
W?
.073
 ?"

"
133
.073
 
-$"--46, "a#
? 3a3

 !3
?
"
$+/&"

/&95 
1
? ?
/&95+$ (3&5 $
!


*/$ ) $
?
 ?
(3&53&5 
"73( .07 )
 
 ?F7i  b 
.07 )
 ?
?F7i  b 
.07 3
 ?
ü (Q
"-01 .07 "
1  1 g

.07 #
 ?"

ü (Q

%*7 "# 1 g
"[ 
"%% "
) 
 ?F
.07)
" íi
.07"
# 
"%% "
) ?
?F
.07 )
" íi
$-3 $ 
46## "
 
+$ (0/ ?
?F! 
?
?F7i ?M
*/$ ) ?
?F ?

 ?F7i  
.07 )
" h ? aμ 1?
?F7i 
(0/ -$"-- %:NT ü
H NT
%+/; 3
"-01 
Q ?F??$????
.07 "
) Q ?F?8
?
?F
1
? ?
$+/& "

/&95 
/&95 +$ (3&5 $
!


*/$ ) $
?
 ?
(3&5 3&5 3&5
} [
5 ~
X?
?
"d
? NT?BQ?
 ê?"%′i+
y?
7i 
4#6'?
ksY p  T

s
=¥
ü (′

sYi )

)b
1°V??
¨?°V¥·
7μ
H
ò .07$"
!" %153
ó .07$"
!" 1$
?¨%153T?7i 
H °V¥??s ??
? ?′
Vì
n1?1%153
? M?′
V?1°¥[DVì
n1?-W¥
W?3?
1"
è 3?.07$"!" %153b
?¨ 1$T?7i 
H  Vì
n1?D 1$′W 
?
?V 3? OI?1
Y59
z
êM
1?
PbyNB? f ?/¨ %153T?7i b
?
?¨"d?è¨-&%
5A
U
?
A
U
3 ?
DA
U
3I
i?M]31|A
U
3D1A
U3
Yè
^¨°V¥ZEb
C1 p|)?¥A
U
3D1A
U3
ii ?
)bX?
|3
V
n?15"#%b
3I? ?/
$)"(.07%153
5"#%?
|3
V
n?
.07"
)A
U
3
.07$"
!" %153°V
D1A
U3
.07)
"iA
U3
3&5
5"#%%#')
)
#)
')
)j
|3
V
%#%)
%)
)
')
')j
|3
V
} [
5 ~
X? êA
U
3Xi ?
n?1 )
¥
= 3".?
k| D1
|A
U3

i ?
n?1 )¥
= 3".?b
¨°V?? pj-W?
¥ ?ZbX???
i
=
3".)?°¤ ?Z
i
=3".)
úê)bX?
?ZV
3?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el  
è q | ó3
!9MD?e ?m
!
9A1
H?
P¨_??
e ?mé ?_?[ ? e ?m¥? ??b
° em
!9
??e ?m
!9a V[
P¨ Protel |e ?mD? PCB mi? PCB
!
95"d¥?L1 p1?
3?¥ PCB TA1¥????B? V¨¥
PCB mb
° ?
í qi?
k
? q?
?
k??a?
?¨" d¥?q
!9ü
'??
b
(2) èq
!9
° èq2
!9
??q
!9??aü
 8
ü ? èq ¥
!91 pb èq2
!9¥ ?ü
^s???
 vü?
M? ?¥ ??s?B??
 v
^B?è¨
¥ZE ?
?"a
3
roaSDa
A
UC
 v?b
 vs
aéB?
ü ?ò
 v-W¥1"b I
n B?"d¥KaB?931W%¥
@
?m
[í
 ve?
^ˉ?μA1ò
 v¥
@?mb
° ê4 7?
ü

?y
??
!9?y??
!9r
qμ×v?Y bI?y
^K1訥B???
!
9?y¨
I¥??}
úe°¤
_?qb?I?y¥I?r
q?
/?^
ê

"d¥ 7??
ùbC 
R?¨¥?
"d 7??y
^
C51 ?Keil C51 Franklin C51 ? ? -?¥
P¨ |??μ?z¥/
|?b
° èq
!9¥Bt×1e5
a?1
P¨ èqJWa·
7 o?? V L?
!9/
  71
¥
{ /
{D

P¨ PLC
R?¨¥ á
í/

P¨
3
ro/
a5é?
¥ e?
E4ú
?| F ?
?"d¥ e?ú ?¨ ?¥
2 ?e
¥i%_
ì  s ?¨z"d¥'÷+Y
^?
¥
=??
?q èq
 v¥s
? pS?
 v
=?¥ú
=

 v-W¥?
}b
?
"d¥ V L?
!9
?
"d¥ V L? V[¨
ü (í#p
HW MTBF
ü (?ˉ
HW MTTR
?
 MTBF?D V
v7 MTTR ?D V
lb"d¥ V L?
!9
?¥
= ?
Es<W ?"d¥ F? ?
!9
^ V L?
!9¥?1
= ?b
V L?
!9e5
(1) e 5¥?L1 ?bB?1S?è÷LD V
Y H
ü??|L ?
V é 

¥?| D V
<°<L

E q
3 qs 7<LV
¤ d?
V l?|Lμ1L
à7?b
(2) ê4aéè÷b

E

{ ?
¨¥è÷Kz
^L?è÷ 
?s D
V
?¨?o?l¥è÷b
(3) 9F ? £n
@ ??
"d?¥?
q q? I
n
?
 ? £ b
(4) ê4
z¥?2b?
?¨"d¥ T8J8?μB? ¥ <b
(5) ê4μé
 £¥í q
(6) D V
ê4 CMOS q[???
?¨"d¥?{b
(7) Fq¥ o ?êb'
P
^
aá
9μQ
¥ V
 q o
V[_? q¥?
a??üV oa1"é
μM¥ qb
(8) ?
!9?
=?
bè ?
?-
P¨
^?
?¨"d
!9? 4
ú V L?¥è¨ZEb ?
 q¥ z?
?a SSR ¥μ
??? A
?
= s?
b
(9)
!9?1 I
n
^ 1y1C??¥
^C`
^? VE
¥b
(10) ?¨? ?/

!9
z¥¤1"d
(11) ?¨ o?
!9 b ? V L?1 pú¥?
"d V
[ I
n
 o? o?
¥
!9Z?b
(12) Sz èq ¥ V L?
!9 ??¨ A
ê/
a?ì á
í
/
a o?·
7/
a
L
H
?/
?b
?¨? èìa?S?"d
(1) 3 ps
ìa?S?"d<W1¨?tMl ua
Lóyy
!!
=??b ?1
?
·S ?/
? V[S? 8 ?ìa??| V[ ? 
? ?
S?1 0.00¥j99.9¥ V[ ? ? 55¥j125¥ú1
0.5¥
è¨4 ê
5é??ìA
U ?KúêA
UY?4
U? AjH? 3
êA
U
L=?′
e MDB?Y?é?
}
@A
U
é V[
H° A·?Y?¥?′
? ?
b
(2) 98Z?
!9
?"d?1??_?
?"
?s F?b/
 
?
LCZ?
Z?B?_? V[
P¨?? £
}s èE
?"?s5
P¨{μ
A/D Y?¥?
b I
n?B?¥ A/D
{ ?Y??o

lv?|
[
?
!9M?¥bvè
^bNZ?¥ èq e???qˉ O_??
F
H?'μ?v9é?b
Z?=
P¨?
?9L?.? ?b?9L?.?  V[
?¨ DALLAS
3
3á¥DS18B20 "
? ??.? °¤
{
3?| O
^?.?  V[+ 1 H9L

]]¨?
¥ 1
HI/O L' V
LC¤ gb4
6?
 I/O L z?
?¥ -4/ ?

V[ ?i ? _?¥??
b
1?
?Z?a V[?CZ?=÷
a?¨T'"d¥
L
@Z?bD
5Z?=?31 A/D? I
n?"d ? ?y
í?
 V[ê¨
ADuc812[L?31¥
H ? ?
i%a D/A
{a? e??
?
b
(3) ?q
!9
DS18B20 ¥???l
?
T-B ?m
Ub
DQ 1
3?|
{ ? /
{
 GND 1è÷1 VDD 1?¤è÷b
DS18B20 ¥; Y ROM ?iμ 64
ê?
|
V[ AT
^?
DS18B20 ¥1??

b 64 ê
; Y ROM¥

^ 7
S 8 ê

28H
^á
??S|¤"¥
48 ê
^? DS18B20 1
&¥?

|Ka 8 ê
^ -
56 ê¥?ì o?n

CRC=X8+X5+X4+1b;
Y ROM ¥T¨
^
P
B?
DS18B20 ?μ?B¥1??

[ ? B?9L
+¤
? DS18B20b
?
YV

7
LC DS18B20 ¥ e?  |?¥?1

7 ?V
U b
DS18B20 ¥ˉê?Ta ? T? A ? NV? ì¥
H? b1 ?DS18B20
¥W%o

P¨ZE V[? I 

m¨b
??3? 0 ??
′¥? 8 ê' b7 b6 b5 b4 b3 b2 b1 b0
?ú3? 1 ??
′¥ú 3 ê#?|ê' S S S S S b10 b9
b8
?úK 2 ?T
K9 V[¨T1?l3?
?úK 3 ?T/K9 V[¨T1?l3?
¥?7i  4 ì
T10 R1 R0 1 1 1 1 1R1 R0 100a01a10a
11 ?¥sO
qsY1 9a10a11 12 ê
 ??
|ê

= 5 ??l

= 6 ??l

= 7 ??l
n
8 ?X8X5X41  - 8 ?3?é? CRC n
7i 
? 1?
a
ü

7
?
a
ü
33H  ROM ?¥64 ê1??

55H oμ1?
¥¥ DS18B2 ?

sa?¥

7
F0H
í?9L
 DS18B20 ¥?

MY  ROM ?¥64 ê1??

ECH oμ??V
K/K¥ DS18B20?SY?
44H ? DS18B20 é??D2Ti ? 9 3?¥ i7i 
CCH-
{1??


a?
DS18B20
BEH  9 3? i7i 
4EH  ??
 //K?
a
^ 2 3?
?
K/K′
48H | 9 3? i7i ¥? 3 4 3?ˉ?? EEPROM ?
B8H | EEPROM ¥
= ?ˉ? i7i ¥? 3 4 3?
DS18B20 ˉê
H?
DS18B20  /
H?
(4) èq
!9
? èq
 v¥s
?"d¥ e? èq V[s1?

S??a?
H?
??? DS18B20 ¤ g???
 vb?

S
????f
LC?1???
H  T0aT1 ¥
Sa
?"d¥
S??
b?
H  T0 ?f
? 5ms
3?1 Q?
A
U 1 ê
5 ?
H  T1 ?f
? 50ms ? 1 Q
? 20 Q
1
e' | 1
^
DS18B20 ¥?}
D1?′·s???
a
?A
U
ub DS18B20 ¤ g???1?ˉêf
aêf
a3?f
aêf
a3?f
a
?f
?F?b
? I??
#include <aduc812.h>
#include <intrins.h>
sbit led0=P3^4; //P3.4jP3.7 ¨T 4 ê LED ¥êêL
sbit led1=P3^5;
sbit led2=P3^6;
sbit led3=P3^7;
sbit DQ = P2^4; //P2.4 ¨T DS18B20 ¥
L DQ
float data TMP[2]={0,0}; // |a¥ 2 ??′,| "[ 2 ' V¤
L=?;
unsigned char data f[2]={0,0}; //2T
^?1μ?,"0"1??,"1"1μ?b
unsigned char data disp_buf[4]={0,0,0,0}; //4 ê
5?¥′b ??
u
unsigned char data dot_position=0;
unsigned char data chno=0; //?

^ DS18B20
//iò
^ DS18B20 ¥1??
|1L??
ko
!9
 2
^ V[ ? ? 8
^÷
unsigned char code SN[2][8]={ {16,62,148,60,0,0,0,247},{16,229,146,60,0,0,0,
87} };
//
3 0j9Y?4
U? AjH ¥
unsigned char code
seg_table[ ]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,
0x77,0x7c,0x39,0x5e,0x79,0x71,0x6f,0x76};
unsigned char code CH[ ]={10,11,12,13,14,15,16,17}; //Y?4
U?¥
êM

//| 0.00j999 -W¥??
1??
i
A
U
uRíl
?¥
ê?
void ftochar(float valp)
{
if(valp<10.0)
{
dot_position=1;
valp *=100.0;
}
else if((valp>=10.0)&&(valp<100.0))
{
dot_position=2;
valp *=10.0;
}
else if((valp>=100.0)&&(valp<1000.0)) dot_position=3;
disp_buf[1]=(int)valp/100;
disp_buf[2]=((int)valp%100)/10;
disp_buf[3]=((int)valp%100)%10;
}
//ü
H 15 ±
ó¥f
void delay(unsigned char n)
{
do {
_nop_();_nop_();_nop_();_nop_();_nop_();_nop_(); //_nop_()¥hóq1intrins.h
_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();
n--;
}while(n);
}
//DS18B20 ˉêf
?ˉê
H?é?
!9
void ow_reset(void)
{
DQ = 0; // DQ ?1?è
ü
delay(36); //  ? 4800 s
DQ = 1; // DQ ?1úè
ü
delay(24); // ü
H? DS18B20
{?è
ü
}
//DS18B20 êf
?ê
H?é?
!9
unsigned char read_bit(void)
{
unsigned char i;
DQ = 0; // DQ ?1?è
ü
DQ = 1; // DQ ?1úè
ü
for (i=0; i<5; i++); // ü
H 150 s
return(DQ); // Rí DQ L¥è
ü
}
// DS18B20 êf
?ê
H?é?
!9
void write_bit(char bitval)
{
DQ = 0; // DQ ?1?è
ü
if(bitval==1) DQ =1; // ?T1 5DQ ?1úè
ü
delay(6); // ü
H[??è
ü
DQ = 1; // DQ ?1úè
ü
}
// VDS18B20  |3?¥f
unsigned char read_byte(void)
{
unsigned char i;
unsigned char value = 0;
for (i=0;i<8;i++)
{
if(read_bit()) value|=0x01<<i; //?¨êf
¥ 8 ?êMê? 1 ?3?
delay(11); //ü
H[?/¥ê
}
return(value);
}
//3??DS18B20 ¥f
void write_byte(char val)
{
unsigned char i;
unsigned char temp;
for (i=0; i<8; i++) //
Q1 ê 1 ?3?s 8 Q??
{
temp = val>>i;
temp &= 0x01;
write_bit(temp); //?¨êf
}
delay(10); //ü
H
}
// VDS18B20 t?}
void read_temp ()
{
unsigned char i,j;
unsigned char a,b;
int mr;
for(j=0;j<2;j++) //1L??
k?[ 2
^1 è??ìQ
' V ? ? 8
^
÷
{
ow_reset(); //?¨ˉêf
delay(20);
write_byte (0x55); //?
ROM


7
for(i=0;i<8;i++)
{
write_byte(SN[j][i]); //?
64 ê?
|
}
write_byte (0xbe); //?
 | i7i ¥

7
a = read_byte(); // ?? |
ê??/

àμ
L=
P¨
H?

b = read_byte(); // ié?n[4ú V L?
mr=b*256+a;
if((mr&0xf800)!=0) mr=-mr+1;
TMP[j]=mr*0.5;
}
}
//?
H T0 ?f

? 1 QA
U 1 ê
5
void Time_disp(void) interrupt 1
{
static unsigned char dispno=0; //
5ê|
TH0=0xee; //?
111.0592?
H5ms ¥
HWè
1 EE00H
TL0=0x00;
P3|=0xf0;
P0=seg_table[disp_buf[dispno]]; //°? -
5¥A
U
3?¥
if(dispno==dot_position) P0|=0x80; //? -êμl
?5
Kúê? 1
switch(dispno) //? ? -A
U¥
5¤YêêL
{
case 0,led0=0; break;
case 1,led1=0; break;
case 2,led2=0; break;
case 3,led3=0; break;
}
dispno++;
if(dispno==4) dispno=0;
}
//?
H T1 ??f

50ms ? 1 Q
void Timer1(void) interrupt 3
{
static unsigned int count;
TH1=0x4c; //50ms ?¥
HWè
1 4C00H
TL1=0x00;
count++;
if(count>=20) //? 20 Q'1 1
e
{
count=0;
ftochar(TMP[chno]); //? -Y??¥?′D1??
A
U
u
disp_buf[0]=CH[chno]; //? -Y?¥4
U?¥
êM

A
U
u
n1
?
chno++;
if(chno= =2) chno=0; //??N
?¥
′' V ? ? 8
^÷
}
}
//?f
main( )
{
TMOD=0x11; //?
H T0 T1 ?Z
T 1 yT
EA=1;
ET0=1;
ET1=1;
TH0=0xee; //5ms ?¥
HWè
TL0=0x00;
TH1=0x4c; //50ms ?¥
HWè
TL1=0x00;
TR0=1;
TR1=1;
do {
ow_reset( ); //ˉê DS18B20
write_byte(0xcc);
write_byte(0x44); // ? 1820
read_temp( ); //?¨ |?¥f
,2Ti? TMP[ ]
F?
}while(1);
}
'cl2
'c?
?
"d¥
!9ZEa??#4ú"d V
L?¥n
@
!9e5ó
B?dè
L¨¥?

e?"d¥
!9V?
?
L è?V41 pa
!9Z
? ??a?1í q¥ê4a?q
!9a èq
!9?+
?Z
F[W%
ió
"de ?m??
@?
mb
L è 4
?
kYV¥÷??b4¥"d
ù ?e
??
^μ?ú¥? IN′b
± I5
1a B??
 e?"d¥
!9B?31+???$
2a ?
 e?"d¥?q
!9??i
'tù5$
3a ?
 e?"d¥ èq
!9??i
'tù5$
4a ?
 e?"d¥ V L?
!9??i
'tù5$
5a ?
 e?"d V L?
!9¥e5μ
't$
L
!9 ? TB? ? ¨ "5$¥?
 K l"d 
P  
èq¥ e?/
P
?£
s?;5
}
@?

eb
ORG 0000H
LJMP MAIN  ???
ORG 0003H  ??? 0 ? g1?
LJMP EXTER  ???
ORG 1000H
MAIN SETB IT0  ??? 0aμKμr
SETB EX0  ??? 0
?
SETB EA  9?
?
LOOP AJMP LOOP  ???
ORG 1050H  ??? ? g
EXTER MOV R2#0FFH  ??ìQ
MOV A#01H  §
′
FLASH RR A  ·MBê
MOV R7 #0FFH
LOOP1 MOV R6 #0FFH
LOOP2 NOP
NOP  èqü
H
DJNZ R6LOOP2
DJNZ R7LOOP1
MOV P1A  §
DJNZ R2FLASH  ?ì
RETI  Rí
END