編程在4個(gè)七段LED數(shù)碼管上顯示1234
START: MOV R0,#30H
MOV R7,#4
MOV R2,#0FEH
MOV DPTR,#TAB
UP: MOV A,@R0
MOVC A,@A+DPTR
MOV P1,A
MOV P3,R2
LCALL D2MS
INC R0
MOV A,R2
RL A
MOV R2,A
DJNZ R7,UP
SJMP START
TAB : DB 3FH,06H,5BH,4FH
DB 66H,6DH,7DH,07H
DB 7FH,6FH
評(píng)論