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.
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...
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.
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
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?
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!
@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?
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...
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?
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...
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.
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.
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.
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.
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.
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...
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"...
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.
Comments
Thanks.
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
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
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
Thanks,
JG
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:
And the font is defined with each character on a row like this:
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?
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!
Here is the what I have stored for the value '0'
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?
BTW: The Font Editor can now import and export in a compatible format:
http://forums.parallax.com/showthread.php?141644
Thanks a lot for your help.
JG
I understand if you can't do that though...
BTW: The "archive" function of the Prop Tool is an easy way to package everything in one zip file...
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.
This code:
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
but, I haven't tested that....
For you, you'll need to change the font to 10x16 and then export "word" aligned instead of "byte" aligned.
To use with the Rayslogic.com shield for Adafruit RGB matrix, I just had to change the base pin from 3 to 4:
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.
Here's a photo:
You have to use your imagination a little to put the panels in the right layout and ignore the bottom row...
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...
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"...
Tim