Adafruit 16x32 RGB LED Matrix

@lbruder, RAM will be the issue. One 16x32 panel takes 1.5KB of RAM. A 32x32 panel takes 3KB. I think we could manage 3 16x32 panels at 4.5KB and possibly 4 (or 2 32x32 panels) at 6KB but no more. I have to do some compile tests to see what happens.

UPDATE: The maximum number of 16x32 panels I could compile for and still run was 2 (or a single 32x32 panel).

thanks for the update @peekay123

Ok, so it seems I miscalculated the refresh rate of the display. From the data gathered on my logic analyzer, a single frame is drawn in approx. 750us, giving a maximum refresh rate of of 1300Hz!!! The actual refresh rate, of course, will be dictated by the rate at which data can be updated to the display buffers. :stuck_out_tongue:

BTW, by changing the pins used for the RGB lines so they are all on the same GPIO port, I wrote optimized code to get the refresh rate up over 1600Hz!

UPDATE: The full screen refresh rate is actually the scan rate divided by 4. SO, the revised refresh rates are 325Hz and 400Hz. :ok_hand:

3 Likes

Nice! Mohit and I each just bought another one of these displays, very fun :slight_smile:

1 Like

Hi @peekay123,

OK. I have quietly been working on this display this whole summer, and I built a 32x32 version! I’ve got the x/y translation working nicely, but I’m running into a crazy problem with the color mapping. Some colors work fine, but others cause glitches across the whole panel! I think there is some magic display stuff happening that I’m not super knowledgable about, and I’d really love your input if you have time / are interested! :slight_smile:

Here’s the code:

Here’s the build photo:

Here’s a video of it glitching in action, note it should all be one color!

The video starts with me trying to draw x mapped to Red, and y mapped to Green, and then it just cycles through all colors, wiping the display to be one solid color, but it glitches like mad! :stuck_out_tongue:

Any advice / feedback would be very welcome!

Thanks,
David

2 Likes

@Dave, in the picture I noticed that the top panel is reversed of the bottom panel. This could affect x/y positions. Not sure about color issues. Can you share your code? :smile:

1 Like

Hi @peekay123,

Thanks! Sure thing, the physical rotation / layout of the boards physically is weird, I tried my code again with a single board, and I’m seeing similar color glitches.

To address the physical rotation, I added a new rotation mode (5), which is handled here:

I suspect the 2 panel stuff might be a red herring until I can get the colors perfect on the 1 panel, so it might be something I messed up, so I’ll examine my code again to make sure it doesn’t significantly differ from your example in the 1 panel case. :slight_smile:

Thanks,
David

1 Like

@Dave, I will work on the 16x32 code to start with. I have my panel here but it is wired a bit differently for port-writing speed optimization. I’ll test you code with that to see what the issue might be then go from there. :smile:

2 Likes

Hi @peekay123,

You rock, thank you! When it comes to writing direct drivers for displays, I must admit I’m a little over my head, so any help is much appreciated. :slight_smile: My 16x32 version is here ( https://github.com/dmiddlecamp/ambient-display/tree/master/display-firmware ), I gave up on color tests and just started stubbing in a display / menu framework, so it’s still very rough. :smile:

Thanks,
David

1 Like

@Dave, its take a while but I am working on your code with one exception. My Core is wired to use the “accelerated” port writing code. I have your code running and now I just need some test cases to understand what problems you were having. From reset, the display shows a scrolling “Hi Dave!” without any glitches.

BTW, what’s the best way to publish an event that the code can pick up. Or perhaps it’s better to convert the Spark.subscribe to Spark.function and pass them the same message? :smile:

Hi @peekay123,

Thank you! I found certain colors don’t behave as expected, if you switch the text color to solid green, red, blue, etc, you should see some color glitches to start. :slight_smile:

Thanks!
David

@Dave, I added some color rotation code using the HSV colors (larger palette) and ran a larger message so see the color changes and did not have any glitches whatsever. Remember, I am using the port-optimized code which has slightly different wiring and runs faster. I took a video so I will update once I post it. :smile:

UPDATE: @Dave, here is a link to the video: https://www.dropbox.com/s/qgs7c9czbb8k6zz/RGB_Matrix_Dave.mp4?dl=0

2 Likes

Hi @peekay123,

Dang! Okay, I guess I need to scrap my pcb and try wiring it directly again with your code, looks like I probably messed something up. :slight_smile: I’ll try to report back quickly, I really appreciate your help!

Thanks!
David

@peekay123 & @Dave, this is some awesome work you both have done here :+1:
I have just ordered two 32x32 boards and I can’t wait to test your code - if you don’t mind.

I’m just a bit puzzled about this part of the the previous post

Is https://github.com/dmiddlecamp/ambient-display not the most advanced evolution of you colaboration?
Is there another repo?
And what’s the difference between this and the repo in this thread?


I’ve added a forwarding link from the other thread to this one to “merge” them.

@ScruffR, in the library has some (conditionally compiled) optimization for speeding up the I/O to the display which have specific wiring requirements. Dave is referring to that. The RAM on the existing Core won’t handle two 32x32 displays but the Photon with easily. If you need any help understanding the optimization, let me know. :wink:

3 Likes

Thanks for that generous offer!

I’ll try to make two of my Cores work togeter on the two panels (publish/subscribe) - one scrolls some text out of its own panel onto the next Core and round again.
I hope latency is not killing this endeavour.


I can’t wait for March 2015 to come :wink:

2 Likes

Hi @Dave,

Well its my birthday!! 21 AGAIN!! :smile:

What a lucky boy I am. I have received a shiny new 16 x 32 LED matrix. I notice your posts about the same.

Do you have a spark core pin out list / diagram you could share?

Cheers,

Julian

1 Like

@Julian, the pinouts details are defined in the library files. I have also post a “fast” version of the library here, which optimizes the port writing by using a fixed wiring layout, again described in the .cpp file. HAPPY BDAY! :smile:

2 Likes

@peekay123, thank you very much :smile:

2 Likes

hI @peekay123, Thanks for the link. Are you goint to put this “fast” library into the IDE?