用發(fā)光二極管實(shí)現(xiàn)跑馬燈--單片機(jī)仿真實(shí)驗(yàn)
作業(yè)題目:用匯編語言實(shí)現(xiàn)跑馬燈
本文引用地址:http://butianyuan.cn/article/201611/320744.htm作業(yè)要求:用發(fā)光二極管實(shí)現(xiàn)跑馬燈效果,八個(gè)發(fā)光二極管從上到下跑兩遍,閃兩下;
程序流程圖:
發(fā)光二極管的應(yīng)用仿真效果圖:
匯編語言的源程序:
LED EQ P1
ORG 00H
SJMP Start
ORG 30H
Start: MOV
NEXT: MOV
MOV
ACALL
AA: RL A
DJNZ
MOV
DJNZ
BB: CRL A
DJNZ R0,BB
NEXT1:MOV
DJNZ
MOV
DJNZ
BB: CRL A
DJNZ R0,BB
AJMP Start
DELAY: MOV R6,#50H
DJNZ R5,DELAY
RET
END
評(píng)論