MAX7219 segmented display driver in Rust
Introducing the MAX7219 segmented display driver. The driver was originally written by Maikel Wever and later picked up by me and improved.
Devices
This driver supports the MAX7219 and MAX7221 chips used in segment and led matrix displays.
I’ve tested the driver with my hifive1-revB board with two sergmented displays connected in series.
Connecting displays in series
When connecting displays in series the setup uses a non-standard SPI data send trick to avoid needing additional CS
cables.
You use the DOUT
pin from first display and connect it directly to the DIN (MOSI)
pin on the next display.
Using the driver
To use the driver you need to instantiate embedded-hal for your specific board. Usage is fairly simple after that, here’s a short example using GPIO pins.
1 |
|
I’ve created a project with examples using the driver via SPI as well as individual GPIO pins utilizing the hifive1-revB development board.
You can also check out the documentation for the driver.