一个花样流水灯单片机程序(要求1,3,5,7灯亮,2,4,6,8灯亮然后全灭)答:先把P1口全部接低电平。ORG 0000H。AJMP START。ORG 0040H。AA:MOV P1,#55H。ACALL DELAY。MOV P1,#0AAH。ACALL DELAY。MOV P1,#00H。ACALL DELAY。AJMP AA。DELAY:MOV R5,#256。LOOP2:MOV R4,#256。LOOP1:NOP。NOP。DJNZ R4,LOOP1。DJNZ R5,LOOP2。RET。单片机(Single-Chip Microcom...
...在从右向左亮,然后在先1357亮,在2468亮,求算法???答:ORG 0000H ; 试试 SJMP MAIN ORG 0040H MIAN:MOV A,#11111110B MOV R2, #8 LOOP: MOV P2,A LCALL D_1s RL A DJNZ R2, LOOP MOV A,#01111111B MOV R2, #8 LOOP1: MOV P2,A LCALL D_1s RR A DJNZ R2, LOOP1 MOV A,#01010101B MOV P2,A LCALL D_1s...