Using the MAX7219 display

Dot Matrix text.png

I thought it might be fun to display text on a MAX7219 display. The display is organised as a block of 64 pixels and a built-in chip takes care of keeping each led lit. The blocks can be chained together so that you can control the entire display from just three data connections. I used this software, which works a treat. The only change I had to make was to set the hardware type to MD_MAX72XX::FC16_HW to match the panels that I’d bought from Amazon. You can get two four block panels (like the one above) for around 12 pounds, which I think is good value. You can display text or graphics and even set the brightness (which is very useful if you want to cut down on power consumption).

The only thing that I fell over concerns how the update works. I’m used to making changes to the display and then calling an update function to have the changes applied all at once. This is usually the best way to get smooth graphics. I did this with the driver software and got lots of flicker when scrolling. It turns out that the display is updated after every draw operation unless you call a version of the update function with a command to tell it not to do this:

panel.update(false);  // stop automatic update

// do your drawing here

panel.update();     // display the changes

The code above shows how it works. The first call of update says “stop updating while I draw”. The second call applies all the draw operations at once. This makes things a lot smoother.