Shop OBEX P1 Docs P2 Docs Learn Events
LED Dot matrix. — Parallax Forums

LED Dot matrix.

labsmokelabsmoke Posts: 38
edited 2008-03-24 13:49 in Propeller 1
Im currently working on a driver for LED Dot matrix displays. Since i got my hands on about·thirty 5x8 led·modules and i felt like wasting some spare time on weekends..smilewinkgrin.gif

Im about half way, i got methods for printing characters and digits, extracting character data from·dat block and streaming it into an strobe engine since you need the display to be scanning all the time to present any advanced patterns.

i hooked up just one module to start with. shown on the pic.

and im going nuts trying to figure out why the·character on the display 'drags' about i dot to the right. you can see it on the pic. anyone got i clue? heres my routine for the strobing:
________________________________
pub out(char) | offset, index, temp·
encode(char)
··
repeat
·offset:=1
·index:=indexstart
·repeat 5
· pause(5)
· col(offset++)
· temp:=letters[noparse][[/noparse]index++]
· row(temp)
_________________________________

What happens is that i repeat the nested loop 5 times since i want 5 individual scans where i push the row·data and i also extract extract 5 different bytes from·the·'dat' block.

and for some reason it drags whatever letter i print about one dot to the right. freaked.gif



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








Sometimes you have to rest your persuit of happiness and just be happy.
1280 x 1024 - 293K

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2008-03-22 11:07
    Hello Labsmoke,

    from that part of your sourcecode i do not understand how the WHOLE thing works

    could you please post your COMPLETE sourcecode or attach it to a posting

    as you did not see the error inside this piece of code the possability that it is somewhere else
    get bigger

    regards

    Stefan
  • labsmokelabsmoke Posts: 38
    edited 2008-03-22 11:34
    theres not much to it really, the only thing i didnt mention is that i use the method 'encode' to convert decimal numbers to binary code. Other than the code ive posted its just some 'case' routines that sort out witch adresses the different letters has.

    and a dat block with the character data.

    the routine i posted is the only thing accociated with the 'scanning'

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








    Sometimes you have to rest your persuit of happiness and just be happy.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2008-03-22 12:41
    Then the problem is not "scanning"
  • BaggersBaggers Posts: 3,019
    edited 2008-03-22 12:57
    labsmoke, try turning led's off before swapping to next row, it might help stop the ghosting
  • labsmokelabsmoke Posts: 38
    edited 2008-03-22 14:49
    ive tried several resetting procedures of the register between switching both rows and colums..but nothing helps..

    the scan is executed about 1 khz.. and the ghosting gets worse if i up the scan freq.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








    Sometimes you have to rest your persuit of happiness and just be happy.
  • labsmokelabsmoke Posts: 38
    edited 2008-03-22 14:56
    i got it, like you sed baggers! i just needed to clear the row EXACTLY before i switched column...perfect..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








    Sometimes you have to rest your persuit of happiness and just be happy.
  • labsmokelabsmoke Posts: 38
    edited 2008-03-23 16:31
    I just wanted to announce that i finished the LED Dot matrix program, or rather got the Strobe engine to work properly.

    As far as i got you can push in a string i of text and the display automaticly scrolls if text is larger than the hooked up led matrix.

    easy expandable dat block for characters, highly modifiable. Everything written in Spin.

    next step is being able to push in decimal values, but my gut tells me it will just take a coffey brake for that.

    if anyones interested that is. I did this just to waste time over the holiday anyway so..roll.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








    Sometimes you have to rest your persuit of happiness and just be happy.
  • tpw_mantpw_man Posts: 276
    edited 2008-03-23 18:49
    I am designing one just like yours, but it will be an 8x8 matrix and probably the software will be much like yours. Do you mind?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1010, so be surprised!
  • labsmokelabsmoke Posts: 38
    edited 2008-03-23 19:26
    not at all..like i said, i did it just for fun over the weekend...but my program doesent have "length" limitation [noparse];)[/noparse] you can hookup as many modules you want... the program supports 1666 character string to scroll.. and i have used at the most 8x20 matrix...

    but go ahead..its a lot of fun..especially to get the strobe engine running...adding character data to the DAT block is a real pain thought...about 180 bytes to edit manually..smhair.gif 360 if you want support for both large an small letters...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








    Sometimes you have to rest your persuit of happiness and just be happy.

    Post Edited (labsmoke) : 3/23/2008 7:46:28 PM GMT
  • richard_hrichard_h Posts: 11
    edited 2008-03-24 00:51
    Could you post a schematic of how the LEDS were connected?

    Thanks, Richard

    Oh, and the completed source code?
  • labsmokelabsmoke Posts: 38
    edited 2008-03-24 07:46
    richard_h:

    Yeah, i was planning to do so if someone was interested. But it will be posted when i feel that it is ready. I will not haste with stuff i dont get payed for =P

    i need to see over the programming some more, get decimal output to work. redraw the algorithm i little bit so you can stop the strobing externally and so on.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








    Sometimes you have to rest your persuit of happiness and just be happy.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-03-24 08:04
    Could it be that your code is counting six times from 0 to 5 rather than 1 to 5?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PLEASE CONSIDER the following:

    Do you want a quickly operational black box solution or the knowledge included therein?······
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • labsmokelabsmoke Posts: 38
    edited 2008-03-24 08:18
    kramer:

    what do you mean? the code works now. if your refering to the ghosting problem.

    The only time the code counts a static number of times is when its extracting character data from register and thats a nested repeat loop that repeats 6 times, one time for each byte of the character. and the reason for using 6 bytes for each character is to get a one-dot space between characters.

    During strobing and displaying of text it is scanning not just every column of the matrix but also every row-byte of the character ram even if that particular byte is not shown at the moment. Its like an onscreen Ram and an offscreen Ram. Just like many other alphanumerical displays.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








    Sometimes you have to rest your persuit of happiness and just be happy.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-03-24 08:25
    Forgive me, I thought that the 'character drag' indicated a banner like movement of the character across the display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PLEASE CONSIDER the following:

    Do you want a quickly operational black box solution or the knowledge included therein?······
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • labsmokelabsmoke Posts: 38
    edited 2008-03-24 08:50
    it was like that, sorta. every lit leds neighbor to the right was lit about 50%, but that problem is fixed. The only thing i would like to get done now is to somehow get rid off the dropping intensity of the leds when the character string gets longer(about 16 chars)


    i know what the problem is thought, its lazy programming. i must narrow the character ram and then have a secondary ram.
    its just so much programming time....and so little real time...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








    Sometimes you have to rest your persuit of happiness and just be happy.
  • BaggersBaggers Posts: 3,019
    edited 2008-03-24 12:53
    glad you got it sorted labsmoke [noparse]:)[/noparse]
  • labsmokelabsmoke Posts: 38
    edited 2008-03-24 13:49
    the only thing that buggles me is that i have to rewrite the output method to work with shift registers now..since i need at least 58 I/Os if i want to hookup 10 of these modules..it smells like boring programming...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔








    Sometimes you have to rest your persuit of happiness and just be happy.
Sign In or Register to comment.