Shop OBEX P1 Docs P2 Docs Learn Events
Propellering the Adafruit 16x32xRGB LED array - Page 3 — Parallax Forums

Propellering the Adafruit 16x32xRGB LED array

13

Comments

  • tdg8934tdg8934 Posts: 126
    edited 2012-02-18 19:35
    Well for now, the easiest fix is just to do a 'Flip Horizontal' in MS PAINT for 24bpp BMPs.

    Thanks.
  • tdg8934tdg8934 Posts: 126
    edited 2012-03-03 17:32
    Ray,

    I've been spending a good deal of time listening to the propeller podcasts from firstspin.tv and they have been great! I have looked over all of your programs to control the 32x16 RGB display. The one that controls 6 displays loads 4 bit BMP files into EEPROM and I had some questions about that.

    You have most of the initial EEPROM coding commented out for other BMP files (Christmas, etc.), I have only the long but small 4 bit New Years.BMP. Can you send me the others if you have them, and how I would implement them outside of just uncommenting the code?

    Is anything gained by loading them into the upper 32K of EEPROM vs just having them in Windows as a BMP?

    Been wondering if it would be possible to load in 100 or more BMPs as frames to show quickly as a short 24 bit movie? Just thinking out loud.

    Anything gained by the micro-SD card (I have an 8GB card) use instead? Drivers for BMP would have to be written - and not ready for that.

    Just trying to better understand the Propeller Platform USB and your wonderful driver and graphics code.

    I have already added in line drawing routine (on the web Bresenham algorythm I converted to SPIN). Also used created box and boxfill commands also. I'm getting there but slowly and wanting to learn.

    Studying PASM too (barely) but probably a bit above my level until I really understand SPIN first.

    Thanks again!

    Tim
  • RaymanRayman Posts: 14,646
    edited 2012-03-03 18:35
    Sounds like you're making good progress.

    It would probably be better to use SD card than upper EEPROM, like I've done.

    I was just trying to get something done fast...

    There isn't much memory left when driving 6 panels with this driver...
    So, I had to choose between SD card driver and memory for a huge bitmap file to scroll...

    Anyway, I'm sure that could be improved on...

    I think I could show a movie, no problem.
    But, instead of decoding BMP, I would probably precalculate what goes in the big buffer array for each frame.
    That way, you can read from SD directly into the output buffer... That should be extremely fast...

    Here are those Xmas pics:
    XmasBitmaps.zip
  • RaymanRayman Posts: 14,646
    edited 2012-06-20 13:19
    Finally have these "shields" for sale... Price is $19.99 with free shipping. Just send email to ray@rayslogic.com if you are interested. I'll put them up for sale on the website soon too.

    Somebody was asking for the 6-panel driving code and I'm not sure if I posted it yet, so here it is:
    Adafruit_Demo3_NewYear - Archive [Date 2012.06.20 Time 16.17].zip
  • jagrifenjagrifen Posts: 36
    edited 2012-08-22 18:14
    Hi, Ray, I'm really impressed with everything you have done with this project so far. Makes me realize there are a lot of things I need to learn about when it comes to LED displays! I'm wondering if you could help me modify some of your code to accommodate 10x16 fonts? I've started making my own font table and I have tried playing around with tweaking some of your code but I don't have enough knowledge of ASM to really know what's going on. I'm going to use this project as a good excuse to start leaning some ASM. Any help would be greatly appreciated!
    Thanks,
    JG
  • RaymanRayman Posts: 14,646
    edited 2012-08-23 03:25
    jagrifen, I just happen to be working on a Font Editor (another thread) to help make fonts for displays like this...
    I'll try to find time soon to work on an example with flexible font size...

    Just took a look at the assembly driver and it will be very easy to do a 10x16 font...

    The driver is currently hard wired to 6x8 characters with a 5x8 defined font...

    Here's the variables that control the font dimensions:
    DAT DrawLimitedChar_  'draw a character at given x and y but limit to xmin, xmax  
    ...
                  mov       t9,#6  
    ....
                  mov       t11,#8  
    ...
                  rdbyte    t10,t12
    

    And the font is defined with each character on a row like this:
    DAT '// standard ascii 5x8 (really 6x8 because need a padding column) font from Adafruit example code
    font5x8
    byte   $00, $00, $00, $00, $00 
    

    So, I think all we need to do is change that #6 to #10 and #8 to #16 and the "rdbyte" to "rdword".
    Then, make the font as rows of 9 words instead of 5 bytes...

    Question for you: Do you like how Adafruit has only 5 columns defined and the 6 column assumed blank?
    That is, would you rather define a 9x16 font and draw it as 10x16 with a space inbetween each character?
    or, would you rather define the font as the full 10x16?
  • jagrifenjagrifen Posts: 36
    edited 2012-08-23 04:38
    That's exactly what I was looking for! I knew I needed to change the x and y limits for the drawLimitedChar_ but for whatever reason I didn't see those two lines (prolly has something to do with the seven month old crawling around that doesn't let me look at my computer for more than 3 minutes at a time.)
    As far as assuming a blank to draw the space between letters, I am currently defining my fonts at the full 10x16 and making sure there is a space between the letters as I draw them but I have to say I don't really know what the convention is (if there is a convention). I prefer defining the font with all the pixels because it allows one to draw special characters that could be displayed together without spaces in between.
    Thanks for your help!
  • jagrifenjagrifen Posts: 36
    edited 2012-08-23 13:21
    @Rayman, I've tried the adjustments you recommended plus I changed the PrintC method to
      DrawChar5x8(col*10,row*16,c,forecolor,backcolor)
      if ++col == cols
        newline
    

    Here is the what I have stored for the value '0'
    word   $03F8, $0FFE, $1C07, $1803, $1803, $1C07, $0FFE, $03F8, $0000
    

    When I load this code and try to display a '0' I get a character that appears to be column/word 1 repeated twice, column/word 2 repeated twice, column/word 3 repeated twice, column/word 4 repeated twice, and then column/word 5 with a total of 9 columns. Any ideas what may be causing this to happen?
  • RaymanRayman Posts: 14,646
    edited 2012-08-23 13:30
    Ok, in addition to changing rdbyte to rdword, you need to change the address increment from +1 to +2...

    BTW: The Font Editor can now import and export in a compatible format:
    http://forums.parallax.com/showthread.php?141644
  • jagrifenjagrifen Posts: 36
    edited 2012-08-23 13:38
    Perfect! I changed the following
                  add       t12,#2
    

    Thanks a lot for your help.
    JG
  • RaymanRayman Posts: 14,646
    edited 2012-08-23 13:45
    No Problem. BTW, just in case your code isn't proprietary, feel free to post your modifications here for others to see.
    I understand if you can't do that though...
  • jagrifenjagrifen Posts: 36
    edited 2012-08-23 13:52
    I will absolutely do that as soon as I get this working. Now that I've gotten the number 0 to display, I am trying to get it to display "012" but I can tell there are some issues with how the font data is loading. Any ideas?
  • RaymanRayman Posts: 14,646
    edited 2012-08-23 13:55
    I'm not sure exactly what you mean. If you post or email me your code, I'll take a look.
    BTW: The "archive" function of the Prop Tool is an easy way to package everything in one zip file...
  • jagrifenjagrifen Posts: 36
    edited 2012-08-23 14:11
    What I should have said was that when I try to display the character '1', I can tell that it is taking the last few words from the data for the character '0' and displaying them first. When I try to display the character '4', I am able to get the entire character '1'.
    Adafruit_Demo1_JG - Archive [Date 2012.08.23 Time 16.08].zip

    Update: I've started by redefining all the characters in the DAT section as groups of 10 words. I've also tried defining them as groups of 9 words. It seems like playing with the value in the following code affects this but I'm not sure it is the only thing I need to be checking.
    rol       arg2,#2
    
  • RaymanRayman Posts: 14,646
    edited 2012-08-23 15:33
    Ok, I see the problem...
    This code:
    mov       t12,AsmPFont5x8
                  add       t12,arg2
                  rol       arg2,#2
                  add       t12,arg2
    

    is effectively doing t12=AsmPFont5x8 + arg2*5

    The *5 is because the char addresses are 5 bytes each.
    Now, you have 10 words or 20 bytes between chars, right?

    So, change that code to this and we'll add a *4 in there to make it *20
    mov       t12,AsmPFont5x8
                 rol   arg2,#2
                  add       t12,arg2
                  rol       arg2,#2
                  add       t12,arg2
    

    but, I haven't tested that....
  • jagrifenjagrifen Posts: 36
    edited 2012-08-23 15:38
    Boom. That's it! I'll try to post some code tonight.
  • RaymanRayman Posts: 14,646
    edited 2012-08-23 16:27
    Excellent. Btw, I just posted some tips on how to export from RaysFontEditor into code that you can paste into Spin for the font.

    For you, you'll need to change the font to 10x16 and then export "word" aligned instead of "byte" aligned.
  • jagrifenjagrifen Posts: 36
    edited 2012-08-24 13:45
    I'll give your font editor a whirl this weekend. Perfect timing...I was just thinking to myself how great it would be if there was a free font editor around (I've just been using a spreadsheet with macros...too much room for error). Here's some code I put together this morning to demonstrate some of the things I will be doing with this LED matrix. Nothing too fancy here.
  • RaymanRayman Posts: 14,646
    edited 2012-08-25 04:01
    Just tried it... Looks good. Glad you were able to get that going with just a little help.

    To use with the Rayslogic.com shield for Adafruit RGB matrix, I just had to change the base pin from 3 to 4:
    Panel1_BasePin = 4  '3
    
  • jagrifenjagrifen Posts: 36
    edited 2012-08-31 14:40
    I've modified the driver and demo files to allow 3 panels to be used side by side in portrait mode (48 wide by 32 high). I currently own only one panel for the time being so I haven't done thorough testing. Right now it seems to work with text and also allows the user to set individual pixels.
  • RaymanRayman Posts: 14,646
    edited 2012-09-01 04:47
    jagrifen, Thanks! I think I thought about that mode, but didn't get around to it. That is probably the best way to set up 3 panels for pictures or video.
    Gives you an aspect ratio somewhere between 4:3 and 16:9.
    3 panels is also the most you can do without giving up color bits.
    I'll test that out when I get home next week.
  • jagrifenjagrifen Posts: 36
    edited 2012-09-02 18:30
    I did some testing tonight and noticed panel three was not working. I added a few lines of code and it should work now.
  • RaymanRayman Posts: 14,646
    edited 2012-09-03 08:02
    Just tested on my 6-panel setup and I think it works...
    Here's a photo:
    jagrifen1.jpg


    You have to use your imagination a little to put the panels in the right layout and ignore the bottom row...
    1024 x 768 - 108K
  • jagrifenjagrifen Posts: 36
    edited 2012-09-09 13:17
    Here's a little bit of what I've been working on. Far from finished but getting closer every day!
  • RaymanRayman Posts: 14,646
    edited 2012-09-09 15:12
    Looks great! Maybe you can figure out a better way to mount the panels together...
  • jagrifenjagrifen Posts: 36
    edited 2012-09-09 15:20
    One step at a time!
  • jagrifenjagrifen Posts: 36
    edited 2012-09-16 08:34
    The attached picture shows six panels set up on a rotating mount. In six panel configuration it is rotated 90 degrees so that the panel is 64 wide by 48 tall. In the configuration shown, the bottom portion will be masked off for this particular demo to offer a screen size of 48 wide by 32 tall. The code could be modified, however, to allow all six panels to be used in either configuration.

    photo 2.jpg
    1024 x 765 - 102K
  • RaymanRayman Posts: 14,646
    edited 2012-09-16 09:27
    Very nice! Thanks for sharing the photo. I think I like that arrangement, although I might do it landscape instead of portrait to get a 4:3 aspect ratio...

    My current 6 panel setup is 96 wide by 32 tall, better for scrolling messages. But, your way is better for photos and video.
    I would like to do video one day, when I have the time...
  • RaymanRayman Posts: 14,646
    edited 2012-09-23 09:10
    Somebody just pointed these 32x32 versions from Adafruit out to me:
    http://www.adafruit.com/products/607

    They wonder if they are compatible...
    From the picture, it appears that these are just 2X of the 16x32 ones stuck together...
    So, I imagine they will work just as if they were two seperate 16x32 panels.

    On closer reading, it seems it's not as compatible as I thought... There's a "D" input now, in addition to "ABC"...
  • tdg8934tdg8934 Posts: 126
    edited 2012-09-25 08:48
    I was thinking of getting 1-2 of those but the cost is good for what you get but a little high for my budget. I had moved to Kalamazoo, MI recently and had my projects on hold till I got some time again. Time to start up again and waiting patiently for the Propeller 2 and see how that can really increase the bandwidth for these displays.

    Tim
Sign In or Register to comment.