Thông báo

Collapse
No announcement yet.

Giúp em dịch chữ trong led 16x64

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

  • #16
    led matrix 16x64 viết bằng ASM dùng ngắt timer

    Nguyên văn bởi hoangphat Xem bài viết
    oh quên
    mà phải xem xét lại chứ thanks nhảm người ta lại chửi
    mong anh sẽ post lên vài bài có ích nữa
    thanks anh cái lấy động lực post bài
    Quê tôi bị tơi tả vì bảo, bùn quá nên viết code gởi cho anh em kiếm điểm kinh nghiệm.

    Thân gởi em Phát và các bạn mới tìm hiểu led matrix, code và mạch mô phỏng bằng proteus 7.5 sp3 chương trình led matix 16x64 chạy chuỗi từ trái qua phải. nếu hay và có ích anh em thanks tui cái nhé
    code và ảnh kèm theo:
    ;************************************************* *******************************
    ;**************//////------------ MATRIX 16x64 ----------\\\\\\******************
    ;**------------------------------------------------------------------------------
    ;**////////////////__ Chuong trinh chay chu tren bo led ___\\\\\\\\\\\\\\\\\\\\\\
    ;**///////////////__ ma tran 8x8 loai 1 mau ________________\\\\\\\\\\\\\\\\\\\\\
    ;**//////////////___ Su dung vi dieu khien 89C52 cua ATMEL __\\\\\\\\\\\\\\\\\\\\
    ;**<<<<<<<<<<<<<---------------------------------------------->>>>>>>>>>>>>>>>>>>
    ;**\\\\\\\\\\\\\\ __ Thuc hien bien doi du lieu noi tiep ____////////////////////
    ;**\\\\\\\\\\\\\\\ ___ sang song song roi dua ra day led ___/////////////////////
    ;**\\\\\\\\\\\\\\\\ ---------- By Tien Huy ---------- //////////////////////
    ;************************************************* *******************************
    ;*****
    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    ;@@@ CAC TEN BIT DUNG TRONG CHUONG TRINH @@@
    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    en_hc154 bit p3.3
    sh_cp BIT P3.0
    data_serial BIT P3.1
    st_cp BIT P3.2
    f_run BIT 7FH

    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    ;@@@ CAC TEN BYTE DUNG TRONG CHUONG TRINH @@@
    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    data_row equ p2
    index_byte_row equ 30h
    num_row equ 16
    num_byte_collum equ 8
    index_point equ 31h
    index_reg1 equ 32h
    index_reg2 equ 33h
    num_bit equ 34h
    width_byte equ 35h
    buffer_dptrh equ 36h
    buffer_dptrl equ 37h
    buffer_dptrh1 equ 38h
    buffer_dptrl1 equ 39h
    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    ;@@@ start@@@
    ;@@@ OSC 12Mhz@@@
    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    org 0000h
    ljmp main
    org 000bh
    ljmp ngat_timer0
    org 0030h
    main:
    clr f_run
    mov num_bit,#0

    mov dptr,#string_code+2
    mov a,#0
    movc a,@a+dptr
    mov width_byte,a
    mov dptr,#string_code-6
    lcall set_index_dptr
    mov buffer_dptrh1,dph
    mov buffer_dptrl1,dpl
    mov dptr,#string_code+3
    mov buffer_dptrh,dph
    mov buffer_dptrl,dpl
    mov index_point,#0
    mov index_byte_row,#0
    lcall init_interrupt
    ljmp begin
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;################################################# ######################################
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    begin:
    ___here:
    mov ie,#82h
    jnb f_run,___here
    mov ie,#0
    clr f_run
    inc num_bit
    mov a,num_bit
    cjne a,#9,___here
    ;mov ie,#0
    mov num_bit,#0
    mov a,dpl
    cjne a,buffer_dptrl1,___skip3
    mov a,dph
    cjne a,buffer_dptrh1,___skip3
    mov dptr,#string_code+3
    mov buffer_dptrh,dph
    mov buffer_dptrl,dpl
    mov index_byte_row,#0
    sjmp ___here
    ___skip3:
    inc dptr
    mov buffer_dptrh,dph
    mov buffer_dptrl,dpl
    ;mov ie,#82h
    sjmp ___here
    sjmp $
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;################################################# ######################################
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    init_interrupt:
    mov tmod,#01h
    setb tr0
    setb tf0
    mov ie,#82h
    ret
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;################################################# ######################################
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ngat_timer0:
    mov th0,#0f3h
    mov tl0,#0a8h ;12^6/12/50hz/16=1250(fb1e)
    lcall shift_data
    lcall set_index_dptr
    inc index_byte_row
    mov a,index_byte_row
    cjne a,#num_row,___exit
    mov index_byte_row,#0
    mov dph,buffer_dptrh
    mov dpl,buffer_dptrl
    setb f_run
    ___exit:
    reti
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;################################################# ######################################
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    shift_data:
    setb en_hc154 ;ta't ma`ng hi`nh de^? cho^'ng lem led
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    mov index_reg1,#num_byte_collum
    ___loop1:
    mov index_reg2,#8
    mov a,index_point
    movc a,@a+dptr ;LAY DU LIEU TRONG BO NHO CT
    ___loop2:
    clr c
    rlc a
    mov data_serial,c
    clr sh_cp
    setb sh_cp
    djnz index_reg2,___loop2 ;dich du 8 bit
    inc index_point
    djnz index_reg1,___loop1 ;dich du 8 byte
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    mov a,num_bit ;de kiem tra co zero
    jz ___skip1
    mov index_reg2,num_bit
    mov a,index_point
    movc a,@a+dptr ;LAY DU LIEU TRONG BO NHO CT
    ___loop3:
    clr c
    rlc a
    mov data_serial,c
    clr sh_cp
    setb sh_cp
    djnz index_reg2,___loop3 ;dich du num_bit bit
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ___skip1:
    clr st_cp
    setb st_cp
    mov data_row,index_byte_row ;chon hang va tich cuc hc154
    clr en_hc154
    mov index_point,#0
    ret

    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;################################################# ######################################
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    set_index_dptr:
    mov a,dpl
    add a,width_byte
    mov dpl,a
    jnc ___skip2
    inc dph
    ___skip2:
    ret
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;################################################# ######################################
    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    string_code:

    ;unsigned char code Bmp002:
    ;-------------------------------------------------------------------------------
    ; If font display distortion, please check Fonts format of setup.
    ; Source file / text : I Love dientuvietnam.net @@@ chóc ae vui vÎ
    ; Width x Height (pixels) :632X16
    ; Font Format/Size : Monochrome LCD Fonts ,Horizontal scan ,Big endian order/1264Byte
    ; Font make date : 10/2/2009 4:14:58 PM
    ;-------------------------------------------------------------------------------
    DB 078H,010H,04FH;Width pixels,Height pixels,Width bytes
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,03EH,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,0F8H,000H,000H,000H,000H,000H,000H, 000H,00FH,080H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,070H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,007H
    DB 0C0H,000H,000H,036H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,0FFH,080H,0FFH, 080H,000H,000H,000H,000H,000H
    DB 001H,0FCH,0F8H,000H,000H,000H,000H,000H,000H,000H, 00FH,080H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,003H, 0F8H,00FH,0E0H,03FH,080H,000H
    DB 000H,00FH,0C0H,000H,060H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,007H,0C0H
    DB 000H,000H,026H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,07FH,000H,07EH,000H, 000H,000H,000H,000H,000H,000H
    DB 07CH,0F8H,000H,000H,000H,004H,000H,000H,000H,00FH, 080H,000H,010H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,040H,007H,0FCH, 01FH,0F0H,07FH,0C0H,000H,000H
    DB 007H,0C0H,000H,0C0H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,007H,0C0H,000H
    DB 000H,008H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,07FH,000H,07EH,000H,000H, 000H,000H,000H,000H,000H,07CH
    DB 070H,000H,000H,000H,00CH,000H,000H,000H,007H,000H, 000H,030H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,0C0H,01EH,00EH,078H, 039H,0E0H,0E0H,000H,000H,007H
    DB 0C0H,001H,080H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,003H,080H,000H,000H
    DB 010H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,07FH,000H,07EH,000H,000H,000H, 000H,000H,000H,000H,07CH,000H
    DB 000H,000H,000H,03CH,000H,000H,000H,000H,000H,000H, 0F0H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,003H,0C0H,019H,0FBH,067H,0EDH, 09FH,0B0H,000H,000H,007H,0C0H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,07FH,000H,07EH,000H,07EH,01FH,0C7H, 01FH,000H,00FH,07DH,0F8H,07CH
    DB 03FH,078H,0FFH,0FFH,0F3H,0F8H,0FFH,087H,0C3H,0FFH, 0F7H,081H,0FCH,07EH,0F3H,0C0H
    DB 03FH,078H,01FH,00FH,0F0H,03BH,0FBH,0EFH,0EFH,0BFH, 0B0H,000H,01FH,087H,0DEH,03FH
    DB 0FCH,01FH,080H,007H,0F0H,03EH,000H,07FH,01FH,0FFH, 0CFH,0C0H,07FH,01CH,07CH,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,07FH,000H,07EH,001H,0E7H,08FH,082H,07BH, 0C0H,01EH,0FCH,0F9H,0EFH,01FH
    DB 0FCH,07CH,07DH,0F1H,0F0H,04FH,09EH,0F1H,0F1H,0FFH, 0C7H,09EH,03FH,0FFH,0E0H,01FH
    DB 0FCH,07BH,0C7H,0C0H,037H,03BH,0DCH,0EFH,073H,0B0H, 000H,039H,0C7H,0FFH,01FH,07CH
    DB 039H,0C0H,01EH,078H,0F7H,080H,03EH,009H,0F7H,0C7H, 0C0H,03EH,009H,0EFH,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,07FH,000H,07EH,001H,0E7H,087H,0C4H,0FBH,0C0H, 01EH,07CH,0FBH,0EFH,01FH,07CH
    DB 07CH,07DH,0F0H,0F8H,08FH,0BEH,0F1H,0F1H,0F7H,0C7H, 0DFH,03EH,0FBH,0E0H,01FH,07CH
    DB 0FBH,0C7H,0C0H,036H,01BH,0D8H,06FH,061H,0B0H,000H, 073H,0E7H,0DFH,01FH,07CH,073H
    DB 0E0H,01FH,07DH,0F7H,080H,01FH,011H,0F7H,0C7H,0C0H, 01FH,013H,0EFH,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 07FH,000H,07EH,003H,0E7H,0C7H,0C4H,0FBH,0E0H,03EH, 07CH,0FBH,0EFH,09FH,07CH,07CH
    DB 07DH,0F0H,0F8H,08FH,0BEH,0F9H,0F1H,0F7H,0C0H,01FH, 03EH,0FBH,0E0H,01FH,07CH,0FBH
    DB 0E7H,0C0H,036H,032H,0D8H,0CBH,063H,020H,000H,0F3H, 0E7H,0DFH,01FH,07CH,0F3H,0E0H
    DB 000H,07DH,0F7H,0C0H,01FH,011H,0F7H,0C7H,0C0H,01FH, 013H,0EFH,080H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,07FH
    DB 000H,07EH,00BH,0E7H,0C3H,0E8H,0FFH,0E0H,03EH,07CH, 0FBH,0FFH,09FH,07CH,07CH,07DH
    DB 0F0H,07DH,00FH,0BFH,0F9H,0F1H,0F7H,0C3H,0FFH,03EH, 0FBH,0E7H,09FH,07CH,0FFH,0E7H
    DB 0C0H,037H,0F6H,0DFH,0DBH,07FH,060H,000H,0F1H,0C7H, 0DFH,01FH,07CH,0F1H,0C0H,00FH
    DB 0FDH,0FFH,0C0H,00FH,0A1H,0F7H,0C7H,0C0H,00FH,0A3H, 0FFH,080H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,07FH,000H
    DB 07EH,00BH,0E7H,0C3H,0E8H,0F8H,000H,03EH,07CH,0FBH, 0E0H,01FH,07CH,07CH,07DH,0F0H
    DB 07DH,00FH,0BEH,001H,0F1H,0F7H,0C7H,09FH,03EH,0FBH, 0EFH,0DFH,07CH,0F8H,007H,0C0H
    DB 01BH,0FCH,06FH,0F1H,0BFH,0C0H,000H,0F0H,007H,0DFH, 01FH,07CH,0F0H,000H,01EH,07DH
    DB 0F0H,000H,00FH,0A1H,0F7H,0C7H,0C0H,00FH,0A3H,0E0H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,07FH,000H,07EH
    DB 019H,0E7H,081H,0F0H,0F8H,000H,01EH,07CH,0FBH,0E0H, 01FH,07CH,07DH,07DH,0F0H,03EH
    DB 00FH,0BEH,001H,0F5H,0F7H,0CFH,09FH,03EH,0FBH,0EFH, 0DFH,07CH,0F8H,007H,0D0H,01CH
    DB 006H,070H,019H,0C0H,060H,000H,078H,027H,0DFH,01FH, 07CH,078H,020H,03EH,07DH,0F0H
    DB 000H,007H,0C1H,0F7H,0C7H,0C0H,007H,0C3H,0E0H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,07FH,000H,07EH,039H
    DB 0E7H,081H,0F0H,078H,060H,01FH,0FCH,0F9H,0E1H,09FH, 07CH,07EH,07FH,0F0H,03EH,00FH
    DB 09EH,019H,0F9H,0F7H,0C7H,09FH,0BEH,0FBH,0EFH,0DFH, 07CH,078H,067H,0E0H,007H,01CH
    DB 01CH,070H,071H,0C0H,000H,038H,047H,0DFH,01FH,0FCH, 038H,040H,01EH,07EH,0F0H,0C0H
    DB 007H,0C1H,0FFH,0C7H,0C0H,007H,0C1H,0E1H,080H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,0FFH,080H,0FFH,0F8H,07EH
    DB 000H,0E0H,01FH,080H,00FH,07FH,0FCH,07EH,03FH,07EH, 03EH,03DH,0F8H,01CH,01FH,0C7H
    DB 0E0H,0FBH,0F7H,0E7H,0EFH,07EH,0FBH,0F7H,0BFH,07EH, 01FH,083H,0E0H,003H,0F0H,00FH
    DB 0C0H,03FH,000H,000H,00FH,08FH,0DFH,08FH,07EH,00FH, 080H,01FH,0BCH,03FH,000H,003H
    DB 080H,0F7H,0EFH,0E0H,003H,080H,07EH,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H

    end
    Attached Files
    Last edited by tienhuypro; 02-10-2009, 18:03.

    Email:
    Tel: 0983.497.310

    Comment


    • #17
      bác có cai font đẹp wa, bác dùng ct tạo font gì thế có thể send cho em học hỏi tý được không ah. thank bác chước. mail: minhthang3586@gmail.com

      Comment


      • #18
        code led matrix 16x64 bằng C và ASM

        Thân gởi các bạn code .C chương trình led matrix 16x64 tham khảo và file mô phỏng.
        Chúc anh em một ngày vui vẻ...
        /* CHUONG TRINH HIEN led matric 16x64
        Version: 2.3 using test
        Date: 3-10-2009
        Programer: huyhtqn@gmail.com
        Checksum:
        Hien thi led matric */

        #include "regx52.h"
        #include "font_code.h"
        #define scan_led P2
        /////////////////////////////
        //////THIET LAP BAN DAU//////
        #define so_led 8 //boi cu?a 8
        #define so_hang 16 //chieu cao cua font chu
        #define multi so_hang+1 //
        #define cot_font 11 //chieu ngang cua font chu
        #define en_run 1 //1: chay <----> 0 dung
        ////////////////////////////

        typedef unsigned char uchar;
        typedef unsigned int uint;
        sbit rck=P3^2;
        sbit srck=P3^0;
        sbit ser_in=P3^1;
        sbit en_hc154=P3^3;

        bit run=0,en=en_run;
        idata uchar display_buffer[so_hang][so_led];
        idata uchar shift_buffer[so_hang];
        uchar row_buffer[16]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
        uchar row_led[16]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
        uchar tocdoh=0xf6,tocdol=0x00;
        uchar kitu_code=0;
        char row=multi;
        void shift_dataled();
        void test_led();
        void clear_buffer();
        void run_string();
        void copy_datacode();
        void scan_dataled_code();
        void init_interrupt();

        ////////////////////////////////
        ///////ngat timer 0////////////
        void isr_timer0() interrupt 1 using 1
        {
        TH0=tocdoh,TL0=tocdol;
        if(--row==-1) row=multi-1;
        shift_dataled();
        if(row==so_hang) run=1;
        }
        ////////////////////////////////
        /////////chuong trinh chinh/////
        void main()
        {
        uchar w;
        init_interrupt();
        test_led();
        clear_buffer();
        if(en==0) scan_dataled_code();

        while(1)
        {
        if((run==1)&(en==1)){
        IE&=0xfd;
        run_string(),run=0;
        if(++w==8) copy_datacode(),w=0;
        row=so_hang;
        IE|=0x02;
        }

        }

        }
        ////////////////////////////////
        ////////kiem tra led////////////
        void test_led()
        {
        uchar i,j;
        uint t_delay=10000;
        for(i=0;i<so_hang;i++)
        for(j=0;j<so_led;j++)
        display_buffer[i][j]=0xff;
        while(--t_delay);
        }
        void clear_buffer()
        {
        uchar i,j;
        for(i=0;i<so_hang;i++)
        for(j=0;j<so_led;j++)
        display_buffer[i][j]=0;
        }

        ////////////////////////////////
        ///////dich data va quet led////
        void shift_dataled()
        {
        char i,j;

        srck=0;
        rck=0;
        if(row<so_hang){
        for(i=0;i<so_led;i++)
        for(j=0;j<8;j++){
        ser_in=display_buffer[row][i]&row_buffer[7-j];
        srck=1;
        srck=0;
        }
        en_hc154=1;
        rck=1;
        rck=0;
        scan_led=row_led[row];
        en_hc154=0;
        }

        }
        void copy_datacode()
        {
        uchar i;
        static uchar j;
        for(i=0;i<so_hang;i++)
        shift_buffer[i]=Bmp002[Bmp002[2]*i+3+j];
        if(++j==Bmp002[2]) j=0;
        }
        ////////////////////////////////
        ////////chay chuoi//////////////
        void run_string()
        {
        uchar i,j;
        for(i=0;i<so_hang;i++)
        {
        for(j=0;j<so_led;j++)
        {
        display_buffer[i][j]<<=1;
        if(j!=(so_led-1)) display_buffer[i][j]|display_buffer[i][j+1]&0x80)>>7);
        else display_buffer[i][j]|shift_buffer[i]&0x80)>>7);
        }
        shift_buffer[i]<<=1;
        }
        }
        void scan_dataled_code()
        {
        uchar i,j;
        for(i=0;i<so_hang;i++){
        for(j=0;j<so_led;j++){
        display_buffer[i][j]=Bmp002[Bmp002[2]*i + 3+j];
        }
        }
        }
        ////////////////////////////////
        //////khoi dong ngat////////////
        void init_interrupt()
        {
        TMOD=0x01; //timer0 che do 1 16b
        TH0=0xF8;
        TL0=0x30;
        TR0=1;
        TR1=1;
        IE=0x82; //cho phep ngat timer0
        }

        Email:
        Tel: 0983.497.310

        Comment


        • #19
          sorry quên file:
          Attached Files

          Email:
          Tel: 0983.497.310

          Comment


          • #20
            Nguyên văn bởi tienhuypro Xem bài viết
            sorry quên file:
            Nhìn cái ct của bác tienhuypro mà thèm quá muốn làm một cái chơi cho đỡ buồn nhưng không bit có làm nổi không, có gì mong bác giúp đỡ nhé.
            Mà bác có thể gi chú giải cho các câu lệnh ở cede ASM không nhiều cái em thấy khó hiểu quá.than'k
            Last edited by lenovo_y410; 04-10-2009, 21:31.

            Comment


            • #21
              Em cũng vậy nếu bác "tienhuypro"cm thêm vài dòng trong code nữa thì zui quá.có vài lệnh hơi khó hiểu.trong ngôn ngữ asembly
              NBHVDNTG_C5!no trace

              Comment


              • #22
                Nguyên văn bởi congdatquan Xem bài viết
                Em cũng vậy nếu bác "tienhuypro"cm thêm vài dòng trong code nữa thì zui quá.có vài lệnh hơi khó hiểu.trong ngôn ngữ asembly
                thân gởi bạn:

                ;**************//////------------ MATRIX 16x64 ----------\\\\\\******************
                ;**------------------------------------------------------------------------------
                ;**////////////////__ Chuong trinh chay chu tren bo led ___\\\\\\\\\\\\\\\\\\\\\\
                ;**///////////////__ ma tran 8x8 loai 1 mau ________________\\\\\\\\\\\\\\\\\\\\\
                ;**//////////////___ Su dung vi dieu khien 89C52 cua ATMEL __\\\\\\\\\\\\\\\\\\\\
                ;**<<<<<<<<<<<<<---------------------------------------------->>>>>>>>>>>>>>>>>>>
                ;**\\\\\\\\\\\\\\ __ Thuc hien bien doi du lieu noi tiep ____////////////////////
                ;**\\\\\\\\\\\\\\\ ___ sang song song roi dua ra day led ___/////////////////////
                ;**\\\\\\\\\\\\\\\\ ---------- By Tien Huy ---------- //////////////////////
                ;************************************************* *******************************
                ;*****
                ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                ;@@@ CAC TEN BIT DUNG TRONG CHUONG TRINH @@@
                ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                en_hc154 BIT p3.3
                sh_cp BIT P3.0
                data_serial BIT P3.1
                st_cp BIT P3.2
                f_run BIT 7FH ;bit cho phép d?ch c?t

                ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                ;@@@ CAC TEN BYTE DUNG TRONG CHUONG TRINH @@@
                ;@@@b? font du?c t?o b?i LCD font maker
                ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                data_row equ p2
                index_byte_row equ 30h ;byte hàng led 0-->15
                num_row equ 16 ;số hàng led
                num_byte_collum equ 8 ;số cột led 8*8
                index_point equ 31h
                index_reg1 equ 32h
                index_reg2 equ 33h
                num_bit equ 34h ;sô bit dịch thêm
                width_byte equ 35h ;độ rộng của font
                buffer_dptrh equ 36h ;các byte chứa giá trị con trỏ DPTR
                buffer_dptrl equ 37h
                buffer_dptrh1 equ 38h
                buffer_dptrl1 equ 39h
                ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                ;@@@ start@@@
                ;@@@ OSC 12Mhz@@@
                ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

                org 0000h
                ljmp main
                org 000bh
                ljmp ngat_timer0
                org 0030h
                main:
                clr f_run
                mov num_bit,#0

                mov dptr,#string_code+2 ;vị trí width byte của bảng font
                mov a,#0
                movc a,@a+dptr
                mov width_byte,a ;
                mov dptr,#string_code-5 ;string_code+3-8byte= -5
                lcall set_index_dptr ;vị trí con trỏ cách 8byte so với byte cuối của bảng font
                mov buffer_dptrh1,dph
                mov buffer_dptrl1,dpl
                mov dptr,#string_code+3 ;vị trí đầu tiên của bảng font chữ
                mov buffer_dptrh,dph
                mov buffer_dptrl,dpl
                mov index_point,#0
                mov index_byte_row,#0 ;quét hàng thứ 0 đầu tiên
                lcall init_interrupt
                ljmp begin
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                ;################################################# ######################################
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                begin:
                ___here:
                mov ie,#82h
                jnb f_run,___here ;chờ cho đến khi quét đủ 16 hàng
                mov ie,#0
                clr f_run
                inc num_bit
                mov a,num_bit
                cjne a,#9,___here ;kiểm tra dịch thêm đủ 8 bit chưa
                mov num_bit,#0
                mov a,dpl ;kt dịch hết chuổi kitu chưa, rồi dịch lại từ đầu
                cjne a,buffer_dptrl1,___skip3 ;
                mov a,dph ;
                cjne a,buffer_dptrh1,___skip3 ;
                mov dptr,#string_code+3
                mov buffer_dptrh,dph
                mov buffer_dptrl,dpl
                mov index_byte_row,#0
                sjmp ___here
                ___skip3:
                inc dptr
                mov buffer_dptrh,dph ;lưu lại vị trí dptr
                mov buffer_dptrl,dpl
                sjmp ___here
                sjmp $
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                ;################################################# ######################################
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                init_interrupt:
                mov tmod,#01h
                setb tr0
                setb tf0
                mov ie,#82h
                ret
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                ;################################################# ######################################
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                ngat_timer0:
                mov th0,#0f3h
                mov tl0,#0a8h
                lcall shift_data
                lcall set_index_dptr
                inc index_byte_row
                mov a,index_byte_row
                cjne a,#num_row,___exit
                mov index_byte_row,#0
                mov dph,buffer_dptrh ;lấy lại vị trí đầu hàng thứ 0
                mov dpl,buffer_dptrl
                setb f_run ;cho phép dịch cột
                ___exit:
                reti
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                ;################################################# ######################################
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                shift_data:
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                mov index_reg1,#num_byte_collum
                ___loop1:
                mov index_reg2,#8
                mov a,index_point
                movc a,@a+dptr ;LAY DU LIEU TRONG BO NHO CT
                ___loop2:
                clr c
                rlc a
                mov data_serial,c
                clr sh_cp
                setb sh_cp
                djnz index_reg2,___loop2 ;dich du 8 bit
                inc index_point
                djnz index_reg1,___loop1 ;dich du 8 byte
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                mov a,num_bit ;kiem tra có dich thêm bit nào kô
                jz ___skip1
                mov index_reg2,num_bit
                mov a,index_point
                movc a,@a+dptr ;LAY DU LIEU TRONG BO NHO CT
                ___loop3:
                clr c
                rlc a
                mov data_serial,c
                clr sh_cp
                setb sh_cp
                djnz index_reg2,___loop3 ;dich du num_bit bit
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ___skip1:
                setb en_hc154 ;ta't ma`ng hi`nh de^? cho^'ng lem led
                clr st_cp
                setb st_cp
                mov data_row,index_byte_row ;chon hang va tich cuc hc154
                clr en_hc154
                mov index_point,#0
                ret

                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                ;################################################# ######################################
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                set_index_dptr:
                mov a,dpl
                add a,width_byte
                mov dpl,a
                jnc ___skip2
                inc dph
                ___skip2:
                ret
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                ;################################################# ######################################
                ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                string_code:

                ;unsigned char code Bmp002:
                ;-------------------------------------------------------------------------------
                ; If font display distortion, please check Fonts format of setup.
                ; Source file / text : I Love dientuvietnam.net @@@ chóc ae vui vÎ
                ; Width x Height (pixels) :632X16
                ; Font Format/Size : Monochrome LCD Fonts ,Horizontal scan ,Big endian order/1264Byte
                ; Font make date : 10/2/2009 4:14:58 PM
                ;-------------------------------------------------------------------------------
                DB 078H,010H,04FH;Width pixels,Height pixels,Width bytes
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,03EH,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,0F8H,000H,000H,000H,000H,000H,000H, 000H,00FH,080H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,070H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,007H
                DB 0C0H,000H,000H,036H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,0FFH,080H,0FFH, 080H,000H,000H,000H,000H,000H
                DB 001H,0FCH,0F8H,000H,000H,000H,000H,000H,000H,000H, 00FH,080H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,003H, 0F8H,00FH,0E0H,03FH,080H,000H
                DB 000H,00FH,0C0H,000H,060H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,007H,0C0H
                DB 000H,000H,026H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,07FH,000H,07EH,000H, 000H,000H,000H,000H,000H,000H
                DB 07CH,0F8H,000H,000H,000H,004H,000H,000H,000H,00FH, 080H,000H,010H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,040H,007H,0FCH, 01FH,0F0H,07FH,0C0H,000H,000H
                DB 007H,0C0H,000H,0C0H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,007H,0C0H,000H
                DB 000H,008H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,07FH,000H,07EH,000H,000H, 000H,000H,000H,000H,000H,07CH
                DB 070H,000H,000H,000H,00CH,000H,000H,000H,007H,000H, 000H,030H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,0C0H,01EH,00EH,078H, 039H,0E0H,0E0H,000H,000H,007H
                DB 0C0H,001H,080H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,003H,080H,000H,000H
                DB 010H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,07FH,000H,07EH,000H,000H,000H, 000H,000H,000H,000H,07CH,000H
                DB 000H,000H,000H,03CH,000H,000H,000H,000H,000H,000H, 0F0H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,003H,0C0H,019H,0FBH,067H,0EDH, 09FH,0B0H,000H,000H,007H,0C0H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,07FH,000H,07EH,000H,07EH,01FH,0C7H, 01FH,000H,00FH,07DH,0F8H,07CH
                DB 03FH,078H,0FFH,0FFH,0F3H,0F8H,0FFH,087H,0C3H,0FFH, 0F7H,081H,0FCH,07EH,0F3H,0C0H
                DB 03FH,078H,01FH,00FH,0F0H,03BH,0FBH,0EFH,0EFH,0BFH, 0B0H,000H,01FH,087H,0DEH,03FH
                DB 0FCH,01FH,080H,007H,0F0H,03EH,000H,07FH,01FH,0FFH, 0CFH,0C0H,07FH,01CH,07CH,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,07FH,000H,07EH,001H,0E7H,08FH,082H,07BH, 0C0H,01EH,0FCH,0F9H,0EFH,01FH
                DB 0FCH,07CH,07DH,0F1H,0F0H,04FH,09EH,0F1H,0F1H,0FFH, 0C7H,09EH,03FH,0FFH,0E0H,01FH
                DB 0FCH,07BH,0C7H,0C0H,037H,03BH,0DCH,0EFH,073H,0B0H, 000H,039H,0C7H,0FFH,01FH,07CH
                DB 039H,0C0H,01EH,078H,0F7H,080H,03EH,009H,0F7H,0C7H, 0C0H,03EH,009H,0EFH,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,07FH,000H,07EH,001H,0E7H,087H,0C4H,0FBH,0C0H, 01EH,07CH,0FBH,0EFH,01FH,07CH
                DB 07CH,07DH,0F0H,0F8H,08FH,0BEH,0F1H,0F1H,0F7H,0C7H, 0DFH,03EH,0FBH,0E0H,01FH,07CH
                DB 0FBH,0C7H,0C0H,036H,01BH,0D8H,06FH,061H,0B0H,000H, 073H,0E7H,0DFH,01FH,07CH,073H
                DB 0E0H,01FH,07DH,0F7H,080H,01FH,011H,0F7H,0C7H,0C0H, 01FH,013H,0EFH,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 07FH,000H,07EH,003H,0E7H,0C7H,0C4H,0FBH,0E0H,03EH, 07CH,0FBH,0EFH,09FH,07CH,07CH
                DB 07DH,0F0H,0F8H,08FH,0BEH,0F9H,0F1H,0F7H,0C0H,01FH, 03EH,0FBH,0E0H,01FH,07CH,0FBH
                DB 0E7H,0C0H,036H,032H,0D8H,0CBH,063H,020H,000H,0F3H, 0E7H,0DFH,01FH,07CH,0F3H,0E0H
                DB 000H,07DH,0F7H,0C0H,01FH,011H,0F7H,0C7H,0C0H,01FH, 013H,0EFH,080H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,07FH
                DB 000H,07EH,00BH,0E7H,0C3H,0E8H,0FFH,0E0H,03EH,07CH, 0FBH,0FFH,09FH,07CH,07CH,07DH
                DB 0F0H,07DH,00FH,0BFH,0F9H,0F1H,0F7H,0C3H,0FFH,03EH, 0FBH,0E7H,09FH,07CH,0FFH,0E7H
                DB 0C0H,037H,0F6H,0DFH,0DBH,07FH,060H,000H,0F1H,0C7H, 0DFH,01FH,07CH,0F1H,0C0H,00FH
                DB 0FDH,0FFH,0C0H,00FH,0A1H,0F7H,0C7H,0C0H,00FH,0A3H, 0FFH,080H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,07FH,000H
                DB 07EH,00BH,0E7H,0C3H,0E8H,0F8H,000H,03EH,07CH,0FBH, 0E0H,01FH,07CH,07CH,07DH,0F0H
                DB 07DH,00FH,0BEH,001H,0F1H,0F7H,0C7H,09FH,03EH,0FBH, 0EFH,0DFH,07CH,0F8H,007H,0C0H
                DB 01BH,0FCH,06FH,0F1H,0BFH,0C0H,000H,0F0H,007H,0DFH, 01FH,07CH,0F0H,000H,01EH,07DH
                DB 0F0H,000H,00FH,0A1H,0F7H,0C7H,0C0H,00FH,0A3H,0E0H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,07FH,000H,07EH
                DB 019H,0E7H,081H,0F0H,0F8H,000H,01EH,07CH,0FBH,0E0H, 01FH,07CH,07DH,07DH,0F0H,03EH
                DB 00FH,0BEH,001H,0F5H,0F7H,0CFH,09FH,03EH,0FBH,0EFH, 0DFH,07CH,0F8H,007H,0D0H,01CH
                DB 006H,070H,019H,0C0H,060H,000H,078H,027H,0DFH,01FH, 07CH,078H,020H,03EH,07DH,0F0H
                DB 000H,007H,0C1H,0F7H,0C7H,0C0H,007H,0C3H,0E0H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,07FH,000H,07EH,039H
                DB 0E7H,081H,0F0H,078H,060H,01FH,0FCH,0F9H,0E1H,09FH, 07CH,07EH,07FH,0F0H,03EH,00FH
                DB 09EH,019H,0F9H,0F7H,0C7H,09FH,0BEH,0FBH,0EFH,0DFH, 07CH,078H,067H,0E0H,007H,01CH
                DB 01CH,070H,071H,0C0H,000H,038H,047H,0DFH,01FH,0FCH, 038H,040H,01EH,07EH,0F0H,0C0H
                DB 007H,0C1H,0FFH,0C7H,0C0H,007H,0C1H,0E1H,080H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,0FFH,080H,0FFH,0F8H,07EH
                DB 000H,0E0H,01FH,080H,00FH,07FH,0FCH,07EH,03FH,07EH, 03EH,03DH,0F8H,01CH,01FH,0C7H
                DB 0E0H,0FBH,0F7H,0E7H,0EFH,07EH,0FBH,0F7H,0BFH,07EH, 01FH,083H,0E0H,003H,0F0H,00FH
                DB 0C0H,03FH,000H,000H,00FH,08FH,0DFH,08FH,07EH,00FH, 080H,01FH,0BCH,03FH,000H,003H
                DB 080H,0F7H,0EFH,0E0H,003H,080H,07EH,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H


                end

                Email:
                Tel: 0983.497.310

                Comment


                • #23
                  em mới chập chững vào nghề
                  em chưa biết gì về lep quảng cáo
                  nếu các anh có thể chỉ em 1 ít về phần mềm(ngôn ngữ viết , thiết bị như thế nào) này thì cảm ơn nhiều,và có hậu tạ hậu hĩnh

                  Comment


                  • #24
                    Nguyên văn bởi tienhuypro Xem bài viết
                    thân gởi bạn:

                    ;**************//////------------ MATRIX 16x64 ----------\\\\\\******************
                    ;**------------------------------------------------------------------------------
                    ;**////////////////__ Chuong trinh chay chu tren bo led ___\\\\\\\\\\\\\\\\\\\\\\
                    ;**///////////////__ ma tran 8x8 loai 1 mau ________________\\\\\\\\\\\\\\\\\\\\\
                    ;**//////////////___ Su dung vi dieu khien 89C52 cua ATMEL __\\\\\\\\\\\\\\\\\\\\
                    ;**<<<<<<<<<<<<<---------------------------------------------->>>>>>>>>>>>>>>>>>>
                    ;**\\\\\\\\\\\\\\ __ Thuc hien bien doi du lieu noi tiep ____////////////////////
                    ;**\\\\\\\\\\\\\\\ ___ sang song song roi dua ra day led ___/////////////////////
                    ;**\\\\\\\\\\\\\\\\ ---------- By Tien Huy ---------- //////////////////////
                    ;************************************************* *******************************
                    ;*****
                    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                    ;@@@ CAC TEN BIT DUNG TRONG CHUONG TRINH @@@
                    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                    en_hc154 BIT p3.3
                    sh_cp BIT P3.0
                    data_serial BIT P3.1
                    st_cp BIT P3.2
                    f_run BIT 7FH ;bit cho phép d?ch c?t

                    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                    ;@@@ CAC TEN BYTE DUNG TRONG CHUONG TRINH @@@
                    ;@@@b? font du?c t?o b?i LCD font maker
                    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                    data_row equ p2
                    index_byte_row equ 30h ;byte hàng led 0-->15
                    num_row equ 16 ;số hàng led
                    num_byte_collum equ 8 ;số cột led 8*8
                    index_point equ 31h
                    index_reg1 equ 32h
                    index_reg2 equ 33h
                    num_bit equ 34h ;sô bit dịch thêm
                    width_byte equ 35h ;độ rộng của font
                    buffer_dptrh equ 36h ;các byte chứa giá trị con trỏ DPTR
                    buffer_dptrl equ 37h
                    buffer_dptrh1 equ 38h
                    buffer_dptrl1 equ 39h
                    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                    ;@@@ start@@@
                    ;@@@ OSC 12Mhz@@@
                    ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

                    org 0000h
                    ljmp main
                    org 000bh
                    ljmp ngat_timer0
                    org 0030h
                    main:
                    clr f_run
                    mov num_bit,#0

                    mov dptr,#string_code+2 ;vị trí width byte của bảng font
                    mov a,#0
                    movc a,@a+dptr
                    mov width_byte,a ;
                    mov dptr,#string_code-5 ;string_code+3-8byte= -5
                    lcall set_index_dptr ;vị trí con trỏ cách 8byte so với byte cuối của bảng font
                    mov buffer_dptrh1,dph
                    mov buffer_dptrl1,dpl
                    mov dptr,#string_code+3 ;vị trí đầu tiên của bảng font chữ
                    mov buffer_dptrh,dph
                    mov buffer_dptrl,dpl
                    mov index_point,#0
                    mov index_byte_row,#0 ;quét hàng thứ 0 đầu tiên
                    lcall init_interrupt
                    ljmp begin
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    ;################################################# ######################################
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    begin:
                    ___here:
                    mov ie,#82h
                    jnb f_run,___here ;chờ cho đến khi quét đủ 16 hàng
                    mov ie,#0
                    clr f_run
                    inc num_bit
                    mov a,num_bit
                    cjne a,#9,___here ;kiểm tra dịch thêm đủ 8 bit chưa
                    mov num_bit,#0
                    mov a,dpl ;kt dịch hết chuổi kitu chưa, rồi dịch lại từ đầu
                    cjne a,buffer_dptrl1,___skip3 ;
                    mov a,dph ;
                    cjne a,buffer_dptrh1,___skip3 ;
                    mov dptr,#string_code+3
                    mov buffer_dptrh,dph
                    mov buffer_dptrl,dpl
                    mov index_byte_row,#0
                    sjmp ___here
                    ___skip3:
                    inc dptr
                    mov buffer_dptrh,dph ;lưu lại vị trí dptr
                    mov buffer_dptrl,dpl
                    sjmp ___here
                    sjmp $
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    ;################################################# ######################################
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    init_interrupt:
                    mov tmod,#01h
                    setb tr0
                    setb tf0
                    mov ie,#82h
                    ret
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    ;################################################# ######################################
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    ngat_timer0:
                    mov th0,#0f3h
                    mov tl0,#0a8h
                    lcall shift_data
                    lcall set_index_dptr
                    inc index_byte_row
                    mov a,index_byte_row
                    cjne a,#num_row,___exit
                    mov index_byte_row,#0
                    mov dph,buffer_dptrh ;lấy lại vị trí đầu hàng thứ 0
                    mov dpl,buffer_dptrl
                    setb f_run ;cho phép dịch cột
                    ___exit:
                    reti
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    ;################################################# ######################################
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    shift_data:
                    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                    mov index_reg1,#num_byte_collum
                    ___loop1:
                    mov index_reg2,#8
                    mov a,index_point
                    movc a,@a+dptr ;LAY DU LIEU TRONG BO NHO CT
                    ___loop2:
                    clr c
                    rlc a
                    mov data_serial,c
                    clr sh_cp
                    setb sh_cp
                    djnz index_reg2,___loop2 ;dich du 8 bit
                    inc index_point
                    djnz index_reg1,___loop1 ;dich du 8 byte
                    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                    mov a,num_bit ;kiem tra có dich thêm bit nào kô
                    jz ___skip1
                    mov index_reg2,num_bit
                    mov a,index_point
                    movc a,@a+dptr ;LAY DU LIEU TRONG BO NHO CT
                    ___loop3:
                    clr c
                    rlc a
                    mov data_serial,c
                    clr sh_cp
                    setb sh_cp
                    djnz index_reg2,___loop3 ;dich du num_bit bit
                    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                    ___skip1:
                    setb en_hc154 ;ta't ma`ng hi`nh de^? cho^'ng lem led
                    clr st_cp
                    setb st_cp
                    mov data_row,index_byte_row ;chon hang va tich cuc hc154
                    clr en_hc154
                    mov index_point,#0
                    ret

                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    ;################################################# ######################################
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    set_index_dptr:
                    mov a,dpl
                    add a,width_byte
                    mov dpl,a
                    jnc ___skip2
                    inc dph
                    ___skip2:
                    ret
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    ;################################################# ######################################
                    ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    string_code:

                    ;unsigned char code Bmp002:
                    ;-------------------------------------------------------------------------------
                    ; If font display distortion, please check Fonts format of setup.
                    ; Source file / text : I Love dientuvietnam.net @@@ chóc ae vui vÎ
                    ; Width x Height (pixels) :632X16
                    ; Font Format/Size : Monochrome LCD Fonts ,Horizontal scan ,Big endian order/1264Byte
                    ; Font make date : 10/2/2009 4:14:58 PM
                    ;-------------------------------------------------------------------------------
                    DB 078H,010H,04FH;Width pixels,Height pixels,Width bytes
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,03EH,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,0F8H,000H,000H,000H,000H,000H,000H, 000H,00FH,080H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,070H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,007H
                    DB 0C0H,000H,000H,036H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,0FFH,080H,0FFH, 080H,000H,000H,000H,000H,000H
                    DB 001H,0FCH,0F8H,000H,000H,000H,000H,000H,000H,000H, 00FH,080H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,003H, 0F8H,00FH,0E0H,03FH,080H,000H
                    DB 000H,00FH,0C0H,000H,060H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,007H,0C0H
                    DB 000H,000H,026H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,07FH,000H,07EH,000H, 000H,000H,000H,000H,000H,000H
                    DB 07CH,0F8H,000H,000H,000H,004H,000H,000H,000H,00FH, 080H,000H,010H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,040H,007H,0FCH, 01FH,0F0H,07FH,0C0H,000H,000H
                    DB 007H,0C0H,000H,0C0H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,007H,0C0H,000H
                    DB 000H,008H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,07FH,000H,07EH,000H,000H, 000H,000H,000H,000H,000H,07CH
                    DB 070H,000H,000H,000H,00CH,000H,000H,000H,007H,000H, 000H,030H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,0C0H,01EH,00EH,078H, 039H,0E0H,0E0H,000H,000H,007H
                    DB 0C0H,001H,080H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,003H,080H,000H,000H
                    DB 010H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,07FH,000H,07EH,000H,000H,000H, 000H,000H,000H,000H,07CH,000H
                    DB 000H,000H,000H,03CH,000H,000H,000H,000H,000H,000H, 0F0H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,003H,0C0H,019H,0FBH,067H,0EDH, 09FH,0B0H,000H,000H,007H,0C0H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,07FH,000H,07EH,000H,07EH,01FH,0C7H, 01FH,000H,00FH,07DH,0F8H,07CH
                    DB 03FH,078H,0FFH,0FFH,0F3H,0F8H,0FFH,087H,0C3H,0FFH, 0F7H,081H,0FCH,07EH,0F3H,0C0H
                    DB 03FH,078H,01FH,00FH,0F0H,03BH,0FBH,0EFH,0EFH,0BFH, 0B0H,000H,01FH,087H,0DEH,03FH
                    DB 0FCH,01FH,080H,007H,0F0H,03EH,000H,07FH,01FH,0FFH, 0CFH,0C0H,07FH,01CH,07CH,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,07FH,000H,07EH,001H,0E7H,08FH,082H,07BH, 0C0H,01EH,0FCH,0F9H,0EFH,01FH
                    DB 0FCH,07CH,07DH,0F1H,0F0H,04FH,09EH,0F1H,0F1H,0FFH, 0C7H,09EH,03FH,0FFH,0E0H,01FH
                    DB 0FCH,07BH,0C7H,0C0H,037H,03BH,0DCH,0EFH,073H,0B0H, 000H,039H,0C7H,0FFH,01FH,07CH
                    DB 039H,0C0H,01EH,078H,0F7H,080H,03EH,009H,0F7H,0C7H, 0C0H,03EH,009H,0EFH,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,07FH,000H,07EH,001H,0E7H,087H,0C4H,0FBH,0C0H, 01EH,07CH,0FBH,0EFH,01FH,07CH
                    DB 07CH,07DH,0F0H,0F8H,08FH,0BEH,0F1H,0F1H,0F7H,0C7H, 0DFH,03EH,0FBH,0E0H,01FH,07CH
                    DB 0FBH,0C7H,0C0H,036H,01BH,0D8H,06FH,061H,0B0H,000H, 073H,0E7H,0DFH,01FH,07CH,073H
                    DB 0E0H,01FH,07DH,0F7H,080H,01FH,011H,0F7H,0C7H,0C0H, 01FH,013H,0EFH,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 07FH,000H,07EH,003H,0E7H,0C7H,0C4H,0FBH,0E0H,03EH, 07CH,0FBH,0EFH,09FH,07CH,07CH
                    DB 07DH,0F0H,0F8H,08FH,0BEH,0F9H,0F1H,0F7H,0C0H,01FH, 03EH,0FBH,0E0H,01FH,07CH,0FBH
                    DB 0E7H,0C0H,036H,032H,0D8H,0CBH,063H,020H,000H,0F3H, 0E7H,0DFH,01FH,07CH,0F3H,0E0H
                    DB 000H,07DH,0F7H,0C0H,01FH,011H,0F7H,0C7H,0C0H,01FH, 013H,0EFH,080H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,07FH
                    DB 000H,07EH,00BH,0E7H,0C3H,0E8H,0FFH,0E0H,03EH,07CH, 0FBH,0FFH,09FH,07CH,07CH,07DH
                    DB 0F0H,07DH,00FH,0BFH,0F9H,0F1H,0F7H,0C3H,0FFH,03EH, 0FBH,0E7H,09FH,07CH,0FFH,0E7H
                    DB 0C0H,037H,0F6H,0DFH,0DBH,07FH,060H,000H,0F1H,0C7H, 0DFH,01FH,07CH,0F1H,0C0H,00FH
                    DB 0FDH,0FFH,0C0H,00FH,0A1H,0F7H,0C7H,0C0H,00FH,0A3H, 0FFH,080H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,07FH,000H
                    DB 07EH,00BH,0E7H,0C3H,0E8H,0F8H,000H,03EH,07CH,0FBH, 0E0H,01FH,07CH,07CH,07DH,0F0H
                    DB 07DH,00FH,0BEH,001H,0F1H,0F7H,0C7H,09FH,03EH,0FBH, 0EFH,0DFH,07CH,0F8H,007H,0C0H
                    DB 01BH,0FCH,06FH,0F1H,0BFH,0C0H,000H,0F0H,007H,0DFH, 01FH,07CH,0F0H,000H,01EH,07DH
                    DB 0F0H,000H,00FH,0A1H,0F7H,0C7H,0C0H,00FH,0A3H,0E0H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,07FH,000H,07EH
                    DB 019H,0E7H,081H,0F0H,0F8H,000H,01EH,07CH,0FBH,0E0H, 01FH,07CH,07DH,07DH,0F0H,03EH
                    DB 00FH,0BEH,001H,0F5H,0F7H,0CFH,09FH,03EH,0FBH,0EFH, 0DFH,07CH,0F8H,007H,0D0H,01CH
                    DB 006H,070H,019H,0C0H,060H,000H,078H,027H,0DFH,01FH, 07CH,078H,020H,03EH,07DH,0F0H
                    DB 000H,007H,0C1H,0F7H,0C7H,0C0H,007H,0C3H,0E0H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,07FH,000H,07EH,039H
                    DB 0E7H,081H,0F0H,078H,060H,01FH,0FCH,0F9H,0E1H,09FH, 07CH,07EH,07FH,0F0H,03EH,00FH
                    DB 09EH,019H,0F9H,0F7H,0C7H,09FH,0BEH,0FBH,0EFH,0DFH, 07CH,078H,067H,0E0H,007H,01CH
                    DB 01CH,070H,071H,0C0H,000H,038H,047H,0DFH,01FH,0FCH, 038H,040H,01EH,07EH,0F0H,0C0H
                    DB 007H,0C1H,0FFH,0C7H,0C0H,007H,0C1H,0E1H,080H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,0FFH,080H,0FFH,0F8H,07EH
                    DB 000H,0E0H,01FH,080H,00FH,07FH,0FCH,07EH,03FH,07EH, 03EH,03DH,0F8H,01CH,01FH,0C7H
                    DB 0E0H,0FBH,0F7H,0E7H,0EFH,07EH,0FBH,0F7H,0BFH,07EH, 01FH,083H,0E0H,003H,0F0H,00FH
                    DB 0C0H,03FH,000H,000H,00FH,08FH,0DFH,08FH,07EH,00FH, 080H,01FH,0BCH,03FH,000H,003H
                    DB 080H,0F7H,0EFH,0E0H,003H,080H,07EH,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
                    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H


                    end


                    anh tienhuypro quả là bậc đại tài trong điện tử đặc biệt là quang báo rùi
                    đề nghị a được làm mod để mở thêm nhìu luồng thread cho anh em mở mang kiến thức.Nếu có thể a có thể cho địa chỉ để anh em trong tphcm có thể học hỏi kinh nghiệm với

                    Comment


                    • #25
                      Bác TiêuhuyPro có nhiều fan nhỉ...Nhờ bác chỉ giùm nguyên tắc dịch chữ phải qua trái không lặp lại với. Còn dịch lần lượt từng chữ cái một ra màn hình led nữa. Em mới vào nghề toàn đạp phải vỏ chuối hoài bác ơi. Nản quá trời....

                      Comment


                      • #26
                        Nguyên văn bởi a2ofu Xem bài viết
                        Bác TiêuhuyPro có nhiều fan nhỉ...Nhờ bác chỉ giùm nguyên tắc dịch chữ phải qua trái không lặp lại với. Còn dịch lần lượt từng chữ cái một ra màn hình led nữa. Em mới vào nghề toàn đạp phải vỏ chuối hoài bác ơi. Nản quá trời....
                        sao không bấm vô cái nút vàng vàng đó rồi tôi chỉ cho
                        ở trang 2 có mấy cái project đó download về rồi ngâm cứu

                        Email:
                        Tel: 0983.497.310

                        Comment


                        • #27
                          Mọi người cho mình hỏi cái
                          Sao mình mua cái led matrix 8x8 2 màu về
                          Mình thử thì thấy đèn đỏ sáng, nhưng đèn xanh thì không sáng là vi sao vậy?
                          1 câu nữa: mình làm module 2 matrix 8x8,quét hàng, vậy có cần phải dùng ULN2803 không, nếu dùng có cần mắc trở ở đẩu ra của ULN trước khi đưa vào các cột không?

                          Comment


                          • #28
                            uln để đệm dòng lên phải cần rồi , và cũng cần mắc trở ở đầu ra nữa .2 matrix 8x8 thì được chứ nhiều hơn tôi nghĩ phải dùng transistor kéo dòng mới đủ
                            Đời sương gió !

                            Comment


                            • #29
                              Nguyên văn bởi legosse Xem bài viết
                              Mọi người cho mình hỏi cái
                              Sao mình mua cái led matrix 8x8 2 màu về
                              Mình thử thì thấy đèn đỏ sáng, nhưng đèn xanh thì không sáng là vi sao vậy?
                              1 câu nữa: mình làm module 2 matrix 8x8,quét hàng, vậy có cần phải dùng ULN2803 không, nếu dùng có cần mắc trở ở đẩu ra của ULN trước khi đưa vào các cột không?
                              cách kiểm tra led matrix:
                              bạn dùng đồng hồ van năng và làm như ảnh mình gửi. Bạn để đồng hồ ở thang x1 que đen để ở H1 que đỏ bạn đặt ở X1 là led mầu xanh, Dữ nguyên que đen ở H1 rồi chuyển que đỏ sang D1 là led mầu đỏ.
                              chúc vui!
                              Attached Files

                              Comment


                              • #30
                                Nguyên văn bởi lenovo_y410 Xem bài viết
                                cách kiểm tra led matrix:
                                bạn dùng đồng hồ van năng và làm như ảnh mình gửi. Bạn để đồng hồ ở thang x1 que đen để ở H1 que đỏ bạn đặt ở X1 là led mầu xanh, Dữ nguyên que đen ở H1 rồi chuyển que đỏ sang D1 là led mầu đỏ.
                                chúc vui!
                                Mình đã làm như thế rồi bạn à,nhưng mà chỉ có đèn đỏ là sáng thôi,đèn xanh không sáng 1 cái nào.
                                Không biết có phải do đồng hồ không,vì mình dùng loại đồng hồ kim,nhó xí xi bằng lòng bàn tay thôi

                                Comment

                                Về tác giả

                                Collapse

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

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

                                Collapse

                                Đang tải...
                                X