Thông báo

Collapse
No announcement yet.

giúp sơ đồ giải thuật quét led ma trận

Collapse
X
 
  • Lọc
  • Giờ
  • Show
Clear All
new posts

  • giúp sơ đồ giải thuật quét led ma trận

    Các bác giúp em cái sơ đồ giải thuật em không tự tin

    $MOD51
    ORG 00
    MAIN:
    MOV DPTR,#MACHU
    MOV R6,#89
    CHAY:
    MOV R7,#10

    QUET:
    MOV R0,#00H
    MOV R1,#01H

    LAP2:
    MOV P0,R1;P0=01H
    MOV A,R1;A=01H
    RL A; XOAY TRAI THANH GHI A, A=02H
    MOV R1,A;R1=02H
    MOV A,R0;A=00H
    MOVC A,@A+DPTR; NAP VUNG DU LIEU
    MOV P1,A;GAN DU LIEU A VAO PORT1
    ACALL DELAY
    INC R0; R0+1=01H
    CJNE R0,#08H,LAP2;SO SANH R0 MA KO =8 THI NHAY VE LAP2
    MOV P0,#00H
    LAP:
    MOV P2,R1
    MOV A,R1
    RL A
    MOV R1,A
    MOV A,R0
    MOVC A,@A+DPTR
    MOV P1,A
    LCALL DELAY
    INC R0
    CJNE R0,#16,LAP
    MOV P2,#00H
    LAP1:
    MOV P3,R1
    MOV A,R1
    RL A
    MOV R1,A
    MOV A,R0
    MOVC A,@A+DPTR
    MOV P1,A
    LCALL DELAY
    INC R0
    CJNE R0,#24,LAP1
    MOV P3,#00H
    DJNZ R7,QUET
    INC DPTR
    DJNZ R6,CHAY
    JMP MAIN
    DELAY:
    MOV TMOD,#01H
    MOV TH0,#HIGH(-500)
    MOV TL0,#LOW(-500)
    SETB TR0
    JNB TF0,$
    CLR TF0
    CLR TR0
    RET

    ORG 500
    MACHU:
    DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH; ma trong
    DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
    DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
    DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
    DB 0FEH,0FEH,0FEH,00H,0FEH,0FEH,0FEH,0FFH ;T
    DB 80H,7FH,7FH,7FH,7FH,80H;U
    DB 0FFH,07H,0DBH,0DDH,0DEH,0DDH,0DBH,07H ;A
    DB 0FFH,00H,0FDH,0FBH,0F7H,0EFH,0DFH,00H ;<3
    DB 0FFH,0FFH,7EH,00H,7EH,0FFH,0FEH,0FEH ;i-t
    DB 0FEH,00H,0FEH,0FEH,0FEH,0FFH,81H,7EH ;c
    DB 7EH,7EH,7EH,0BDH,0FFH,0FFH,0FFH,0FFH
    DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
    DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
    DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
    DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH
    DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH

    RET
    END

Về tác giả

Collapse

vinhletrong Tìm hiểu thêm về vinhletrong

Bài viết mới nhất

Collapse

Đang tải...
X