以下秒表控制系统程序是液晶显示,请高手改成二级晶体管显示.TCNTA EQU 30H TCNTB EQU 31H SEC EQU 32H KEYCNT EQU 33H SP1 BIT P3.5 ORG 00H LJMP START ORG 0BH LJMP INT_T0 START:MOV KEYCNT,#00H MOV SEC,#00H MOV A,SEC MOV B,#10 DIV A
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 05:15:11
以下秒表控制系统程序是液晶显示,请高手改成二级晶体管显示.TCNTA EQU 30H TCNTB EQU 31H SEC EQU 32H KEYCNT EQU 33H SP1 BIT P3.5 ORG 00H LJMP START ORG 0BH LJMP INT_T0 START:MOV KEYCNT,#00H MOV SEC,#00H MOV A,SEC MOV B,#10 DIV A
以下秒表控制系统程序是液晶显示,请高手改成二级晶体管显示.
TCNTA EQU 30H
TCNTB EQU 31H
SEC EQU 32H
KEYCNT EQU 33H
SP1 BIT P3.5
ORG 00H
LJMP START
ORG 0BH
LJMP INT_T0
START:MOV KEYCNT,#00H
MOV SEC,#00H
MOV A,SEC
MOV B,#10
DIV AB
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P0,A
MOV A,B
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P2,A
MOV TMOD,#02H
SETB ET0
SETB EA
WT:JB SP1,WT
LCALL DELY10MS
JB SP1,WT
INC KEYCNT
MOV A,KEYCNT
CJNE A,#01H,KN1
SETB TR0
MOV TH0,#06H
MOV TL0,#06H
MOV TCNTA,#00H
MOV TCNTB,#00H
LJMP DKN
KN1:CJNE A,#02H,KN2
CLR TR0
LJMP DKN
KN2:CJNE A,#03H,DKN
MOV SEC,#00H
MOV A,SEC
MOV B,#10
DIV AB
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P0,A
MOV A,B
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P2,A
MOV KEYCNT,#00H
DKN:JNB SP1,$
LJMP WT
DELY10MS:
MOV R6,#20
D1:MOV R7,#248
DJNZ R7,$
DJNZ R6,D1
RET
INT_T0:
INC TCNTA
MOV A,TCNTA
CJNE A,#100,NEXT
MOV TCNTA,#00H
INC TCNTB
MOV A,TCNTB
CJNE A,#4,NEXT
MOV TCNTB,#00H
INC SEC
MOV A,SEC
CJNE A,#100,DONE
MOV SEC,#00H
DONE:MOV A,SEC
MOV B,#10
DIV AB
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P0,A
MOV A,B
MOV DPTR,#TABLE
MOVC A,@A+DPTR
MOV P2,A
NEXT:RETI
TABLE:DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH
END
如果方便,请标上注释...
以下秒表控制系统程序是液晶显示,请高手改成二级晶体管显示.TCNTA EQU 30H TCNTB EQU 31H SEC EQU 32H KEYCNT EQU 33H SP1 BIT P3.5 ORG 00H LJMP START ORG 0BH LJMP INT_T0 START:MOV KEYCNT,#00H MOV SEC,#00H MOV A,SEC MOV B,#10 DIV A
这样就行...