I am working on a project where multiple strands of RGBW Neopixels will be driven using a Feather M4 and a NeoPXL8 M4 featherwing. Each strand is 16 meters or 960 leds, broken up into 1 meter pieces, all individually powered by a MPM3610 (20V input 5V output) to reduce the current and thus the wire cross section needed for the power cables. The 16 meter strands were all individually tested using the RGBWstrandtest sketch and work fine.
Switching to the NeoPXL8 library to drive the lot generates some strange behaviour. Using the standard neopxl8 strandtest code, everything works only up to 682 pixels. Attempting to define a larger number of leds breaks the code.
The NeoPXL8 M4 page states:
I think that might be overstated as far as I checked the code in the NeoPXL8 library and also is mentioned in the end comment in the library file:8 strands of concurrent DMA output each one can be 1750 RGB pixels long for a total of 8 x 1750 = 14000 pixels.
In that case 8*1750*16 adds up to be 224KB > 192KB of the Feather M4. Correct me if I'm wrong.this incurs a hefty RAM footprint, about 4X the space required for the "normal" NeoPixel library (1X for the regular NeoPixel buffer which we still use, plus another 3X for the DMA expansion) -- so each RGB pixel needs about 12 bytes RAM, or 16 bytes for RGBW pixels.
Anyway, that is still about double than what I require. By the same calculation, the memory usage for my setup (eight 960-rgbw-led-strands) should thus add up to 8*960*16 so around 123KB, leaving an ample 69KB for the rest of the program which should be plenty, if I'm not mistaken.
But as soon as I try to increase the number of leds in the code past 682, only part of the strand does light up, in a wrong color or flickering.
I'd post the whole code I use, but that seems a bit redundant as the only changes I made to the neopxl8 example are:
Code: Select all
#define NUM_LED 683 // 682 works. Total number of pixels is 8X this!
int8_t pins[8] = { 13, -1, -1, -1, -1, -1, -1, -1 };
Adafruit_NeoPXL8 leds(NUM_LED, pins, NEO_GRBW);