Hi, i am on a new project, trying to control 2112 Pixels with an Arduino Mega and the DMX Shield. So I read the DMX Signal and depending on that I want different modes/patterns for the LEDs.
Since one pixel needs 3 byte, I should be just fine with 8k bytes of ram, right?
But now to the frame rate: How to calculate the max. frame rate I can get?
I have 2 possible solutions to increase it, would they work?
Can I double the frame rate by splitting the 2112 pixels from one digital pin to 2 or even 4?
Lets say I only use one pin: if I update only ~200 pixels and all the others remain dark (or in their previous color), does this affect the frame rate somehow?
Yes, but you will have only around 1.8KB left, less than an Uno has.
With the most common libraries, AdaFruit NeoPixel and FastLED, multiple pins can be used but the library can only send data to one pin at a time. So if you split your 2112 LEDs between 2 pins, 1056 LEDs per pin, you can update one half of your LEDs at double the frame rate, but if you need to update all your LEDs on every frame, the frame rate is the same as having all LEDs on the same pin.
No. Each time you update LEDs connected to a pin, you have to send data for every led, even the dark ones, so there is no improvement in frame rate.
If the frame rate that @kolaha calculated for you is too slow (and that estimate may not actually be achievable because of overheads of the DMX parts of the code) then I suggest you check out the PJRC site. He has Teensy 3.x boards, an OctoWS2811 board and a library that can update strips on 8 pins simultaneously, enabling refresh rates 8x what can normally be achieved. I don't know if something similar can be done with Mega.