NeoPixels are magical things. It couldn’t be simpler…a single data wire from the microcontroller, linking pixel to pixel for as long as you need. When NeoPixel projects get really large though…hundreds of pixels or more…this simplicity starts to become a bottleneck…
- The standard NeoPixel data rate is a fixed 800 KHz, or 30 microseconds per 24-bit pixel. As projects scale into the hundreds or thousands of pixels, the time spent issuing all that data reaches progressively larger fractions of a second; animation becomes less smooth.
- While this data is being transmitted, all other processing on the microcontroller stops, including interrupts which keep track of time. This is why the millis() and micros() functions gradually drift in NeoPixel projects.
NeoPXL8 (pronounced “NeoPixelate”) is a hardware-and-software combo that works around these limitations to bring buttery smooth animation to large-scale NeoPixel projects.
NeoPXL8 splits the problem 8 ways: rather than one long strand of, say, 1,000 pixels, eight strands of 125 pixels can operate concurrently in perfect sync (twice this length, and maybe a little more, is possible before running out of RAM). Data transmission times are greatly reduced and animation can remain smooth.
Additionally, NeoPXL8 uses direct memory access (DMA) to allow the CPU to continue with other tasks while these data transfers take place in the background. Your code could start processing the next frame of animation, or load data from an SD card. All interrupts and timekeeping functions operate normally, no drift.
The NeoPXL8 code relies on features unique to the SAMD21 and SAMD51 microcontrollers — it should work on any Adafruit “M0” or “M4” board, plus the Arduino Zero. It will not work on other architectures.
The NeoPXL8 FeatherWing adapter provides 8 NeoPixel outputs with 5-Volt logic level shifting, and it stacks directly atop any of our M0 Feather boards — Basic Proto, Adalogger and so forth. You can use the NeoPXL8 code on non-Feather boards (such as the Metro M0 Express or ItsyBitsy M0 Express) but may need to provide your own logic-level shifting, or power the LEDs with 4.5 Volts or less.