本文包含原理图、PCB、源代码、封装库、中英文PDF等资源
您需要 登录 才可以下载或查看,没有账号?注册会员
×
Build target 'Target 1'
assembling Text1.asm...
linking...
BL51 BANKED LINKER/LOCATER V5.12 - SN: Eval Version
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2004
"Text1.obj"
TO "0000000"
******************************************************************************
* RESTRICTED VERSION WITH 0800H BYTE CODE SIZE LIMIT; USED: 0817H BYTE (101%) *
******************************************************************************
Program Size: data=8.0 xdata=0 code=2296
LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 0 ERROR(S)
*** FATAL ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED
MODULE: Text1.obj (-----)
LIMIT: 0800H BYTES
Target not created
老出现这些又看不懂
/****************************************************************/
ZHUAN BIT 50H ; 闪烁标志位辅助标志位
ZHUAN1 BIT 51H ;年开闪烁的标志位
ZHUAN2 BIT 52H ;月开闪烁的标志位
ZHUAN3 BIT 53H ;日开闪烁的标志位
ZHUAN4 BIT 54H ;时开闪烁的标志位
ZHUAN5 BIT 55H ;分开闪烁的标志位
ZHUAN6 BIT 56H ;秒开闪烁的标志位
ZHUAN7 BIT 57H ;星期开闪烁的标志位
DQ EQU P1.7
/***************************************************************/
ORG 0000H
LJMP START ;开始并初始化
ORG 000BH ;T0中断处处
LJMP ZDUAN
ORG 001BH
LJMP ZDUAN2
ZDUAN:MOV TH0,#00H ;使ZHUAN由正到负周期大约为1.5即当开闪烁时
;每秒大约闪烁1.5次环境
MOV TL0,#00H
DJNZ R7,ZDUAN1
CPL ZHUAN
MOV R7,#5
ZDUAN1:RETI
/***************************************************************/
ZDUAN2:MOV TH1,#0FCH
MOV TL1,#43H
CPL P3.0
RETI
/************开始**************/
ORG 0100H
START:MOV SP,#70H
MOV TMOD,#11H
MOV TH0,#00H
MOV TL0,#00H
MOV TH1,#0FCH
MOV TL1,#43H
SETB EA
SETB ET0
SETB TR0
CLR ZHUAN1
CLR ZHUAN2
CLR ZHUAN3
CLR ZHUAN4
CLR ZHUAN5
CLR ZHUAN6
CLR ZHUAN7
MOV R7,#5
MOV 5FH,#00H
MOV 30H,#00H
MOV 31H,#00H
MOV 32H,#12H
MOV 33H,#09H
MOV 34H,#04H
MOV 35H,#00H
MOV 36H,#00H
MOV R0,#30H
MOV R2,#7
MOV A,#0BEH
LCALL WRITE
CHUSHI:MOV A,@R0
LCALL WRITE
INC R0
DJNZ R2,CHUSHI
/***********主程序**************/
MAIN:LCALL JIAN
LCALL RILI
LCALL WENDU
LCALL XIAN
LJMP CLAK
SJMP MAIN
/**********键盘程序****************/
JIAN:MOV P1,#0FFH
MOV A,P1
CPL A
JNZ JI1
LJMP JIAN5
JI1:LCALL DELAY
MOV A,P1
CPL A
JNZ JI2
LJMP JIAN5
JI2:JNB P1.1,JIAN2
JNB P1.2,JIAN2
JIAN0:MOV P1,#0FFH
JNB P1.3,JIAN3
JNB P1.0,JIAN1
LJMP JIANX
JIAN1:LCALL DELAY
JB P1.0,JIANX
JIAN11:LCALL XIAN
JNB P1.0,JIAN11
MOV A,5FH
ADD A,#1
MOV 5FH,A
CJNE A,#10,JIANX
LJMP JIAN3
JIANX:MOV A,5FH
CJNE A,#1,JIA1
LJMP TIAOM
JIA1:MOV A,5FH
CJNE A,#2,JIA2
LJMP TIAOF
JIA2:MOV A,5FH
CJNE A,#3,JIA3
LJMP TIAOS
JIA3:MOV A,5FH
CJNE A,#4,JIA4
LJMP TIAOR
JIA4:MOV A,5FH
CJNE A,#5,JIA5
LJMP TIAOY
JIA5:MOV A,5FH
CJNE A,#6,JIA6
LJMP TIAON
JIA6:MOV A,5FH
CJNE A,#7,JIA7
LJMP TIAOX
JIA7:MOV A,5FH
CJNE A,#8,JIA8
LJMP TIAODF
JIA8:LJMP TIAODS
JIAN3:CLR ZHUAN1
CLR ZHUAN2
CLR ZHUAN3
CLR ZHUAN4
CLR ZHUAN5
CLR ZHUAN6
CLR ZHUAN7
MOV 5FH,#00H
JIAN2:LCALL XIAN
MOV A,P1
CPL A
JNZ JIAN2
JIAN5:RET
/************调秒***************/
TIAOM:SETB ZHUAN6
LCALL XIAN
JNB P1.1,MIAOZ
JNB P1.2,MIAOJ
LJMP JIAN0
MIAOZ:LCALL DELAY
JNB P1.1,MIAOZ1
LJMP JIAN0
MIAOZ1:LCALL XIAN
JNB P1.1,MIAOZ1
MOV A,30H
ADD A,#1
DA A
MOV 30H,A
CJNE A,#60H,MIAOZ2
MOV 30H,#00H
LJMP MIAOZ2
MIAOJ:LCALL DELAY
JNB P1.2,MIAOJ1
LJMP JIAN0
MIAOJ1:LCALL XIAN
JNB P1.2,MIAOJ1
MOV A,30H
MOV B,#10H
DIV AB
MOV 61H,B
MOV B,#10
MUL AB
ADD A,61H
DEC A
MOV B,#10
DIV AB
SWAP A
ADD A,B
MOV 30H,A
CJNE A,#96H,MIAOZ2
MOV 30H,#59H
MIAOZ2:MOV A,30H
ANL A,#0FH
MOV 40H,A
MOV A,30H
SWAP A
ANL A,#0FH
MOV 41H,A
MOV A,#80H
LCALL WRITE
MOV A,30H
LCALL WRITE
LCALL XIAN
LJMP JIAN0
RET
/*************调分*************/
TIAOF:CLR ZHUAN6
SETB ZHUAN5
LCALL XIAN
JNB P1.1,FENZ
JNB P1.2,FENJ
LJMP JIAN0
FENZ:LCALL DELAY
JNB P1.1,FENZ1
LJMP JIAN0
FENZ1:LCALL XIAN
JNB P1.1,FENZ1
MOV A,31H
ADD A,#1
DA A
MOV 31H,A
CJNE A,#60H,FENZ2
MOV 31H,#00H
LJMP FENZ2
FENJ:LCALL DELAY
JNB P1.2,FENJ1
LJMP JIAN0
FENJ1:LCALL XIAN
JNB P1.2,FENJ1
MOV A,31H
MOV B,#10H
DIV AB
MOV 62H,B
MOV B,#10
MUL AB
ADD A,62H
DEC A
MOV B,#10
DIV AB
SWAP A
ADD A,B
MOV 31H,A
CJNE A,#96H,FENZ2
MOV 31H,#59H
FENZ2:MOV A,31H
ANL A,#0FH
MOV 42H,A
MOV A,31H
SWAP A
ANL A,#0FH
MOV 43H,A
MOV A,#82H
LCALL WRITE
MOV A,31H
LCALL WRITE
LCALL XIAN
LJMP JIAN0
RET
/************调时**************/
TIAOS:CLR ZHUAN5
SETB ZHUAN4
LCALL XIAN
JNB P1.1,SHIZ
JNB P1.2,SHIJ
LJMP JIAN0
SHIZ:LCALL DELAY
JNB P1.1,SHIZ1
LJMP JIAN0
SHIZ1:LCALL XIAN
JNB P1.1,SHIZ1
MOV A,32H
ADD A,#1
DA A
MOV 32H,A
CJNE A,#24H,SHIZ2
MOV 32H,#00H
LJMP SHIZ2
SHIJ:LCALL DELAY
JNB P1.2,SHIJ1
LJMP JIAN0
SHIJ1:LCALL XIAN
JNB P1.2,SHIJ1
MOV A,32H
MOV B,#10H
DIV AB
MOV 63H,B
MOV B,#10
MUL AB
ADD A,63H
DEC A
MOV B,#10
DIV AB
SWAP A
ADD A,B
MOV 32H,A
CJNE A,#96H,SHIZ2
MOV 32H,#23H
SHIZ2:MOV A,32H
ANL A,#0FH
MOV 44H,A
MOV A,32H
SWAP A
ANL A,#0FH
MOV 45H,A
MOV A,#84H
LCALL WRITE
MOV A,32H
LCALL WRITE
LCALL XIAN
LJMP JIAN0
RET
/************调日*************/
TIAOR:CLR ZHUAN4
SETB ZHUAN3
LCALL XIAN
JNB P1.1,RIZ
JNB P1.2,RIJ
LJMP JIAN0
RIZ:LCALL DELAY
JNB P1.1,RIZ1
LJMP JIAN0
RIZ1:LCALL XIAN
JNB P1.1,RIZ1
MOV A,33H
ADD A,#1
DA A
MOV 33H,A
CJNE A,#32H,RIZ2
MOV 33H,#00H
LJMP RIZ2
RIJ:LCALL DELAY
JNB P1.2,RIJ1
LJMP JIAN0
RIJ1:LCALL XIAN
JNB P1.2,RIJ1
MOV A,33H
MOV B,#10H
DIV AB
MOV 64H,B
MOV B,#10
MUL AB
ADD A,64H
DEC A
MOV B,#10
DIV AB
SWAP A
ADD A,B
MOV 33H,A
CJNE A,#96H,RIZ2
MOV 33H,#31H
RIZ2:MOV A,33H
ANL A,#0FH
MOV 46H,A
MOV A,33H
SWAP A
ANL A,#0FH
MOV 47H,A
MOV A,#86H
LCALL WRITE
MOV A,33H
LCALL WRITE
LCALL XIAN
LJMP JIAN0
RET
/*************调月**************/
TIAOY:CLR ZHUAN3
SETB ZHUAN2
LCALL XIAN
JNB P1.1,YUEZ
JNB P1.2,YUEJ
LJMP JIAN0
YUEZ:LCALL DELAY
JNB P1.1,YUEZ1
LJMP JIAN0
YUEZ1:LCALL XIAN
JNB P1.1,YUEZ1
MOV A,34H
ADD A,#1
DA A
MOV 34H,A
CJNE A,#13H,YUEZ2
MOV 34H,#01H
LJMP YUEZ2
YUEJ:LCALL DELAY
JNB P1.2,YUEJ1
LJMP JIAN0
YUEJ1:LCALL XIAN
JNB P1.2,YUEJ1
MOV A,34H
MOV B,#10H
DIV AB
MOV 65H,B
MOV B,#10
MUL AB
ADD A,65H
DEC A
MOV B,#10
DIV AB
SWAP A
ADD A,B
MOV 34H,A
CJNE A,#00H,YUEZ2
MOV 34H,#12H
YUEZ2:MOV A,34H
ANL A,#0FH
MOV 48H,A
MOV A,34H
SWAP A
ANL A,#0FH
MOV 49H,A
MOV A,#88H
LCALL WRITE
MOV A,34H
LCALL WRITE
LCALL XIAN
LJMP JIAN0
RET
/************调年***************/
TIAON:CLR ZHUAN2
SETB ZHUAN1
LCALL XIAN
JNB P1.1,NIANZ
JNB P1.2,NIANJ
LJMP JIAN0
NIANZ:LCALL DELAY
JNB P1.1,NIANZ1
LJMP JIAN0
NIANZ1:LCALL XIAN
JNB P1.1,NIANZ1
MOV A,35H
ADD A,#1
DA A
MOV 35H,A
LJMP NIANZ2
NIANJ:LCALL DELAY
JNB P1.2,NIANJ1
LJMP JIAN0
NIANJ1:LCALL XIAN
JNB P1.2,NIANJ1
MOV A,35H
MOV B,#10H
DIV AB
MOV 66H,B
MOV B,#10
MUL AB
ADD A,66H
DEC A
MOV B,#10
DIV AB
SWAP A
ADD A,B
MOV 35H,A
CJNE A,#96H,NIANZ2
MOV 35H,#99H
NIANZ2:MOV A,35H
ANL A,#0FH
MOV 4AH,A
MOV A,35H
SWAP A
ANL A,#0FH
MOV 4BH,A
MOV A,#8CH
LCALL WRITE
MOV A,35H
LCALL WRITE
LCALL XIAN
LJMP JIAN0
RET
/**********调星期*****************/
TIAOX:CLR ZHUAN1
SETB ZHUAN7
LCALL XIAN
JNB P1.1,XQZ
JNB P1.2,XQJ
LJMP JIAN0
XQZ:LCALL DELAY
JNB P1.1,XQZ1
LJMP JIAN0
XQZ1:LCALL XIAN
JNB P1.1,XQZ1
MOV A,38H
ADD A,#1
DA A
MOV 38H,A
CJNE A,#08H,XQZ2
MOV 38H,#01H
LJMP XQZ2
XQJ:LCALL DELAY
JNB P1.2,XQJ1
LJMP JIAN0
XQJ1:LCALL XIAN
JNB P1.2,XQJ1
MOV A,38H
MOV B,#10H
DIV AB
MOV 67H,B
MOV B,#10
MUL AB
ADD A,67H
DEC A
MOV B,#10
DIV AB
SWAP A
ADD A,B
MOV 38H,A
CJNE A,#00H,XQZ2
MOV 38H,#07H
XQZ2:MOV A,#9AH
LCALL WRITE
MOV A,38H
LCALL WRITE
LCALL XIAN
LJMP JIAN0
RET
/*************定时调分**************/
TIAODF:CLR ZHUAN7
SETB ZHUAN5
MOV A,3EH
ANL A,#0FH
MOV 42H,A
MOV A,3EH
SWAP A
ANL A,#0FH
MOV 43H,A
MOV 40H,#00H
MOV 41H,#00H
MOV A,3FH
ANL A,#0FH
MOV 44H,A
MOV A,3FH
SWAP A
ANL A,#0FH
MOV 45H,A
LCALL XIAN
JNB P1.1,DSFZ
JNB P1.2,DSFJ
LJMP JIAN0
DSFZ:LCALL DELAY
JNB P1.1,DSFZ1
LJMP JIAN0
DSFZ1:LCALL XIAN
JNB P1.1,DSFZ1
MOV A,3EH
ADD A,#1
DA A
MOV 3EH,A
CJNE A,#60H,DSFZ2
MOV 3EH,#00H
LJMP DSFZ2
DSFJ:LCALL DELAY
JNB P1.2,DSFJ1
LJMP JIAN0
DSFJ1:LCALL XIAN
JNB P1.2,DSFJ1
MOV A,3EH
MOV B,#10H
DIV AB
MOV 68H,B
MOV B,#10
MUL AB
ADD A,68H
DEC A
MOV B,#10
DIV AB
SWAP A
ADD A,B
MOV 3EH,A
CJNE A,#96H,DSFZ2
MOV 3EH,#59H
DSFZ2:MOV A,3EH
ANL A,#0FH
MOV 42H,A
MOV A,3EH
SWAP A
ANL A,#0FH
MOV 43H,A
MOV 40H,#00H
MOV 41H,#00H
LCALL XIAN
LJMP JIAN0
RET
/************定时调时***************/
TIAODS:CLR |