单片机综合花样流水灯Word文件下载.docx
《单片机综合花样流水灯Word文件下载.docx》由会员分享,可在线阅读,更多相关《单片机综合花样流水灯Word文件下载.docx(23页珍藏版)》请在冰豆网上搜索。
MOVP0,#0AAH
MOVP1,#0AAH
MOVP2,#0AAH
MOVP3,#0AAH
MOVP0,#55H
MOVP1,#55H
MOVP2,#55H
MOVP3,#55H
DJNZR3,BS10
-----------------------------------
---流水部分1------------------------------------------------
MOVR3,#3
LS:
MOVR2,#9
MOVA,#00H
KK:
SETBC
MOVP3,A
RLCA
LCALLDELAY
DJNZR2,KK
KK1:
MOVP2,A
RRCA
DJNZR2,KK1
KK2:
MOVP1,A
DJNZR2,KK2
KK3:
MOVP0,A
DJNZR2,KK3
DJNZR3,LS
---流水部分2------------------------------------------------
LS2:
KK32:
DJNZR2,KK32
MOVA,#00H
KK22:
DJNZR2,KK22
KK12:
DJNZR2,KK12
KK222:
DJNZR2,KK222
DJNZR3,LS2
---流水部分3------------------------------------------------
LS3:
KKI:
DJNZR2,KKI
KKI1:
DJNZR2,KKI1
KKI2:
DJNZR2,KKI2
KKI3:
DJNZR2,KKI3
MOVA,#0FFH
IK3:
CLRC
DJNZR2,IK3
IK2:
DJNZR2,IK2
KI1:
DJNZR2,KI1
MOVA,#0FFH
KI:
DJNZR2,KI
DJNZR3,LS3
--跑马灯----------------------------------------------
MOVR3,#3;
跑马灯循环次数
PM1:
KKP:
DJNZR2,KKP
KK1P:
DJNZR2,KK1P
KK2P:
DJNZR2,KK2P
KK3P:
DJNZR2,KK3P
DJNZR3,PM1
------双向对顶跑马灯---------------------------------------------
MOVR3,#10;
双跑马灯循环次数
SPM:
MOV50H,#20
A0:
MOVR4,50H
MOV30H,#80H
MOV31H,#01H
MOVR2,#8
B0:
MOVA,30H
RRA
MOV30H,A
MOVA,31H
RLA
MOV31H,A
DJNZR2,B0
MOVA,#80H
B1:
DJNZR2,B1
DEC50H
DJNZR3,SPM
---------变速走马---------------------
MOVR2,#5
BPM:
MOV30H,#100
B0B:
LCALLDELAY3
DEC30H
DJNZR3,B0B
B1B:
DJNZR3,B1B
MOVA,#01H
B2B:
DJNZR3,B2B
B3B:
DJNZR3,B3B
DJNZR2,BPM
-------双向对顶跑马灯------------------------------------
MOVR2,#2
SBPM:
MOV50H,#12
MOV40H,#6
SA0:
SB0:
LCALLDELAY2
DJNZR3,SB0
SB1:
DJNZR3,SB1
DJNZ40H,SA0
DJNZR2,SBPM
---对撞部分----------------------------------------
DZLS:
MOVR7,#00H
MOVR6,#00H
MOVR5,#00H
MOVR4,#00H
dzk:
MOVA,R7
MOVR7,A
MOVA,R6
MOVR6,A
DJNZR2,dzk
dzk1:
MOVA,R5
MOVR5,A
MOVA,R4
MOVR4,A
DJNZR2,dzk1
MOVR7,#0FFH
MOVR6,#0FFH
MOVR5,#0FFH
MOVR4,#0FFH
dz1:
DJNZR2,dz1
dz:
DJNZR2,dz
DJNZR3,DZLS
DZLS1:
dzs1:
setbC
DJNZR2,dzs1
dz11:
DJNZR2,dz11
dzsk:
DJNZR2,dzsk
dzks1:
DJNZR2,dzks1
DJNZR3,DZLS1
DZLS2:
dzk2:
DJNZR2,dzk2
dzk12:
DJNZR2,dzk12
dz12:
DJNZR2,dz12
dz2:
DJNZR2,dz2
DJNZR3,DZLS2
DZLS3:
dzk3:
DJNZR2,dzk3
dzk13:
DJNZR2,dzk13
dz13:
DJNZR2,dz13
dz3:
DJNZR2,dz3
DJNZR3,DZLS3
'
------------------------------------
MOVR3,#50
BS:
LCALLDEL
DJNZR3,BS
DELAY4:
MOVR0,#200
LL14:
MOVR1,#200
DJNZR1,$
DJNZR0,LL14
RET
DELAY:
MOVR0,#100
LL1:
MOVR1,#100
DJNZR0,LL1
DELAY1:
LL:
MOVR1,#100
DJNZR0,LL
DEL:
DECA
MOVR3,A
LLZ:
MOVR1,#170
L:
MOVR2,#1
DJNZR2,$
DJNZR1,L
DJNZR3,LLZ
DELAY2:
D1:
MOVR5,#50
D2:
MOVR6,#100
DJNZR6,$
DJNZR5,D2
DJNZR4,D1
DELAY3:
MOVR4,#3
D13:
MOVR5,30H
D23:
MOVR6,#255
DJNZR5,D23
DJNZR4,D13
END