minh cung bi giong ban minh quet hàng hiển thị cột, dung a1015 cho quét hàng và ic74h573 dệm đảo 2803 mà chữ a bị nhiểu hoài các bác giúp với e gà vi dieu khien lắm?
ORG 0000H
MAIN:
MOV DPTR,#TABLE
LCALL LED
LJMP MAIN
;----------------------------------
LED:
PUSH ACC
PUSH 00H
PUSH 01H
MOV R0,#00H
MOV R1,#11111110b
LOOP:
MOV A,R0;
MOVC A,@A+DPTR
MOV P2,A;XUAT MA HIEN THI RA HANG
MOV P0,R1;XUAT MA QUET RA COT
LCALL DELAY
MOV P0,#00H
INC R0
MOV A,R1
RL A
MOV R1,A
CJNE R0,#08H,LOOP
POP 01H
POP 00H
POP ACC
RET
;----------------------------------
DELAY: MOV R7,#30
LABEL1: MOV R6,#2
LABEL2: DJNZ R6,LABEL2
DJNZ R7,LABEL1
RET
;----------------------------------
TABLE:
DB 3FH,50H,90H,50H,3FH,0H,0H,0H
END
ORG 0000H
MAIN:
MOV DPTR,#TABLE
LCALL LED
LJMP MAIN
;----------------------------------
LED:
PUSH ACC
PUSH 00H
PUSH 01H
MOV R0,#00H
MOV R1,#11111110b
LOOP:
MOV A,R0;
MOVC A,@A+DPTR
MOV P2,A;XUAT MA HIEN THI RA HANG
MOV P0,R1;XUAT MA QUET RA COT
LCALL DELAY
MOV P0,#00H
INC R0
MOV A,R1
RL A
MOV R1,A
CJNE R0,#08H,LOOP
POP 01H
POP 00H
POP ACC
RET
;----------------------------------
DELAY: MOV R7,#30
LABEL1: MOV R6,#2
LABEL2: DJNZ R6,LABEL2
DJNZ R7,LABEL1
RET
;----------------------------------
TABLE:
DB 3FH,50H,90H,50H,3FH,0H,0H,0H
END
Comment