ORG 00H
AJMP MAIN
MAIN:
MOV R0,#3
MAIN1:
MOV P2,#0FH
ACALL D2S
MOV P2,#0FFH
ACALL D2S
DJNZ R0,MAIN1
MOV R0,#3
MAIN2:
MOV P2,#0F0H
ACALL D2S
MOV P2,#0FFH
ACALL D2S
DJNZ R0,MAIN2
AJMP MAIN
D2S:
MOV R7,#20
MOV R6,#200
MOV R5,#250
DJNZ R5,$
DJNZ R6,$-4
DJNZ R7,$-8
RET
END
org 00h
ss:mov r6,#3
aa: mov p2,#0xF0
acall ys
mov p2,#0xFF
acall ys
djnz r6,aa
mov r7,#3
qq:mov p2,#0xF
acall ys
mov p2,#0xFF
acall ys
djnz r7,qq
jmp ss
ys: mov r4,#10
mov r2,#200
dd1:mov r3,#250
dd2:djnz r3,dd2
djnz r2,dd1
djnz r4,dd1
ret
end
MOV P1,#0F0H
ACALL DELAY
MOV P1,#00H
ACALL DELAY
MOV P1,#0F0H
ACALL DELAY
MOV P1,#00H
ACALL DELAY
MOV P1,#0F0H
ACALL DELAY
MOV P1,#00H
ACALL DELAY
MOV P1,#0FH
ACALL DELAY
MOV P1,#00H
ACALL DELAY
MOV P1,#0FH
ACALL DELAY
MOV P1,#00H
ACALL DELAY
MOV P1,#0FH
ACALL DELAY
MOV P1,#00H
ACALL DELAY
同意楼上的答案!
希望延时时间没问题!