Help led matrix


Closed Thread
Results 1 to 9 of 9

Thread: Help led matrix

  1. #1
    Join Date
    Apr 2008
    Posts
    6

    Default Help led matrix

    Hi to all,
    I'm a newbie in PIC programming , someone know the PICBASIC PRO code to make this with
    a pic 16f84a?



    I try to make this but don't work.

    Thank and sorry for my enlish

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mosbc69 View Post
    I try to make this but don't work.
    Post your code...
    A schematic might help too...
    Just a thought...

  3. #3
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Hi mosbc69

    I try to make this but don't work.
    How far have you got already with this project?

    do you have the circuit built?

    rgds

    Duncan

  4. #4
    Join Date
    Apr 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    This is the code:

    TRISA=%00000000
    TRISB=%00000000

    PORTA=%00000000
    PORTB=%00000000
    x var byte
    z var byte



    X=0



    start:


    gosub scan
    portA=%00000001
    PORTb=z
    PAUSEus 150

    x= x+1

    gosub scan
    portA=%00000010
    PORTb=z
    PAUSEus 150

    x= x+1

    gosub scan
    portA=%00000100
    PORTb=z
    PAUSEus 150

    x= x+1

    gosub scan
    portA=%00001000
    PORTb=z
    PAUSEus 150

    x= x+1

    gosub scan
    portA=%00010000
    PORTb=z
    PAUSEus 150

    IF x>4 then X=0


    GOTO START

    scan:
    lookup x,[$60,$50,$48,$47,$40],z
    return

    With this code i can show the character (in this case the number 7) but i can't move it
    from right to left.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Code:
    TRISA=0:TRISB=0:PORTA=0:PORTB=0:x var byte:z var byte:X=0
    start:     gosub scan:porta=1:portb=z:pauseus 150:x=x+1:gosub scan:porta=2:portb=z
    pauseus 150:x=x+1:gosub scan:porta=4:portb=z:pauseus 150:x=x+1:gosub scan
    porta=8:portb=z:pauseus 150:x=x+1:gosub scan:porta=16:portb=z:pauseus 150
    IF x>4 then X=0
    GOTO START
    scan:  lookup x,[$60,$50,$48,$47,$40],z : return
    Well, there's nothing in your code to make it slide left to right, up to down, or otherwise...
    Think about it. You're displaying 'chunks' of this character. You need to make the 'chunks' appear in different spots.
    How could you do that?

  6. #6
    Join Date
    Apr 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    i know that i must make 'chunks' of character , but after how can i move it ?

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mosbc69 View Post
    i know that i must make 'chunks' of character , but after how can i move it ?
    Again, think about it...
    If the 1st column chunk gets sent to the 1st column, and the 2nd column chunk gets sent to the 2nd column, and so on and so on......then you have to move the 2nd column chunk to the 1st column chunk, move the 1st column chunk to the 5th column chunk...and so on and so on, until everything is moved over...then display it all over again.
    But, you're reading all of your data from a 'fixed' place and displaying it to those same 'fixed' places.

    Now how could you possibly change the place where the data is sent without changing the place where you got it from?
    Or, how could you change the order in which you read the data to send out without changing the place that you're sending it to?

  8. #8
    Join Date
    Apr 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    thanks very much,
    now i try to do this.
    If i have more difficulty can you help me more ?

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Sure, this why the forum exist!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. led matrix pic 16f84 and 4017 help me please
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 5th February 2011, 00:06
  2. new and need help
    By smeghead in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2008, 20:19
  3. RGB LED Matrix
    By ERIK in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 28th June 2008, 07:01
  4. Replies: 27
    Last Post: - 7th December 2007, 22:28
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts