51
单片机 出现问题了 怎么改啊 求助啊 初学者
程序如下
ORG 0000H
LJMP START
ORG 0070H
DB 06H,00H,02H,01H,00H,02H
ORG 0100H
START:MOV DPTR,#0003H
MOV A,#80H
MOVX @DPTR,A
MAIN:LCALL DISPLAY1
LJMP MAIN
DISPLAY1:MOV R0,#70H
MOV R3,#0FEH
MOV A,R3
LD0:MOV DPTR,#0001H
MOVX @DPTR,A
MOV DPTR,#0000H
MOV A,@R0
ADD A,#13
MOVC A,@A+PC
MOVX @DPTR,A
ACALL DELAY
INC R0
MOV A,R3
JNB ACC.5,LD1
RL A
MOV R3,A
LJMP LD0
LD1:RET
DTAB:DB 0C0H,0F9H,0A4H,0B0H,99H
DB 92H,82H,0F8H,80H,90H
DB 88H,83H,0C6H,0A1H,86H
DB 8EH,0FFH,0CH,89H,7FH
DB 0BFH
DELAY: MOV R7,#02H
DELAY1:MOV R6,#0FFH
DELAY2:DJNZ R6,DELAY2
DJNZ R7,DELAY1
RET
END
-
一周热门 更多>