Modified DMD library

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
debenham
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Post by debenham » Wed Jan 18, 2012 4:48 am

I have managed to get grayscale working - but it is too slow for scrolling text/animation
Is it worth merging in that change? (I haven't added it to my github as yet)

JRThro
Posts: 5
Joined: Tue Jan 24, 2012 4:46 am

Re: Modified DMD library

Post by JRThro » Tue Jan 24, 2012 4:49 am

debenham wrote:I have managed to get grayscale working - but it is too slow for scrolling text/animation
Is it worth merging in that change? (I haven't added it to my github as yet)
I couldn't really say, since I don't even have a DMD yet.

But how many levels of gray do you have?

debenham
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Post by debenham » Tue Jan 31, 2012 5:04 am

I found that 3-bit grayscale is quick enough
I'm basically just updating the screen 3 times as much - but only turning the led on one out of three cycles for colour=1 and turning it on all cycles for colour=7.
But the problem is that the LED's are so bright that there isn't enough difference between colour=1 and colour=7 :(

Mantrid
Posts: 1
Joined: Mon Feb 06, 2012 2:00 pm

Re: Modified DMD library

Post by Mantrid » Mon Feb 06, 2012 2:36 pm

Nice library. The scrolling text and fonts look awesome :)

I'm playing around with the scrolling (just got my DMD today), and trying to get it to go in other directions. Using dmd.drawMarquee I can scroll left, but backwards, up, or down don't work well. Using dmd.drawString and dmd.drawBox to write "test" and draw a box, I can scroll that off to the left and right. Up and down does odd things :/

As for a suggestion, and this might already be doable (I just don't know how), it would be nice to have virtual screens - with the ability to scroll between them. The idea would be to create a screen on the real display, and then create another virtual screen to one side and then scroll that one on, as the other scrolls off. I'm not sure if multiple virtual screens would work best/easiest, or if a virtually large single display would work better ie. Pretend you have a 512x256 display and then scroll/step around what's viewable.

debenham
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Post by debenham » Tue Feb 07, 2012 12:16 am

Adding support for multiple screens mixed a few things up ;)
I've given this a retest and everything looks to be working fine now (I tested up/down/left/right on one and two screens and everything worked ;) )
Grab a new copy of the library from https://github.com/cjd/DMD

In relation to your suggestion - sadly it wouldn't really be practical due to memory constraints.
A single 32x16 DMD display uses 64 bytes of memory so a 512x256 display would use up 32K of memory - which more than an arduino has :(

JRThro
Posts: 5
Joined: Tue Jan 24, 2012 4:46 am

Re: Modified DMD library

Post by JRThro » Tue Feb 07, 2012 5:06 am

debenham wrote:I found that 3-bit grayscale is quick enough
I'm basically just updating the screen 3 times as much - but only turning the led on one out of three cycles for colour=1 and turning it on all cycles for colour=7.
But the problem is that the LED's are so bright that there isn't enough difference between colour=1 and colour=7 :(
I got my DMD today (woo!) but won't have a chance to play with it until this weekend.

Nice to hear that the LED's are nice and bright.

If you have 3-bit grayscale, shouldn't color=1 be 7 times dimmer than color=7, rather than only 3 times dimmer? I have no idea if updating the screen 7 or 8 faster than normal is even practical. I also don't know how far away the LED's have to get from being fully on before they are noticeably dimmer.

Would it be possible to flicker the "gray" LED's individually or en masse at such a rate as to make them noticeably dimmer than the "black" (fully on) LED's?

I sure do have a lot of questions. Maybe I'll be able to answer some of them myself once I hook things up and play with the DMD myself.

debenham
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Post by debenham » Tue Feb 07, 2012 5:27 am

with 3 BPP colour=1 ends up about one third of colour=7
This is because grayscale is done by quickly turning pixels on/off (so with 3-bits the minimum brightness is 1 out of three while the max is 3 out of three)
The 3-bit grayscale doesn't mean 8 potential shades = there are only 4 (since 010, 100 and 001 would all look the same - as would 110, 011 and 101)
Updating the screen 3 times more often than normal to get this working is about the limit of it and even then it only works with a single screen (too slow if more than one screen)
Even getting the display working with 2BPP (so giving off, half-on and on) only works with at most 2 or three screens (in theory) :(
The more I've worked on this the less it seems usable - I've hit the limits on how quickly the screen can update :(

logeait
Posts: 1
Joined: Fri Mar 02, 2012 12:32 am

Re: Modified DMD library

Post by logeait » Fri Mar 02, 2012 12:41 am

Hi, sorry for the long post. I have four of the displays. I have been using a single display without problems for a while but when I connect up more than one it all goes haywire. I have downloaded the latest library and demo but cant get it to work. When I have two displays and set it up as 2 across one dow, I get half the colon on display one and nothing else. Then the pattern appears at half speed on display one. the freet ronics text only displays on display one, scrolling doesnt appear. No other setting (1 across 2 down, 2 across, 2 down) helps.
With three displays half the colon shows on display one, then all displays flash once, the freet ronics appears on display one only and the scrolling appears on display three.

I have tried all different combs of setup and connection of displays. I am using the inc cable to connect the extra displays. Is there some addressing I need to do to the extra displays or something else ??

debenham
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Post by debenham » Thu Mar 22, 2012 3:43 am

Make sure you are giving power directly to the panels - I found that just using the arduino to power more than one display fails quite badly.

debenham
Posts: 33
Joined: Tue Jan 10, 2012 3:22 am

Re: Modified DMD library

Post by debenham » Thu Apr 26, 2012 4:31 am

I have made some more additions to my version of the DMD library - it now supports multiple buffers and can even transition between them.
Video available at https://www.youtube.com/watch?v=s4Qjski-WMY
Info/source code available on my blog at http://www.adebenham.com/2012/04/dmd-sc ... ansitions/

Post Reply