caramoan tour package

caramoan tour package

Author Topic: AT89C2051 7 X 10 LED matrix need help  (Read 422 times)

Offline drin20

  • Size D Battery
  • ******
  • Posts: 478
  • Pogi/Ganda Points: 17
AT89C2051 7 X 10 LED matrix need help
« on: March 23, 2012, 12:23:50 AM »
i created this circuit.



pero ang assembly code ay hindi ma compile. ano po kaya problem ko sa code? "hello world" lang po gusto ko i display na continous.

Quote
.org 0x00               ; in the beginning ...

start:  mov dptr,#btab          ; bannerstart
loop0:  mov r5,#9               ; 10 refresh per screen
loop1:  mov r4,#0               ; 7442 adresse = 0
        mov r6,#9               ; 10 columns per screen
loop2:  mov a,r4                ;
        mov p3,a                ; output column to 74LS145
        mov a,r6                ; access by columns
        movc a,@a+dptr          ; get led pattern
        cjne a,#0x80,weitr      ; finished ?
        ajmp start
weitr:  xrl a,#255              ; invert for BC558
        mov p1,a                ; output to leds

        dec r6                  ; decrement one column

        mov R1, #0x20            ; delay
        acall delay

        inc r4                  ; next column for 74LS145
        mov a,r4                ;
        cjne a,#10,loop2        ; 10 columns done ?
        dec r5                  ; decrement one refresh
        mov a,r5                 
        cjne a,#0,loop1         ; all refersh finished ?
        inc dptr                ; next scroll
        ajmp loop0              ; next screen

delay:
dloopo: mov   r2, #0x10         ; outer loop
dloopi: djnz  r2, dloopi        ; inner loop
        djnz  r1, dloopo       
        ret                     ; return


btab:   
        .db     0x00,0x00,0x00,0x00,0x00,0x00           ;//
        .db     0x7f,0x08,0x08,0x08,0x7f,0x00           ;// H
        .db     0x7f,0x49,0x49,0x49,0x41,0x00           ;// E
        .db     0x7f,0x40,0x40,0x40,0x40,0x00           ;// L
        .db     0x7f,0x40,0x40,0x40,0x40,0x00           ;// L
        .db     0x3e,0x41,0x41,0x41,0x3e,0x00           ;// O     
        .db     0x00,0x00,0x00,0x00,0x00,0x00           ;//
        .db     0x3f,0x40,0x38,0x40,0x3f,0x00           ;// W
        .db     0x3e,0x41,0x41,0x41,0x3e,0x00           ;// O
        .db     0x7f,0x11,0x11,0x31,0x4E,0x00           ;// R
        .db     0x7f,0x40,0x40,0x40,0x40,0x00           ;// L
        .db     0x7f,0x41,0x41,0x41,0x3e,0x00           ;// D
        .db     0x00,0x00,0x00,0x5f,0x00,0x00           ;// !
        .db     0x00,0x00,0x00,0x00,0x00,0x00           ;//
        .db     0x00,0x00,0x00,0x00,0x00,0x00,0x80      ;// finished
                                                                        ; ^^^^ bit 7 

Philippine Electronics Forum

AT89C2051 7 X 10 LED matrix need help
« on: March 23, 2012, 12:23:50 AM »

Offline Deantyne

  • Lead Acid Battery
  • *******
  • Posts: 924
  • Pogi/Ganda Points: 90
  • Gender: Male
  • Focus my friend...
Re: AT89C2051 7 X 10 LED matrix need help
« Reply #1 on: March 23, 2012, 09:40:26 AM »
abang lang muna...study mode.
BACK TO BASICS

Philippine Electronics Forum

Re: AT89C2051 7 X 10 LED matrix need help
« Reply #1 on: March 23, 2012, 09:40:26 AM »

Offline drin20

  • Size D Battery
  • ******
  • Posts: 478
  • Pogi/Ganda Points: 17
Re: AT89C2051 7 X 10 LED matrix need help
« Reply #2 on: March 23, 2012, 09:43:31 AM »
up.

Philippine Electronics Forum

Re: AT89C2051 7 X 10 LED matrix need help
« Reply #2 on: March 23, 2012, 09:43:31 AM »

Offline drin20

  • Size D Battery
  • ******
  • Posts: 478
  • Pogi/Ganda Points: 17
Re: AT89C2051 7 X 10 LED matrix need help
« Reply #3 on: March 25, 2012, 12:33:49 PM »
^^ up

Philippine Electronics Forum

Re: AT89C2051 7 X 10 LED matrix need help
« Reply #3 on: March 25, 2012, 12:33:49 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com