Thông báo

Collapse
No announcement yet.

Số cột dữ liệu của Led matrix 8x32

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

  • Số cột dữ liệu của Led matrix 8x32

    VD em có đoạn code như sau:
    Code:
    ORG 0000H
    mov DPTR,#string1
    LOOP: MOV R2,#0 
    LOOP2: MOV R5,#78h 
    LOOP1: MOV R0,#0 
    MOV R1,#0 
    LOOP3: MOV A,R1
    MOV P2,A 
    MOV A,R0
    ADD A,R2
    MOVC A,@A+DPTR 
    MOV P1,A 
    CALL DELAY1
    INC R0
    INC R1
    CJNE R1,#32,LOOP3
    DJNZ R5,LOOP1
    INC R2
    CJNE R2,#255,LOOP2
    SJMP LOOP
    
    ;###############################################3
    String1:
    DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
    
    db 0x7F,0x20,0x10,0x8,0x7F,0x0
    db 0x18,0x25,0x25,0x1E,0x0
    db 0x4E,0x91,0x91,0x4E,0x0
    db 0x0,0x0,0x0
    db 0x7F,0x8,0x8,0x8,0x7F,0x0
    db 0xE,0x11,0x11,0xE,0x0
    db 0xE,0x91,0x51,0x1F,0x1,0x0
    db 0x1F,0x8,0x10,0xF,0x0
    db 0x18,0x25,0x25,0x1E,0x0
    db 0x0,0x0,0x0
    db 0x7F,0x8,0x8,0x8,0x7F,0x0
    db 0xE,0x91,0x51,0xF,0x1,0x0
    db 0x0,0x0,0x0
    db 0x7F,0x14,0x22,0x41,0x0
    db 0x11,0x5F,0x81,0x0
    db 0x1F,0x8,0x10,0xF,0x0
    db 0x7F,0x4,0x8,0x7,0x0
    db 0x0,0x0,0x0
    db 0x3E,0x41,0x41,0x22,0x0
    db 0x7F,0x4,0x8,0x7,0x0
    db 0xE,0x91,0x51,0xF,0x1,0x0
    db 0xE,0x11,0x11,0xE,0x0
    db 0x0,0x0,0x0
    db 0x3E,0x41,0x4D,0x43,0x3E,0x0
    db 0x1E,0x1,0x1,0x1E,0x0
    db 0x18,0x45,0x85,0x1E,0x0
    db 0x0,0x0,0x0
    db 0x7F,0x14,0x22,0x41,0x0
    db 0x7F,0x4,0x8,0x7,0x0
    db 0xE,0x51,0x91,0xF,0x1,0x0
    db 0xE,0x11,0x11,0xA,0x0
    db 0x7F,0x4,0x8,0x7
    DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
    DELAY1: MOV TMOD,#02H
    MOV TH0,#(-40)
    SETB TR0
    JNB TF0,$
    CLR TF0
    ret
    END
    trong chương trình có câu lệnh là:
    CJNE R2,#255,LOOP2 tức là số cột dữ liệu là 255 cột.
    255(dec) = 11111111(bin) = FF(hex) - max8bit
    lên khi tăng nó lên lớn hơn 255 tức là từ 256 trở đi thì.
    256(dec) = 000100000000(bin) = 100(hex) - 12bit
    nhưng 89cXX là họ VXL 8bit lên khi tăng lên 256 sẽ làm dữ liệu bị cắt xén bớt.
    lên em muốn hỏi các bro là có code hay cách nào để cho led matrix có số cột dữ liệu lớn lớn hơn 255 không, hay quét vô hạn cũng dc. chứ để thế này đem đi tặng sn bx thì k viết dc nhiều chữ vì nó giới hạn chỉ có số cột dữ liệu là 255 mà.

    thanks

  • #2
    tăng dptr (dptr=16bit)
    |

    Comment


    • #3
      Nguyên văn bởi tdm Xem bài viết
      tăng dptr (dptr=16bit)
      pác có thể nói rõ hơn k, sửa dòng dptr thành dptr=16bit ah
      em sửa nó báo lỗi mà.

      Comment


      • #4
        Nguyên văn bởi hadaica_pro Xem bài viết
        VD em có đoạn code như sau:
        Code:
        ORG 0000H
        mov DPTR,#string1
        LOOP: MOV R2,#0 
        LOOP2: MOV R5,#78h 
        LOOP1: MOV R0,#0 
        MOV R1,#0 
        LOOP3: MOV A,R1
        MOV P2,A 
        MOV A,R0
        ADD A,R2
        MOVC A,@A+DPTR 
        MOV P1,A 
        CALL DELAY1
        INC R0
        INC R1
        CJNE R1,#32,LOOP3
        DJNZ R5,LOOP1
        INC R2
        CJNE R2,#255,LOOP2
        SJMP LOOP
        
        ;###############################################3
        String1:
        DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
        
        db 0x7F,0x20,0x10,0x8,0x7F,0x0
        db 0x18,0x25,0x25,0x1E,0x0
        db 0x4E,0x91,0x91,0x4E,0x0
        db 0x0,0x0,0x0
        db 0x7F,0x8,0x8,0x8,0x7F,0x0
        db 0xE,0x11,0x11,0xE,0x0
        db 0xE,0x91,0x51,0x1F,0x1,0x0
        db 0x1F,0x8,0x10,0xF,0x0
        db 0x18,0x25,0x25,0x1E,0x0
        db 0x0,0x0,0x0
        db 0x7F,0x8,0x8,0x8,0x7F,0x0
        db 0xE,0x91,0x51,0xF,0x1,0x0
        db 0x0,0x0,0x0
        db 0x7F,0x14,0x22,0x41,0x0
        db 0x11,0x5F,0x81,0x0
        db 0x1F,0x8,0x10,0xF,0x0
        db 0x7F,0x4,0x8,0x7,0x0
        db 0x0,0x0,0x0
        db 0x3E,0x41,0x41,0x22,0x0
        db 0x7F,0x4,0x8,0x7,0x0
        db 0xE,0x91,0x51,0xF,0x1,0x0
        db 0xE,0x11,0x11,0xE,0x0
        db 0x0,0x0,0x0
        db 0x3E,0x41,0x4D,0x43,0x3E,0x0
        db 0x1E,0x1,0x1,0x1E,0x0
        db 0x18,0x45,0x85,0x1E,0x0
        db 0x0,0x0,0x0
        db 0x7F,0x14,0x22,0x41,0x0
        db 0x7F,0x4,0x8,0x7,0x0
        db 0xE,0x51,0x91,0xF,0x1,0x0
        db 0xE,0x11,0x11,0xA,0x0
        db 0x7F,0x4,0x8,0x7
        DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
        DELAY1: MOV TMOD,#02H
        MOV TH0,#(-40)
        SETB TR0
        JNB TF0,$
        CLR TF0
        ret
        END
        trong chương trình có câu lệnh là:
        CJNE R2,#255,LOOP2 tức là số cột dữ liệu là 255 cột.
        255(dec) = 11111111(bin) = FF(hex) - max8bit
        lên khi tăng nó lên lớn hơn 255 tức là từ 256 trở đi thì.
        256(dec) = 000100000000(bin) = 100(hex) - 12bit
        nhưng 89cXX là họ VXL 8bit lên khi tăng lên 256 sẽ làm dữ liệu bị cắt xén bớt.
        lên em muốn hỏi các bro là có code hay cách nào để cho led matrix có số cột dữ liệu lớn lớn hơn 255 không, hay quét vô hạn cũng dc. chứ để thế này đem đi tặng sn bx thì k viết dc nhiều chữ vì nó giới hạn chỉ có số cột dữ liệu là 255 mà.

        thanks
        HANG EQU P1
        COT EQU P2
        ORG 0000H
        MAIN:
        MOV DPTR,#VUNGMA7
        MOV R3,#2
        SCAN01:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN01
        ;=========================
        MOV DPTR,#VUNGMA7_0
        MOV R3,#2
        SCAN02:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN02
        ;=========================
        MOV DPTR,#VUNGMA7_1
        MOV R3,#2
        SCAN03:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN03
        ;=========================
        MOV DPTR,#VUNGMA7_2
        MOV R3,#2
        SCAN04:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN04
        ;=========================
        MOV DPTR,#VUNGMA7_3
        MOV R3,#2
        SCAN05:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN05
        ;=========================
        MOV DPTR,#VUNGMA7_4
        MOV R3,#2
        SCAN06:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN06
        ;=========================
        MOV DPTR,#VUNGMA7_5
        MOV R3,#2
        SCAN07:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN07
        ;=========================
        MOV DPTR,#VUNGMA7_6
        MOV R3,#20
        SCAN08:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN08
        ;=========================
        MOV DPTR,#VUNGMA7_7
        MOV R2,#24
        SCAN76:
        MOV R5,#20
        LCALL SCAN
        DEC R2
        CJNE R2,#0,SCAN76

        ;================================================= ======
        MOV DPTR,#VUNGMA1
        MOV R2,#24
        SCAN1:
        MOV R5,#20
        LCALL SCAN
        DEC R2
        CJNE R2,#0,SCAN1
        ;================================================= =======
        MOV DPTR,#VUNGMA2
        MOV R3,#20
        SCAN2:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN2
        ;================================================= ======
        MOV DPTR,#VUNGMA3
        MOV R2,#0
        SCAN3:
        MOV R5,#20
        LCALL SCAN
        INC R2
        CJNE R2,#25,SCAN3
        ;================================================= ======
        MOV DPTR,#VUNGMA4
        MOV R2,#24
        SCAN4:
        MOV R5,#20
        LCALL SCAN
        DEC R2
        CJNE R2,#0,SCAN4
        ;================================================= =======
        MOV DPTR,#VUNGMA5
        MOV R3,#20
        SCAN5:
        MOV R5,#20
        LCALL SCAN
        DJNZ R3,SCAN5
        ;================================================= ======
        MOV DPTR,#VUNGMA6
        MOV R2,#0
        SCAN6:
        MOV R5,#20
        LCALL SCAN
        INC R2
        CJNE R2,#25,SCAN6
        ;=============TU TREN XUONG====================================


        JMP MAIN




        SCAN:
        MOV R0,#0
        MOV R1,#0
        LOOP3:
        MOV COT,R1
        MOV A,R0
        ADD A,R2
        MOVC A,@A+DPTR
        MOV HANG,A
        CALL DELAY1
        INC R0
        INC R1
        CJNE R1,#24,LOOP3
        DJNZ R5,SCAN
        RET
        DELAY1:
        mov r7,#50
        djnz r7,$
        ret

        VUNGMA1:
        DB 00H,0FEH,4H,8H,10H,0FEH,0H,7CH,82H,82H,92H,74H,10H ,0H,7CH,82H,82H,82H,7CH,0H,7CH,82H,82H,82H,44H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        VUNGMA2:
        DB 0FEH,4H,8H,10H,0FEH,0H,7CH,82H,82H,92H,74H,10H,0H, 7CH,82H,82H,82H,7CH,0H,7CH,82H,82H,82H,44H
        VUNGMA3:
        DB 0FEH,4H,8H,10H,0FEH,0H,7CH,82H,82H,92H,74H,10H,0H, 7CH,82H,82H,82H,7CH,0H,7CH,82H,82H,82H,44H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        VUNGMA4:
        DB 0H,0H,82H,0FEH,0FEH,82H,0H,80H,0CH,1EH,3EH,7CH,0F8 H,7CH,3EH,1EH,0CH,80H,0H,7EH,0FEH,80H,80H,0FEH,7EH
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        VUNGMA5:
        DB 0H,82H,0FEH,0FEH,82H,0H,80H,0CH,1EH,3EH,7CH,0F8H,7 CH,3EH,1EH,0CH,80H,0H,7EH,0FEH,80H,80H,0FEH,7EH
        VUNGMA6:
        DB 0H,82H,0FEH,0FEH,82H,0H,80H,0CH,1EH,3EH,7CH,0F8H,7 CH,3EH,1EH,0CH,80H,0H,7EH,0FEH,80H,80H,0FEH,7EH
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        ;================================================= ==
        VUNGMA7: DB 0H,0H,0H,0H,0H,0H,0H,0H,0H,0H,0H,0H,0H,0H,0H,0H,0H ,0H,0H,0H,0H,0H,0H,0H
        VUNGMA7_0: DB 0H,0H,0H,2H,0H,0H,0H,0H,0H,0H,2H,2H,2H,2H,0H,0H,0H ,0H,0H,0H,2H,0H,0H,0H
        VUNGMA7_1: DB 0H,0H,2H,6H,2H,0H,0H,0H,0H,0H,4H,6H,6H,4H,0H,0H,0H ,0H,0H,2H,6H,2H,0H,0H
        VUNGMA7_2: DB 0H,2H,6H,0EH,6H,2H,0H,0H,0H,0H,8H,0EH,0EH,8H,0H,0H ,0H,0H,2H,6H,0EH,6H,2H,0H
        VUNGMA7_3: DB 2H,6H,0EH,1EH,0EH,6H,2H,0H,0H,0H,10H,1EH,1EH,10H,0 H,0H,0H,2H,6H,0EH,1EH,0EH,6H,2H
        VUNGMA7_4: DB 6H,0EH,1EH,3EH,1EH,0EH,6H,0H,0H,0H,20H,3EH,3EH,20H ,0H,0H,0H,6H,0EH,1EH,3EH,1EH,0EH,6H
        VUNGMA7_5: DB 0CH,1EH,3EH,7CH,3EH,1EH,0CH,0H,0H,0H,40H,7EH,7EH,4 0H,0H,0H,0H,0CH,1EH,3EH,7CH,3EH,1EH,0CH
        VUNGMA7_6: DB 18H,3CH,7CH,0F8H,7CH,3CH,18H,0H,0H,0H,82H,0FEH,0FE H,82H,0H,0H,0H,18H,3CH,7CH,0F8H,7CH,3CH,18H
        VUNGMA7_7: DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 00H,00H,00H,00H,00H,00H,00H,00H
        DB 18H,3CH,7CH,0F8H,7CH,3CH,18H,0H,0H,0H,82H,0FEH,0FE H,82H,0H,0H,0H,18H,3CH,7CH,0F8H,7CH,3CH,18H
        END
        bác thử theo cách của em đây!

        Comment


        • #5
          Nguyên văn bởi hadaica_pro Xem bài viết
          VD em có đoạn code như sau:
          Code:
          ORG 0000H
          mov DPTR,#string1
          LOOP: MOV R2,#0 
          LOOP2: MOV R5,#78h 
          LOOP1: MOV R0,#0 
          MOV R1,#0 
          LOOP3: MOV A,R1
          MOV P2,A 
          MOV A,R0
          ADD A,R2
          MOVC A,@A+DPTR 
          MOV P1,A 
          CALL DELAY1
          INC R0
          INC R1
          CJNE R1,#32,LOOP3
          DJNZ R5,LOOP1
          INC R2
          CJNE R2,#255,LOOP2
          SJMP LOOP
          
          ;###############################################3
          String1:
          DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
          
          db 0x7F,0x20,0x10,0x8,0x7F,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x4E,0x91,0x91,0x4E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0xE,0x91,0x51,0x1F,0x1,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x11,0x5F,0x81,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x41,0x22,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x4D,0x43,0x3E,0x0
          db 0x1E,0x1,0x1,0x1E,0x0
          db 0x18,0x45,0x85,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x51,0x91,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xA,0x0
          db 0x7F,0x4,0x8,0x7
          DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
          DELAY1: MOV TMOD,#02H
          MOV TH0,#(-40)
          SETB TR0
          JNB TF0,$
          CLR TF0
          ret
          END
          trong chương trình có câu lệnh là:
          CJNE R2,#255,LOOP2 tức là số cột dữ liệu là 255 cột.
          255(dec) = 11111111(bin) = FF(hex) - max8bit
          lên khi tăng nó lên lớn hơn 255 tức là từ 256 trở đi thì.
          256(dec) = 000100000000(bin) = 100(hex) - 12bit
          nhưng 89cXX là họ VXL 8bit lên khi tăng lên 256 sẽ làm dữ liệu bị cắt xén bớt.
          lên em muốn hỏi các bro là có code hay cách nào để cho led matrix có số cột dữ liệu lớn lớn hơn 255 không, hay quét vô hạn cũng dc. chứ để thế này đem đi tặng sn bx thì k viết dc nhiều chữ vì nó giới hạn chỉ có số cột dữ liệu là 255 mà.

          thanks
          sửa lại nhu sau:
          Code:
          ORG 0000H
          MAIN:
          mov DPTR,#string1
          LOOP2: MOV R5,#78h 
          LOOP1: MOV R0,#0 
          MOV R1,#0 
          LOOP3: MOV A,R1
          MOV P2,A 
          MOV A,R0
          MOVC A,@A+DPTR 
          CJNE A,#0xFF,CHUA_HET_BANG
          SJMP MAIN
          CHUA_HET_BANG:
          MOV P1,A 
          CALL DELAY1
          INC R0
          INC R1
          CJNE R1,#32,LOOP3
          DJNZ R5,LOOP1
          INC DPTR
          SJMP LOOP2
          
          ;###############################################3
          String1:
          DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
          
          db 0x7F,0x20,0x10,0x8,0x7F,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x4E,0x91,0x91,0x4E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0xE,0x91,0x51,0x1F,0x1,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x11,0x5F,0x81,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x41,0x22,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x4D,0x43,0x3E,0x0
          db 0x1E,0x1,0x1,0x1E,0x0
          db 0x18,0x45,0x85,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x51,0x91,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xA,0x0
          db 0x7F,0x4,0x8,0x7
          db 0x7F,0x20,0x10,0x8,0x7F,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x4E,0x91,0x91,0x4E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0xE,0x91,0x51,0x1F,0x1,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x11,0x5F,0x81,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x41,0x22,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x4D,0x43,0x3E,0x0
          db 0x1E,0x1,0x1,0x1E,0x0
          db 0x18,0x45,0x85,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x51,0x91,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xA,0x0
          db 0x7F,0x4,0x8,0x7
          db 0x7F,0x20,0x10,0x8,0x7F,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x4E,0x91,0x91,0x4E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0xE,0x91,0x51,0x1F,0x1,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x11,0x5F,0x81,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x41,0x22,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x4D,0x43,0x3E,0x0
          db 0x1E,0x1,0x1,0x1E,0x0
          db 0x18,0x45,0x85,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x51,0x91,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xA,0x0
          db 0x7F,0x4,0x8,0x7
          db 0x7F,0x20,0x10,0x8,0x7F,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x4E,0x91,0x91,0x4E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0xE,0x91,0x51,0x1F,0x1,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x11,0x5F,0x81,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x41,0x22,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x4D,0x43,0x3E,0x0
          db 0x1E,0x1,0x1,0x1E,0x0
          db 0x18,0x45,0x85,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x51,0x91,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xA,0x0
          db 0x7F,0x4,0x8,0x7
          db 0x7F,0x20,0x10,0x8,0x7F,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x4E,0x91,0x91,0x4E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0xE,0x91,0x51,0x1F,0x1,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x11,0x5F,0x81,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x41,0x22,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x4D,0x43,0x3E,0x0
          db 0x1E,0x1,0x1,0x1E,0x0
          db 0x18,0x45,0x85,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x51,0x91,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xA,0x0
          db 0x7F,0x4,0x8,0x7
          db 0x7F,0x20,0x10,0x8,0x7F,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x4E,0x91,0x91,0x4E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0xE,0x91,0x51,0x1F,0x1,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x11,0x5F,0x81,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x41,0x22,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x4D,0x43,0x3E,0x0
          db 0x1E,0x1,0x1,0x1E,0x0
          db 0x18,0x45,0x85,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x51,0x91,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xA,0x0
          db 0x7F,0x4,0x8,0x7
          db 0x7F,0x20,0x10,0x8,0x7F,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x4E,0x91,0x91,0x4E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0xE,0x91,0x51,0x1F,0x1,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x18,0x25,0x25,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x8,0x8,0x8,0x7F,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x11,0x5F,0x81,0x0
          db 0x1F,0x8,0x10,0xF,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x41,0x22,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x91,0x51,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xE,0x0
          db 0x0,0x0,0x0
          db 0x3E,0x41,0x4D,0x43,0x3E,0x0
          db 0x1E,0x1,0x1,0x1E,0x0
          db 0x18,0x45,0x85,0x1E,0x0
          db 0x0,0x0,0x0
          db 0x7F,0x14,0x22,0x41,0x0
          db 0x7F,0x4,0x8,0x7,0x0
          db 0xE,0x51,0x91,0xF,0x1,0x0
          db 0xE,0x11,0x11,0xA,0x0
          db 0x7F,0x4,0x8,0x7
          DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0xFF
          DELAY1: MOV TMOD,#02H
          MOV TH0,#(-40)
          SETB TR0
          JNB TF0,$
          CLR TF0
          ret
          END
          Last edited by tdm; 03-10-2010, 00:13.
          |

          Comment


          • #6
            Làm thế này xem, bảo đảm OK
            Code:
            ORG 0000H
            themvao equ 51h
            themvaonua equ 52h
            LOOP: 
            MOV DPTR,#string1
            MOV R2,#0 
            MOV themvao,#255 ; giới hạn của 255 cột
            MOV themvaonua,#X;X là số cột tiếp theo nhé 255+X,X=10 thì có thể hiểu là 255+10=265
            LOOP2: MOV R5,#78h 
            LOOP1: MOV R0,#0 
            MOV R1,#0 
            LOOP3: MOV A,R1
            MOV P2,A 
            MOV A,R0
            ADD A,R2
            MOVC A,@A+DPTR 
            MOV P1,A 
            CALL DELAY1
            INC R0
            INC R1
            CJNE R1,#32,LOOP3
            DJNZ R5,LOOP1
            inc dptr
            DJNZ themvao,LOOP2
            MOV themvao,#1
            DJNZ themvaonua,LOOP2
            SJMP LOOP
            
            ;###############################################3
            String1:
            DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
            
            db 0x7F,0x20,0x10,0x8,0x7F,0x0
            db 0x18,0x25,0x25,0x1E,0x0
            db 0x4E,0x91,0x91,0x4E,0x0
            db 0x0,0x0,0x0
            db 0x7F,0x8,0x8,0x8,0x7F,0x0
            db 0xE,0x11,0x11,0xE,0x0
            db 0xE,0x91,0x51,0x1F,0x1,0x0
            db 0x1F,0x8,0x10,0xF,0x0
            db 0x18,0x25,0x25,0x1E,0x0
            db 0x0,0x0,0x0
            db 0x7F,0x8,0x8,0x8,0x7F,0x0
            db 0xE,0x91,0x51,0xF,0x1,0x0
            db 0x0,0x0,0x0
            db 0x7F,0x14,0x22,0x41,0x0
            db 0x11,0x5F,0x81,0x0
            db 0x1F,0x8,0x10,0xF,0x0
            db 0x7F,0x4,0x8,0x7,0x0
            db 0x0,0x0,0x0
            db 0x3E,0x41,0x41,0x22,0x0
            db 0x7F,0x4,0x8,0x7,0x0
            db 0xE,0x91,0x51,0xF,0x1,0x0
            db 0xE,0x11,0x11,0xE,0x0
            db 0x0,0x0,0x0
            db 0x3E,0x41,0x4D,0x43,0x3E,0x0
            db 0x1E,0x1,0x1,0x1E,0x0
            db 0x18,0x45,0x85,0x1E,0x0
            db 0x0,0x0,0x0
            db 0x7F,0x14,0x22,0x41,0x0
            db 0x7F,0x4,0x8,0x7,0x0
            db 0xE,0x51,0x91,0xF,0x1,0x0
            db 0xE,0x11,0x11,0xA,0x0
            db 0x7F,0x4,0x8,0x7
            DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
            DELAY1: MOV TMOD,#02H
            MOV TH0,#(-40)
            SETB TR0
            JNB TF0,$
            CLR TF0
            ret
            END
            Mình cũng bắt đầu tìm hiểu có gì các bác đừng chém e, tội nghiệp
            Last edited by mabudaica; 04-10-2010, 12:17.

            Comment


            • #7
              thanks các anh ha
              em làm dc rùi
              quả này tha hồ mà viết.
              Ôi! I Love You

              Comment


              • #8
                Nguyên văn bởi tdm Xem bài viết
                sửa lại nhu sau:
                Code:
                ORG 0000H
                MAIN:
                mov DPTR,#string1
                LOOP2: MOV R5,#78h 
                LOOP1: MOV R0,#0 
                MOV R1,#0 
                LOOP3: MOV A,R1
                MOV P2,A 
                MOV A,R0
                MOVC A,@A+DPTR 
                CJNE A,#0xFF,CHUA_HET_BANG
                SJMP MAIN
                CHUA_HET_BANG:
                MOV P1,A 
                CALL DELAY1
                INC R0
                INC R1
                CJNE R1,#32,LOOP3
                DJNZ R5,LOOP1
                INC DPTR
                SJMP LOOP2
                
                ;###############################################3
                String1:
                DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0
                
                db 0x7F,0x20,0x10,0x8,0x7F,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x4E,0x91,0x91,0x4E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0xE,0x91,0x51,0x1F,0x1,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x11,0x5F,0x81,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x41,0x22,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x4D,0x43,0x3E,0x0
                db 0x1E,0x1,0x1,0x1E,0x0
                db 0x18,0x45,0x85,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x51,0x91,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xA,0x0
                db 0x7F,0x4,0x8,0x7
                db 0x7F,0x20,0x10,0x8,0x7F,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x4E,0x91,0x91,0x4E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0xE,0x91,0x51,0x1F,0x1,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x11,0x5F,0x81,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x41,0x22,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x4D,0x43,0x3E,0x0
                db 0x1E,0x1,0x1,0x1E,0x0
                db 0x18,0x45,0x85,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x51,0x91,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xA,0x0
                db 0x7F,0x4,0x8,0x7
                db 0x7F,0x20,0x10,0x8,0x7F,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x4E,0x91,0x91,0x4E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0xE,0x91,0x51,0x1F,0x1,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x11,0x5F,0x81,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x41,0x22,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x4D,0x43,0x3E,0x0
                db 0x1E,0x1,0x1,0x1E,0x0
                db 0x18,0x45,0x85,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x51,0x91,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xA,0x0
                db 0x7F,0x4,0x8,0x7
                db 0x7F,0x20,0x10,0x8,0x7F,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x4E,0x91,0x91,0x4E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0xE,0x91,0x51,0x1F,0x1,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x11,0x5F,0x81,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x41,0x22,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x4D,0x43,0x3E,0x0
                db 0x1E,0x1,0x1,0x1E,0x0
                db 0x18,0x45,0x85,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x51,0x91,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xA,0x0
                db 0x7F,0x4,0x8,0x7
                db 0x7F,0x20,0x10,0x8,0x7F,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x4E,0x91,0x91,0x4E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0xE,0x91,0x51,0x1F,0x1,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x11,0x5F,0x81,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x41,0x22,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x4D,0x43,0x3E,0x0
                db 0x1E,0x1,0x1,0x1E,0x0
                db 0x18,0x45,0x85,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x51,0x91,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xA,0x0
                db 0x7F,0x4,0x8,0x7
                db 0x7F,0x20,0x10,0x8,0x7F,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x4E,0x91,0x91,0x4E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0xE,0x91,0x51,0x1F,0x1,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x11,0x5F,0x81,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x41,0x22,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x4D,0x43,0x3E,0x0
                db 0x1E,0x1,0x1,0x1E,0x0
                db 0x18,0x45,0x85,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x51,0x91,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xA,0x0
                db 0x7F,0x4,0x8,0x7
                db 0x7F,0x20,0x10,0x8,0x7F,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x4E,0x91,0x91,0x4E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0xE,0x91,0x51,0x1F,0x1,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x18,0x25,0x25,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x8,0x8,0x8,0x7F,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x11,0x5F,0x81,0x0
                db 0x1F,0x8,0x10,0xF,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x41,0x22,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x91,0x51,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xE,0x0
                db 0x0,0x0,0x0
                db 0x3E,0x41,0x4D,0x43,0x3E,0x0
                db 0x1E,0x1,0x1,0x1E,0x0
                db 0x18,0x45,0x85,0x1E,0x0
                db 0x0,0x0,0x0
                db 0x7F,0x14,0x22,0x41,0x0
                db 0x7F,0x4,0x8,0x7,0x0
                db 0xE,0x51,0x91,0xF,0x1,0x0
                db 0xE,0x11,0x11,0xA,0x0
                db 0x7F,0x4,0x8,0x7
                DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0xFF
                DELAY1: MOV TMOD,#02H
                MOV TH0,#(-40)
                SETB TR0
                JNB TF0,$
                CLR TF0
                ret
                END
                Thanks pác. nhưng em tò mò muốn hỏi chút!!!
                Đây là code dành cho mạch Led Matrix 1 màu 8x32.
                Pác có thể nâng nó lên thành code cho mạch LED Matrix 2 màu 8x32 dc không.
                Nghĩa là tạo 2 chương trình con như trên và hai chương trình xuất mã cột ở các cổng khác nhau, để mối chương trình điều khiển 1 led matrix khác nhau (VD: chương trình 1 điều khiển led matrix màu đỏ, chương trình 2 điều khiển led matrix màu xanh).
                Còn chương trình chính có nhiệm vụ gọi 2 chương trình này ra. khi gọi chương trình 1 thì khóa chương trình 2 và khi gọi chương trình 2 thì khóa chương trình 1.
                thanks

                Comment


                • #9
                  quên mất.
                  đây là file mô phỏng led matrix 8x32
                  http://www.mediafire.com/?5kqwya6ixczm1el
                  )
                  design bằng pro 7.7 sp2 đấy nhé. bro nào xài pro 7.6 trở về trc không đọc dc đâu.
                  nếu chưa có bản pro 7.7 sp2 thì vào link sau down nhé:
                  http://www.vn-zoom.com/f103/proteus-...mf-652699.html
                  Last edited by hadaica_pro; 06-10-2010, 15:48.

                  Comment


                  • #10
                    CJNE A,#0xFF,CHUA_HET_BANG
                    SJMP MAIN
                    CHUA_HET_BANG:
                    MOV R2,A
                    AND A,#11110000
                    MOV P1,A ;XUAT RA LED MAU DO 4BIT CAO
                    MOV A,R2
                    AND A,#00001111
                    MOV P3,A;XUAT RA LED MAU XANH 4BIT THAP
                    ;LUC NAY MATRIX ĐÃ CÓ 2 MẦU
                    |

                    Comment


                    • #11
                      Nguyên văn bởi tdm Xem bài viết
                      CJNE A,#0xFF,CHUA_HET_BANG
                      SJMP MAIN
                      CHUA_HET_BANG:
                      MOV R2,A
                      AND A,#11110000
                      MOV P1,A ;XUAT RA LED MAU DO 4BIT CAO
                      MOV A,R2
                      AND A,#00001111
                      MOV P3,A;XUAT RA LED MAU XANH 4BIT THAP
                      ;LUC NAY MATRIX ĐÃ CÓ 2 MẦU
                      Thanks pác đã nhiệt tình giúp đỡ nhưng em hơi gà lên k hiểu lắm.
                      Vậy khai báo dữ liệu cho led xanh và đỏ như thế nào vậy.
                      hai màu led matrix có dữ liệu # nhau mà.

                      Comment


                      • #12
                        Nguyên văn bởi tdm Xem bài viết
                        CJNE A,#0xFF,CHUA_HET_BANG
                        SJMP MAIN
                        CHUA_HET_BANG:
                        MOV R2,A
                        AND A,#11110000
                        MOV P1,A ;XUAT RA LED MAU DO 4BIT CAO
                        MOV A,R2
                        AND A,#00001111
                        MOV P3,A;XUAT RA LED MAU XANH 4BIT THAP
                        ;LUC NAY MATRIX ĐÃ CÓ 2 MẦU
                        Thanks pác đã nhiệt tình giúp đỡ nhưng em hơi gà lên k hiểu lắm.
                        Vậy khai báo dữ liệu cho led xanh và đỏ như thế nào vậy.
                        hai màu led matrix có dữ liệu # nhau mà.

                        Comment


                        • #13
                          bac mr.ngoc oi.bac cho cai so do lap mach di.em moi hoc vi xu ly len chua bit ji ca?bac chiu kho giup em nha.thanks bac!!!!

                          Comment


                          • #14
                            Mình show hàng lần nữa nè-Mới làm cả đêm qua tới sáng luôn đấy_Mình dùng modul matrix của TQ, mạch đk mình tự thiết kế lại, dùng phần mềm RTB để truyền text từ PC, thế là mình đã xong đc cái kết hợp modul anh Tàu với mạch đk của mình_Mất 3 ngày để làm nó cơ đấy_mệt vãi. http://www.youtube.com/watch?v=BLJqEuHfMhQ


                            Add: 97 Quán Nam - Lê Chân - Hải Phòng.
                            Tel: 031 518648 Phone: 0904 283 505

                            Comment


                            • #15
                              Nguyên văn bởi hoangdai Xem bài viết
                              Mình show hàng lần nữa nè-Mới làm cả đêm qua tới sáng luôn đấy_Mình dùng modul matrix của TQ, mạch đk mình tự thiết kế lại, dùng phần mềm RTB để truyền text từ PC, thế là mình đã xong đc cái kết hợp modul anh Tàu với mạch đk của mình_Mất 3 ngày để làm nó cơ đấy_mệt vãi. http://www.youtube.com/watch?v=BLJqEuHfMhQ
                              hay quá nhỉ! cậu dùng AVR hay gì đó! mà làm xong mạch điều khiển chi phí hết bao nhiêu vậy cậu!
                              mình trông rất nhỏ gọn thật là hay!

                              Comment

                              Về tác giả

                              Collapse

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

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

                              Collapse

                              Đang tải...
                              X