Adafruit's PioMatter Library Brings HUB75 RGB LED Matrix Support to the Raspberry Pi 5's RP1 Chip
The Raspberry Pi 5 can now drive Adafruit's RGB Matrix Bonnet and HAT accessories, thanks to the RP1's PIO blocks.
Adafruit has released its first guide on using the Raspberry Pi 5's RP1 coprocessor's spare capacity to drive HUB75-compatible LED matrix panels β using its work-in-progress alpha-status PioMatter library.
"Each new generation of the Raspberry Pi brings improvements over the last, and the Raspberry Pi 5 is no exception," Adafruit's Tim Cocks explains. "However, along with the great new features and enhanced performance can also come some incompatibility with the way things were done on prior versions of the hardware. One such incompatibility with the Pi 5 was the ability to drive HUB75 compatible RGB matrices like the older Pis could."
At the heart of this loss of compatibility is a shift in how the Raspberry Pi's system-on-chip communicates with "low-speed" peripherals including the general-purpose input/output (GPIO) header. Rather than linking directly to the peripherals, as in previous generations, the Raspberry Pi 5 farms the work off to an in-house coprocessor dubbed RP1 β a part that includes features very similar to the RP2040 microcontroller, also known as RP2, which launched before it.
One of these features is PIO, programmable input/output blocks that run state machines independently of the main processor. This allows the chip to effectively define new hardware features in software β and recent work from Raspberry Pi exposed the unused PIO blocks to the end user for the first time through an open source library dubbed piolib
.
It's the release of this library that has had Adafruit working on its own: the Adafruit Blinka Raspberry Pi 5 PioMatter library, or PioMatter for short. This runs on the RP1, without interfering with its usual operations, and uses the PIO blocks to control HUB75-compatible LED matrices over the GPIO pins β just like earlier, directly-connected incarnations of the Raspberry Pi.
Adafruit isn't alone in looking to take advantage of the spare capacity in the Raspberry Pi 5's RP1 chip: earlier this year developer Marian Vittek released a tool, which uses piolib
to turn the RP1's available PIO blocks into a hardware implementation of a DShot controller β delivering high-precision electronic speed control (ESC) with little CPU overhead.
The PioMatter library, currently in an alpha release, is available on GitHub under the reciprocal GNU General Public License 2; a guide to using it to control LED matrices through either Adafruit's RGB Matrix Bonnet or RGB Matrix Hat is available on the Adafruit Learn portal.