A compact display driver: the MAX7219
We have already introduced MAX7219 in STM32, ChibiOS and a 8×8 LED Matrix, so we are going to jump directly to code section. For convenience we just report link to documentation:
Note that even if pins are arranged in a different way, pin-out remains the same of the 8×8 LED matrix.
In this demo we are going to use Code-B decode to write with ease some number on our 8 digit 7-segment display.
In the demo shown in the video above we set up MAX7219 as normal operation mode, Code-B decode mode for each digit, scanning the whole display with the maximum display intensity. After that we use chVTGetSystemTime() to get system time and with simple operation we compute milliseconds, seconds, minutes and hours since ChibiOS is alive.
The attached demo has been tested under ChibiOS 17.6.x. Note that you can find more recent version of this project int the Download Page. Note also that starting from the version 20 all the demos from PLAY Embedded will be distributed together with ChibiStudio.