版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
TEMPER_LEQU40H;用于保存读出温度的高8位
TEMPER_HEQU41H;用于保存读出温度的低8位
FLAG1EQU42H;是否检测到DS18B20标志位
a_bitequ43h;数码管个位数存放内存位置
b_bitequ44h;数码管十位数存放内存位置
T_RSTBitP3.6;实时时钟复位线引脚
T_CLKBitP3.4;实时时钟时钟线引脚
T_IOBitP3.5;实时时钟数据线引脚
SECONDEQU45H
MINUTEEQU46H
HOUREQU47H
DAYEQU48H
MONTHEQU49H
WEEKEQU4AH
YEARLEQU4BH
CSAEQUp2.4
CSBEQUp2.3
rsEQUP2.2
rwEQUP2.1
EEQUP2.0
COMEQU21H
DATEQU22H
columnEQU23H
pagefEQU24h
cpageEQU25H
ccolumnEQU26H
codesEQU27h
column?EQU28H
pagef2equ29h
cpage2EQU2aH
ccolumn2EQU2bH
column3EQU2eH
pagef3equ2fh
cpage3EQU30H
ccolumn3EQU31H
column4EQU32H
pagef4equ33h
cpage4EQU34H
ccolumn4EQU35H
columnsEQU36H
pagef5equ37h
cpage5EQU38H
ccolumn5EQU39H
ORGO
UMPSTART
ORG3
UMPXXO
ORG13H
UMPXX1
.*********************************************主程序开始
START:MOVTMODZ#01H
MOVTHO,#03cH;置定时器初值(定时50ms)
MOVTLO,#OBOH
SETBTRO;启动定时器0
MOVS?#60H;修改堆栈
LCALLINT;调用初始化子程序
LCALLCLEAR;调用清屏子程序
.*********************************************固定显示字符
movcolumn3,#48
movpagef3,#0
movcodes,#8年
Icallwriteleft2
movcolumn4,#16
movpagef4,#0
movcodes,#9月
Icallwriteright2
movcolumn4,#48
movpagef4,#0II
movcodes,#10
Icallwriteright2
movcolumn3,#0
movpagef3,#2;;;星
movcodes,#11
Icallwriteleft2
movcolumns,#16
movpagef3,#2;;;;;;期
movcodes,#12
IcallwriteleftZ
movcolumn4,#0
movpagef4,#2;;;;;;:
movcodes,#13
Icallwriteright2
movcolumn4,#32
movpagef4,#2
movcodes,#13;;;;;;:
Icallwriteright2
movcolumn4,#48
movpagef4,#4
movcodes,#15;;;;;;渡
Icallwriteright2
movcolumn,#16
movpagef,#O
movcodes,#2
Icallwriteleft
movcolumn,#24
movpagef,#O
movcodes,#。
Icallwriteleft
movcolumn4z#0
movpagef4,#4
movcodes,#17;;;;;;;;日
Icallwriteright2
.**************************笨小孩制作,860822
Icalla26
Icalla27
Icalla28
Icalla29
Icalla30
Icalla31
Icalla32
Icalla33
Icalla34
Icalla35
Icalla36
.*************************************************固定显示字符结束
MOVDAY#01H;初始日期设为08年1月1日星期一
MOVMONTH,#01H
MOVYEARL,#08H
LCALLSETDS1302;设置DS1302初始时间
LCALLGET1302;从DS1302读取时间
LCALLDISPLAY;数码显示子程序
MOVR3,#4;循环20次到一秒
SETBEA
SETBEXO
setbITO
SETBEXI
SETBIT1
LP1:JNBP3.1,QQ0;当p3.1口为低电平时跳过读取时间子程序
IJMPQQ2
QQO:MOVTH0,#03CH
MOVTLO,#OBOH
SETBTRO
MOV93H,#0
LCALLNIU;将调整后的时间放入时分秒星期年月日寄存器中
LCALLSETDS1302;设置DS1302初始时间
LCALLGET1302;从DS1302读取时间
LCALLDISPLAY;用12864显示
QQ2:JBCTFO,QQ1
UMPLP1
QQ1:MOVTH0,#03CH
MOVTLOZ#OBOH
LCALLGET1302;每过5OMs从DS1302读取一次忖间
LCALLDISPLAY
.**********************************日制不呈开女台,公历节日者I'能髭示^
MOVA,49H
CINEA,#01HzZZ0
MOVA,48H
CINEA,#01H,VV0
MOV71H,#19
LCALLA8
MOV70H,#18
LCALLA7
MOV92HZ#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
VVO:CJNEA,#15H,SS0
MOV70H,#20
LCALLA7
MOV71H,#21
LCALLA8
MOV92H,#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
SSO:LCALLHAHA
UMPQQQ
ZZO:CJNEAz#O2H,ZZl
MOVA,48H
CINEAz#14H,vv4
MOV70H,#22
LCALLA7
MOV71H,#23
LCALLA8
MOV92H,#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
vv4:CJNEA,#02Hzvv5
MOV70H,#53
LCALLA7
MOV71H,#54
LCALLA8
MOV92H,#55
LCALLA40
MOV91H,#56
LCALLA41
UMPQQQ
vv5:CJNEAz#10H,SS99
MOV70H,#41
LCALLA7
MOV71H,#57
LCALLA8
MOV92H,#58
LCALLA40
MOV91H,#59
LCALLA41
UMPQQQ
SS99:LCALLHAHA
UMPQQQ
YOUO:UMPZZ2
ZZ1:CJNEA,#03H,YOU0
MOVA,48H
CJNEA,#08H,VV6
MOV70H,#24
LCALLA7
MOV71H,#25
LCALLA8
MOV92HZ#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
VV6:CJNEA,#01H,VV7
MOV70H,#41
LCALLA7
MOV71H,#57
LCALLA8
MOV92H,#60
LCALLA40
MOV91H,#61
LCALLA41
UMPQQQ
VV7:CJNEA,#03H,VV8
MOV70H,#62
LCALLA7
MOV71HZ#41
LCALLA8
MOV92H,#63
LCALLA40
MOV91H,#64
LCALLA41
UMPQQQ
VV8:CJNEA,#05H,VV9
MOV70H,#65
LCALLA7
MOV71H,#66
LCALLA8
MOV92H,#67
LCALLA40
MOV91H,#68
LCALLA41
UMPQQQ
W9:CJNEA,#12H,VV10
8V11VD1
t-srniz.AOIAI
N11VD1
ESrHOZ.AOIAI
HAA^HTZ^VSNfD^TAA
DODdiAin
TW11VD1
O9#ZH16AOIAI
OVV11VD1
Z2#'HC6AOIAI
8V11VD1
ZS^HTZ.AOIAI
N11VD1
Ttz^HOZAOIAI
£[AA'HZJ#'vmNQmAA
000dlAIH
TW11VD1
9Z#'HI6AOIAI
OVVUVD!
SZ^HZGAOIAI
8V11VD1
t7Z#zHlZ.AOIAI
ZV11VD1
£Z#'HOZAOIAI
ZlAA^SirvaND^TM
000diAin
TtzV11VD1
“#'HI6AolAl
OVV11VD1
IZ^HZGAOIAI
8V11VD1
ZS#zHl£AOIAI
ZV11VD1
TV^HOZAOIAI
TTAA^izT^VaNfD^lAA
Ot)OdlAIH
TWllVDl
0TZrHT6AOIAI
OVV11VD1
0TC#'HZ:6AOIAI
8V11V31
OZ#'H"AOIAI
L\f11VD1
69#'H0ZAOIAI
MOV92H,#78
LCALLA40
MOV91H,#79
LCALLA41
UMPQQQ
VV14:CJNEA,#22H,VV15
MOV70H,#53
LCALLA7
MOV71H,#54
LCALLA8
MOV92H,#80
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
VV15:CJNEA,#23H,VV16
MOV70H,#81
LCALLA7
MOV71H,#82
LCALLA8
MOV92HZ#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
VV16:CJNEA,#24H,VV17
MOV70H,#83
LCALLA7
MOV71H,#84
LCALLA8
MOV92H,#85
LCALLA40
MOV91H,#86
LCALLA41
UMPQQQ
W17:CJNEA,#25H,SS1
MOV70H,#87
LCALLA7
MOV71H,#62
LCALLA8
MOV92H,#39
LCALLA40
MOV91H,#88
LCALLA41
UMPQQQ
SS1:LCALLHAHA
UMPQQQ
YOU1:UMPZZ3
ZZ2:CJNEA,#04H,YOU1
MOVA,48H
CJNEA,#O1H,VV1
MOV70H,#26
LCALLA7
MOV71H,#27
LCALLA8
MOV92H,#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
VV1:CJNEA,#04HzVV18
MOV70H,#28
LCALLA7
MOV71H,#29
LCALLA8
MOV92H,#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
VV18:CJNEA,#07H,VV19
MOV70H,#53
LCALLA7
MOV71H,#54
LCALLA8
MOV92H,#89
LCALLA40
MOV91H,#90
LCALLA41
UMPQQQ
VV19:CJNEA,#22H,VV20
MOV70H,#53
LCALLA7
MOV71H,#54
LCALLA8
MOV92H,#56
LCALLA4O
MOV91H,#91
LCALLA41
UMPQQQ
W20:CJNEA,#23H,SS2
MOV70H,#92
LCALLA7
MOV71H,#93
LCALLA8
MOV92H,#94
LCALLA40
MOV91H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LA7
MOV71HZ#90
LCALLA8
MOV92HZ#124
LCALLA40
MOV91H,#125
LCALLA41
UMPQQQ
VV28:CJNEA,#23H,VV29
MOV70H,#41
LCALLA7
MOV71H,#57
LCALLA8
MOV92H,#126
LCALLA40
MOV91H,#127
LCALLA41
UMPQQQ
VV29:CJNEA,#31H,ss3
MOV70H,#53
LCALLA7
MOV71H,#54
LCALLA8
MOV92H,#128
LCALLA40
MOV91H,#129
LCALLA41
UMPQQQ
SS3:LCALLHAHA
UMPQQQ
YOU3:UMPZZ10
ZZ4:CJNEA,#06H,YOU3
MOVA,48H
CJNEA,#15H,VV30
MOV70H,#36
LCALLA7
MOV71H,#35
LCALLA8
MOV92H,#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
VV30:CJNEA,#O1H,VV31
MOV70H,#41
LCALLA7
MOV71H,#57
LCALLA8
MOV92H,#131
LCALLA40
MOV91H,#132
LCALLA41
UMPQQQ
VV31:CJNEA,#17HZVV32
MOV70H,#83
LCALLA7
MOV71H,#204
LCALLA8
MOV92HZ#133
LCALLA40
MOV91HZ#134
LCALLA41
UMPQQQ
VV32:CJNEA,#23H,VV33
MOV7OH,#135
LCALLA7
MOV71H,#79
LCALLA8
MOV92H,#136
LCALLA40
MOV91H,#137
LCALLA41
UMPQQQ
VV33:CJNEA,#25H,VV34
MOV70H,#62
LCALLA7
MOV71H,#41
LCALLA8
MOV92H,#138
LCALLA40
MOV91H,#56
LCALLA41
UMPQQQ
VV34:CJNEA,#26H,SS4
MOV70H,#41
LCALLA7
MOV71H,#57
LCALLA8
MOV92H,#139
LCALLA40
MOV91H,#140
LCALLA41
UMPQQQ
SS4:LCALLHAHA
UMPQQQ
YOU4:UMPZZ5
ZZ1O:CJNEA,#07H,YOU4
MOVA,48H
CJNEA,#01H,VV35
MOV70H,#141
LCALLA7
MOV71H,#142
LCALLA8
MOV92H,#106
LCALLA40
MOV91H,#107
LCALLA41
UMPQQQ
VV35:CJNEA,#02H,VV36
MOV70H,#143
LCALLA7
MOV71H,#88
LCALLA8
MOV92H,#144
LCALLA40
MOV91HZ#145
LCALLA41
UMPQQQ
VV36:CJNEA,#07H,VV37
MOV70Hz#146
LCALLA7
MOV71H,#147
LCALLA8
MOV92H,#67
LCALLA40
MOV91H,#68
LCALLA41
UMPQQQ
VV37:CJNEA,#11H,VV38
MOV70H,#53
LCALLA7
MOV71H,#54
LCALLA8
MOV92H,#23
LCALLA40
MOV91HZ#148
LCALLA41
UMPQQQ
VV38:CJNEAz#30H,SS10
MOV70H,#149
LCALLA7
MOV71H,#150
LCALLA8
MOV92H,#24
LCALLA40
MOV91H,#25
LCALLA41
UMPQQQ
SS1O1CALLHAHA
UMPQQQ
YOU5:UMPZZ6
ZZ5:CJNEA,#08H,YOU5
MOVA,48H
CJNEA,#01H,VV39
MOV70H,#37
LCALLA7
MOV71H,#38
LCALLA8
MOV92H,#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
VV39:CJNEA,#08H,VV40
MOV7OH,#153
LCALLA7
MOV71H,#153
LCALLA8
MOV92H,#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
VV40:CJNEA,#15H,SS5
MOV70H,#146
LCALLA7
MOV71H,#147
LCALLA8
MOV92H,#154
LCALLA40
MOV91H,#155
LCALLA41
UMPQQQ
SS5:LCALLHAHA
UMPQQQ
YOU6:UMPZZ7
ZZ6:CJNEA,#09H,YOU6
MOVA,48H
CJNEA,#10HzVV41
MOV70H,#39
LCALLA7
MOV71H,#40
LCALLA8
MOV92HZ#210
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
W41:CJNEA,#08H,VV42
8V11VD1
ZTM'HTZ.AOIAI
N11VD1
9U#'H0Z.AOIAI
SZAA'H8C#'VmNQ:SW\A
DODdlAin
TW11VD1
STI#ZH16AOIAI
OVV11VD1
t7U#'HC6AOIAI
8V11VD1
VS^HIZ.AOIAI
N11VD1
£S#'HOZAOIAI
St7/\A'HZ7#'VmND:i7tzA/\
000dlAIH
TW11VD1
£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
VV66:CJNEA,#03H,VV67
MOV7OH,#122
LCALLA7
MOV71H,#193
661#'HI6AolAl
OVVIIVJI
S02#zHZ6AOIAI
8VIIVDI
Z8#zHTZAOIAI
NIIVJI
86T#zH0ZAOIAI
TZAA^ZT^V3NfD:0Z.AA
000diAin
IW11VD1
Z.6TrHl6AOIAI
017V11VD1
£Z#'HC6AOIAI
8V11V31
VS^HTZ.AOIAI
Z.VUVD!
£S#'HOZ.AOIAI
OZAA'HOI#'V3NfD:69AA
DOOdlAIH
IVVIIVDI
TG^HIGAOIAI
OVV11VD1
96T#'HC6AOIAI
8VUVD1
VS^HTZ.AOIAI
Z.V11VD1
£S#'HOZ.AOIAI
69/\A'H60#'V孤。:89AA
000dlAIH
IVV11V31
ZSirHlGAOIAI
OVV11X01
b6I#'HZ6AOIAI
8V11VD1
ZETrMTZAOIAI
Z.VnvDi
T£[#'HOZAOIAI
89AA'H80#'VmNQZ9AA
DODdlAIH
TVV11VD1
0TZ#zHT6AOIAI
OWUVD!
WHC6AOIAI
8VIWDI
LCALLA41
UMPQQQ
W71:CJNEA,#13H,VV72
MOV70H,#200
LCALLA7
MOV71H,#201
LCALLA8
MOV92H,#202
LCALLA40
MOV91H,#2O3
LCALLA41
UMPQQQ
VV72:CJNEA,#2OH,VV73
MOV70H,#104
LCALLA7
MOV71H,#105
LCALLA8
MOV92H,#106
LCALLA40
MOV91H,#107
LCALLA41
UMPQQQ
VV73:CJNEA,#21HZVV74
MOV70H,#41
LCALLA7
MOV71H,#57
LCALLA8
MOV92H,#108
LCALLA40
MOV91H,#91
LCALLA41
UMPQQQ
VV74:CJNEA,#24H,ss9
MOV70H,#151
LCALLA7
MOV71H,#87
LCALLA8
MOV92HZ#152
LCALLA40
MOV91H,#210
LCALLA41
UMPQQQ
ril:ljmpIpl
ss9:LCALLHAHA
.******************************************节日设置结束
QQQ:DJNZR3,SS100;未到IS继续循环
LCALLGET_TEMPER;每过1s从DS18B20读取一次温度
movR3,#4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;整点闹铃1分钟同时在最左上角显示铃铛符号,合上闹铃开关可以提前
关掉闹铃
MOVA,46H
CJNEA,#O,SS1OO
LCALLNAO
LCALLNAO
LCALLNAO
LCALLNAO
LCALLNAO
movcolumn3,#0
movpagef3,#0
movcodes,#206;开闹铃符号
Icallwriteleft2
SS100:MOVA,45H
ONEA,#59H,RI1
movcolumn3,#0
movpagef3,#0
movcodes,#210;关闹铃符号
Icallwriteleft2
UMPIpl
.************************主结束,了开始
HAHA:MOV70H,#151
LCALLA7
MOV71H,#52
LCALLA8
MOV92H,#210
LCALLA40
MOV91H,#210
LCALLA41
RET
NIU:
MOVA,51H
SWAPA
ADDA,50H
MOV45H,A
mova,53h
swapa
adda,52h
mov46h,a
mova,55h
swapa
adda,54h
mov47h,a
mova,57h
swapa
adda,56h
mov48h,a
mova,59h
swapa
adda,58h
mov49h,a
mova,5dh
swapa
adda,5ch
mov4bh,a
mov4ahz5ah
RET
.********************************************中Q
xxO:PUSHACC
clrtrO
MOVA,93H
CJNEA,#O,ZDOOOO;秒低位
inc50h
LCALLA13
movA,5OH
CJNEA,#1O,KKO
MOV50H,#0
kkO:POPACC
RETI
ZDOOOO:CJNEA,#1,ZDOO1;秒高位
inc51h
Icallal4
MOVAZ51H
CJNEA,#1O,KK1
MOV51H,#0
kkl:POPACC
RETI
ZDOO1:CJNEA,#2,ZD002;分低位
INC52H
Icallal5
MOVAZ52H
CJNEA,#1O,KK3
MOV52H,#0
kk3:POPACC
RETI
ZD002:CJNEA,#3,ZD003;分高位
INC53H
Icallal6
MOVA,53H
CINEA,#10,KK4
MOV53H,#0
inc52h
kk4:POPACC
RETI
zd003:CJNEA,#4,ZD004;时低位
INC54H
Icallal7
MOVA,54H
CJNEA,#1OZKK5
MOV54H,#0
kk5:POPACC
RETI
ZD004:CJNEA,#5,ZD005;时高位
INC55H
Icallal8
MOVA,55H
CJNEA,#9,KK6
MOV55H,#0
kk6:POPACC
RETI
;星期
ZD005:CJNEA,#6zZD006
INC5aH
Icallal9
MOVA,5aH
CJNEA,#7,KK7
MOV5aH,#0
kk7:POPACC
RETI
ZD006:CJNEA,#7,ZD007;日低位
INC56H
Icalla20
MOVA,56H
CJNEA,#10,KK8
MOV56H,#0
kk8:POPACC
RETI
ZD007:CJNEA,#8,ZD008;日高位
INC57H
Icalla21
MOVA,57H
CINEA,#10,KK9
MOV57H,#0
kk9:POPACC
RETI
ZD008:CJNEA,#9,ZD009;月低位
INC58H
Icalla22
MOVA,58H
CINEA,#1O,KK1O
MOV58H,#0
kklO:POPACC
RETI
;月高位
ZD009:CJNEA,#1OZZDOO1O
INC59H
Icalla23
MOVA,59H
CINEMlO^Kll
MOV59H,#0
kkll:POPACC
RETI
ZDOO1O:CJNEA,#11,ZDOO11;年低位
INC5cH
Icalla24
MOVA,5cH
CINEA,#10,KK12
MOV5cH,#0
kkl2:POPACC
RETI
ZD0011:INC5dH
Icalla25;年高位
MOVA,5dH
CJNEA,#1O,KK13
MOV5dH,#O
kkl3:POPACC
RETI
.******************************************************
f
XX1:PUSHACC
INC93H
MOVA,02H
CINEA,#13,ZD1O
MOV93H,#0
ZD10:popacc
reti
;温度显示子程序
INIT_1820:SETBP3.7
CLRP3.7
MOVRI,#3
TSR1:MOVRO,#107
DJNZR0,$
DJNZR1JSR1
SETBP3.7
MOVRO,#25H
TSR2:JNBP3.7,TSR3
DJNZR0JSR2
UMPTSR4
TSR3:SETBFLAG1
UMPTSR5
TSR4:CLRFLAG1
UMPTSR7
TSR5:MOVRO,#117
TSR6:DJNZR0,TSR6
TSR7:SETBP3.7
RET
GET_TEMPER:SETBP3.7
LCALLINIT_1820
JBFLAG1JSS2
RET
TSS2:MOVA,#OCCH
LCALLWRITE_1820
MOVA,#44H
LCALLWRITE_1820
LCALLDISPLAY1
LCALLINIT_1820
MOVA,#OCCH
LCALLWRITE_1820
MOVA,#OBEH
LCALLWRITE_1820
LCALLREAD_18200
RET
WRITE_1820:MOVR2,#8
CLRC
WRI:CLRP3.7
MOVR3,#6
DJNZR3,$
RRCA
MOVP3.7,C
MOVR3,#23
DJNZR3,$
SETBP3.7
NOP
DJNZR2,WR1
SETBP3.7
RET
READ_18200:MOVR5,#2
MOVRl,#41h
REOO:MOVR2,#8
REO1:CLRC
SETBP3.7
CLRP3.7
SETBP3.7
MOVR3,#7
RE1O:DJNZR3,RE10
MOVC,P3.7
MOVR3,#23
RE2O:DJNZR3,RE2O
RRCA
DJNZR2,RE01
MOV@R1,A
DECRI
DJNZR5,RE00
RET
DISPLAY1:MOVA,40H
JBACC.7,ZF1
movcolumn4,#16
movpagef4,#4
movcodes,#250
Icallwriteright2
Ijmpzhijie
ZFl:movcolumn4,#16
movpagef4,#4
movcodes,#16;;;
Icallwriteright2
mova,40h
epia
movdph,a
mova,41h
epia
movdpi,a
incdptr
mov40h,dph
mov41h,dpl
zhijie:MOVA,40H
SWAPA
ANLA,#OFOH
MOV40H,A
MOVA,41H
SWAPA
ANLA,#OFH
ADDA,40H
MOV41H,A
MOVB,#10
DIVAB
MOVb_bit,A
MOVa_bit,B
movcolumn2,#32
movpagef2,#4
movcodes,b_bit;;;;;;;;;十位
Icallwriteright
movcolumn2,#40
movpagef2,#4
movcodes,a_bit;;;;;;;个位
Icallwriteright
RET
;数码显示子程序
DISPLAY:
.*******************************************
/
;显示秒
MOVA,SECOND
ANLA,#OFH
MOV50HzA
LCALLA13
MOVA,SECOND
SWAPA
ANLA,#07H
MOV51H,A
LCALLA14
;显示分
MOVA,MINUTE
ANLA,#OFH
MOV52H,A
LCALLA15
MOVA,MINUTE
SWAPA
ANLA,#07H
MOV53H,A
LCALLA16
/
;显示小时
MOVA,HOUR
ANLA,#OFH
MOV54HZA
LCALLA17
MOVA,HOUR
SWAPA
ANLA,#03H
MOV55H,A
LCALLA18
;显示星期
MOVA,WEEK
MOV5AH,A
LCALLA19
;显示日
MOVA,DAY
ANLA,#OFH
MOV56H,A
LCALLA20
MOVA,DAY
SWAPA
ANLA,#03H
MOV57H,A
LCALLA21
;显示月
MOVAZMONTH
ANLA,#OFH
MOV58H,A
LCALLA22
MOVA,MONTH
SWAPA
ANLA,#03H
MOV59H,A
LCALLA23
;显示年
MOVA,YEARL
ANLA,#OFH
MOV5CH,A
LCALLA24
MOVA,YEARL
SWAPA
ANLA,#OFH
MOV5DH,A
LCALLA25
RET
;设置DS1302初始时间,并启动计时
SETDS13O2:
CLRT_RST
nop
CLRT_CLK
nop
SETBT_RST
nop
MOVB,#8EH;写控制命令字
LCALLINPUTBYTE
MOVB,#OOH;写保护关闭
LCALLINPUTBYTE
SETBT_CLK
nop
CLRT_RST
MOVRO,#SECOND;内存中的时间首地址
MOVRI,#80H;DS1302中的时间首地址
MOVR7,#7;字节数
SETLOOP:
CLRT_RST
nop
CLRT_CLK
nop
SETBT_RST
nop
MOVB,R1;写命令字
LCALLINPUTBYTE
MOVA,@R0;设置时间
MOVB,A
LCALLINPUTBYTE
INCRO
INCRI
INCRI
SETBT_CLK
nop
CLRT_RST
nop
DJNZR7,SETLOOP
CLRT_RST
nop
CLRT_CLK
nop
SETBT_RST
nop
MOVB,#8EH
LCALLINPUTBYTE
MOVB,#80H;开写保护
LCALLINPUTBYTE
SETBT_CLK
nop
CLRT_RST
nop
RET
/
;从DS1302读取时间
GET1302:
MOVRO,#SECOND
MOVR1,#81H;DS1302中读时间的首地址
MOVR7,#7
GETLOOP:
CLRT_RST
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论