8*8的led程序:
Q0000: LJMP Q00BA
LJMP Q0067
Q0006: DB 00H, 00H, 00H, 00H, 00H, 02H, 00H, 0EH
Q000E: DB 0C0H,0E0H,0C0H,0F0H,0C0H, 83H,0C0H, 82H
Q0016: DB 0C0H,0D0H, 75H,0D0H, 00H,0C0H, 00H,0C0H
Q001E: DB 07H, 75H, 8CH,0F8H, 75H, 8AH, 30H,0AFH
Q0026: DB 90H, 78H, 01H,0EFH, 08H, 80H, 01H, 23H
Q002E: DB 0D8H,0FDH,0F5H, 90H,0E5H, 08H, 75H,0F0H
Q0036: DB 08H,0A4H, 24H,0A2H,0F5H, 82H,0E4H, 34H
Q003E: DB 00H,0F5H, 83H,0E5H, 82H, 25H, 09H,0F5H
Q0046: DB 82H,0E4H, 35H, 83H,0F5H, 83H,0E4H, 93H
Q004E: DB 0F4H,0F5H, 80H,0E5H, 09H, 04H, 54H, 07H
Q0056: DB 0F5H, 09H,0D0H, 07H,0D0H, 00H,0D0H,0D0H
Q005E: DB 0D0H, 82H,0D0H, 83H,0D0H,0F0H,0D0H,0E0H
Q0066: DB 32H ;2
Q0067: PUSH ACC
PUSH B
PUSH PSW
MOV P0,#0FFH
MOV P1,#80H
MOV 09H,#00H
MOV A,08H
INC A
MOV B,#03H
DIV AB
MOV 08H,B
SETB TR0
POP PSW
POP B
POP ACC
RETI
Q0089: MOV P0,#0FFH
MOV P1,#0FFH
MOV TMOD,#01H
MOV TH0,#0F8H
MOV TL0,#30H
SETB IT0
MOV IE,#83H
MOV 08H,#0FFH
SJMP $
NOP
MOV R6,#7EH
MOV R6,#7EH
MOV R6,#7EH
NOP
NOP
ADDC A,R0
ORL A,#54H
ORL A,#38H
NOP
NOP
NOP
JB 26H.0,Q00EE
ADDC A,R4
ADDC A,R6
NOP
NOP
Q00BA: MOV R0,#7FH
CLR A
Q00BD: MOV @R0,A
DJNZ R0,Q00BD
MOV SP,#09H
LJMP Q0089
第二个有思路,但不知道怎么下手。 |