单片机控制8个LED灯泡从左到右依次点亮,最后全部亮,然后从左到右依次熄灭,全部熄灭后重复前面的过程 10
请大家帮我看一下我写的有问题没,谢谢ORG0000HMOVA#FEHRET1:MOVP0,AMOVTOMD,#01HMOVTH1,#3CHMOVTL1,#0B0HSETB...
请大家帮我看一下我写的有问题没,谢谢
ORG 0000H
MOV A #FEH
RET1: MOV P0,A
MOV TOMD,#01H
MOV TH1,#3CH
MOV TL1,#0B0H
SETB TR0
AGA1: JBC TF0,NEXT1
SJMP AGA1
NEXT1:
RL A
DJNZ A,RET1
BACK:
MOV P0,A
MOV TOMD,#01H
MOV TH1,#01H
MOV TL1,#0B0H
SETB TR0
AGA2:JBC TF0,NEXT2
SJMP AGA2
NEXT2:
RL A
INC A
CJNE A,#FFH, BACK
SJMP RET1
END 展开
ORG 0000H
MOV A #FEH
RET1: MOV P0,A
MOV TOMD,#01H
MOV TH1,#3CH
MOV TL1,#0B0H
SETB TR0
AGA1: JBC TF0,NEXT1
SJMP AGA1
NEXT1:
RL A
DJNZ A,RET1
BACK:
MOV P0,A
MOV TOMD,#01H
MOV TH1,#01H
MOV TL1,#0B0H
SETB TR0
AGA2:JBC TF0,NEXT2
SJMP AGA2
NEXT2:
RL A
INC A
CJNE A,#FFH, BACK
SJMP RET1
END 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询