一个关于键盘显示的问题,8位数码管。如何一直移位显示,不清零
发布网友
发布时间:2023-06-19 01:52
我来回答
共1个回答
热心网友
时间:2023-08-23 10:12
试试看:
……
ORG 00H
SJMP START
ORG 0BH
LJMP INT_T0
START:
MOV LED_BIT_1, #00H
MOV LED_BIT_2, #00H
MOV LED_BIT_3, #00H
MOV LED_BIT_4, #00H
MOV LED_BIT_5, #00H
MOV LED_BIT_6, #00H
MOV LED_BIT_7, #00H
MOV LED_BIT_8, #3FH
A0:
MOV T_COUNT, #00H
MOV KEY_CNT, #00H
MOV LINE, #00H
MOV ROW, #00H
MOV VAL, #00H
MOV DPTR, #TABLE
LCALL DISP
LSCAN:
MOV P3, #0F0H
L1: JNB P3.0, L2
……
……
W10:
MOV A, P3
CJNE A, #0FH, W11
MOV P0, #00H
CLR TR0
LJMP A0 ;加上这一行.
LJMP START
W11:
MOV A, P3
CJNE A, #0F0H, W12
MOV P0, #00H
CLR TR0
LJMP A0 ;加上这一行.
LJMP START
W12:
……
其它不变。追问还是不行啊原来的代码有说明的我发给你看看,你邮箱多少