Thông báo

Collapse
No announcement yet.

nhờ các pro giúp em !

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

  • nhờ các pro giúp em !

    hiện e đang làm đồ án led ma trận 16x64 . em đã tìm được chương trình rồi . nhưng em ko bjt thay đổi chữ hiện thi trên led ma tran .mong các pro giúp đỡ
    code :
    ;************************************************* *******************************
    ;**************//////------------ 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-5
    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:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    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 8 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 : Líp ®iÖn tö K2
    ; Width x Height (pixels) :243X16
    ; Font Format/Size : Monochrome LCD Fonts ,Horizontal scan ,Big endian order/496Byte
    ; Font make date : 10/11/2009 7:37:17 AM
    ;-------------------------------------------------------------------------------
    DB 0F3H,010H,01FH;Width pixels,Height pixels,Width bytes
    DB 000H,000H,000H,000H,000H,000H,000H,000H,001H,080H, 000H,000H,001H,000H,000H,000H
    DB 000H,000H,007H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,001H,0FEH,001H,080H,000H, 000H,01FH,03CH,038H,000H,000H
    DB 000H,001H,000H,03FH,09FH,01FH,080H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,0F8H,003H,000H,000H,000H, 07FH,0BCH,028H,000H,000H,002H
    DB 002H,018H,01FH,008H,063H,0C0H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,000H,0F8H,004H,038H,000H,000H,00FH, 03CH,064H,000H,000H,006H,004H
    DB 038H,01FH,010H,07BH,0E0H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,000H,0F8H,000H,038H,000H,000H,04FH,000H, 000H,000H,000H,00EH,000H,03CH
    DB 01FH,030H,07BH,0E0H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,000H,0F8H,007H,0F3H,0EEH,001H,0FFH,07CH,07CH, 07DH,0C0H,03FH,0FFH,0F0H,01FH
    DB 078H,003H,0E0H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 000H,0F8H,00EH,079H,0FFH,001H,0EFH,03CH,0EEH,03FH, 0E0H,01EH,03DH,0E0H,01FH,0F8H
    DB 003H,0C0H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H
    DB 0F8H,01EH,079H,0EFH,083H,0EFH,03DH,0EFH,03DH,0E0H, 01EH,03DH,0E0H,01FH,07CH,00EH
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,0F8H
    DB 05EH,079H,0EFH,083H,0EFH,03DH,0FFH,03DH,0E0H,01EH, 03DH,0E0H,01FH,07EH,010H,020H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,0F8H,05EH
    DB 079H,0EFH,003H,0EFH,03DH,0E0H,03DH,0E0H,01EH,0BDH, 0E0H,01FH,03EH,02FH,0E0H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,0F8H,0CEH,071H
    DB 0EFH,001H,0EFH,03CH,0E1H,03DH,0E0H,01EH,0BDH,0E0H, 01FH,01FH,07FH,0E0H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,001H,0FFH,0C7H,0E1H,0FEH
    DB 000H,0FFH,0FEH,076H,07DH,0F0H,01FH,03FH,0F0H,03FH, 0BFH,0FFH,080H,000H,000H,000H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,001H,0E0H,000H
    DB 000H,000H,008H,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,001H,0E0H,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,001H,0E0H,000H,000H,000H
    DB 038H,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, 003H,0F0H,000H,000H,000H,038H
    DB 000H,000H,000H,000H,000H,000H,000H,000H,000H,000H, 000H,000H,000H,000H,000H,000H


    end

  • #2
    ko ai giúp mình rùi .bun quá

    Comment


    • #3
      Đưa cả chương trình này lên thì còn ai muốn giúp cái chi nữa

      Email:
      Tel: 0983.497.310

      Comment


      • #4
        mạch đâu ko port làm sao biết code chạy ra sao

        Comment


        • #5
          Nguyên văn bởi thanhvan90 Xem bài viết
          ko ai giúp mình rùi .bun quá
          To thanhvan90,

          Ai cũng muốn giúp bạn cả nhưng nếu bạn là họ thì bạn sẽ giúp thế nào với câu hỏi này. Muốn người khác giúp được mình thì phải cung cấp đầy đủ thông tin để họ hiểu cái mình đang làm, cái mình đang gặp khó khăn một cách nhanh nhất và dễ hiểu nhất. Bạn nên đưa sơ đồ nguyên lý lên, mô tả ngắn gọn cách hoạt động của sơ đồ nguyên lý theo ý hiểu của bạn. Phần mềm thì đưa lưu đồ lên hoặc ít nhất là mô tả giải thuật của bạn để người khác đánh giá xem nó chưa ổn ở chỗ nào. Không ai có thời gian để ngồi dò từng dòng code mà sửa giúp bạn đâu.

          Bạn thử mô tả lại bài toán đi rồi post lên để anh em giúp.

          Thân.
          For a better world

          Comment

          Về tác giả

          Collapse

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

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

          Collapse

          Đang tải...
          X