One Million LED Updates Per Second with the Teensy 4.0

The TriantaduoWS2811 library for Teensy 4.0 is capable of driving 32,000 WS28XX LEDS at a 33 FPS refresh rate.

Jeremy Cook
4 years ago

When the Teensy 4.0 was released, Ward Ramsdell’s first thought was, “What would a hobbyist do with all that horespower?” His answer, of course, was to drive LEDs, and with his TriantaduoWS2811 library one can produce up to 1.065 million LED updates per second, spread across 32 channels. This works out to 32,000 LEDs running at 33 frames per second. You can run fewer LEDs at a higher refresh rate as well, and it would seem you could run even more LEDs if you’re able to tolerate visible flickering.

These LED tricks are accomplished thanks to the Teensy 4.0’s amazing capabilities, including its Arm Cortex-M7 processor operating at a staggering 600 MHz clock speed. The library takes advantage of the Teensy’s DMA (direct memory access) and FlexIO functions to pump out a million possible LED updates per second.

Ramsdell also used four shift registers linked up to the Teensy in order to pump out all this data. This helped to satisfy his “arbitrary constraint” of minimizing pin count on the board, and external hardware was needed anyway to translate outputs from 3.3V to 5V for the LEDs. The exercise appears to work properly on the scope results seen at the end of the writeup, and he notes that “LEDs flash when they’re supposed to.” Hopefully we'll see a truly massive light installation using this library in the future!

Jeremy Cook
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles