第1个回答 2011-05-03
CSEG AT 0000H
LJMP START
CSEG AT 401BH
LJMP INT
CSEG AT 4100H
START: MOV A,#01H
MOV R1,#03H
MOV R0,#5H
MOV TMOD,#10H
MOV TL1,#57H
MOV TH1,#9EH
ORL IE,#88H
SETB TR1
LOOP1: CJNE R0,#00,DISP
MOV R0,#5H
INC R1
CJNE R1,#27H,LOOP2
MOV R1,#03H
LOOP2: MOV A,R1
MOVC A,@A+PC
JMP DISP
DB 01H,03H,07H,0FH,1FH,3FH,7FH,0FFH,0FEH,0FCH
DB 0F8H,0F0H,0E0H,0C0H,80H,00H,0FFH,00H,0FEH
DB 0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,07FH,0BFH,0DFH
DB 0EFH,0F7H,0FBH,0FDH,0FEH,00H,0FFH,00H
DISP: MOV P1,A
JMP LOOP1
INT: CLR TR1
DEC R0
MOV TL1,#57H
MOV TH1,#9EH
SETB TR1
RETI
END
第2个回答 推荐于2017-09-17
START:MOV A,#0AAH;初次1357灯亮
LOOP :MOV P1,A
LCALL DELY
LCALL DELY ;调200mS延时
RL A
SJMP LOOP
DELY:MOV R7,#200
DELY1:MOV R6,#200
DELY2:NOP
NOP
NOP
DJNZ R6,DELY2
DJNZ R7,DELY1
RET本回答被提问者采纳