7-segment display and STM32 using ChibiOS

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:

MAX7219 Datasheet

Note that even if pins are arranged in a different way, pin-out remains the same of the 8×8 LED matrix.

Proposed demo

In this demo we are going to use Code-B decode to write with ease some number on our 8 digit 7-segment display.

Demo explained

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.

Project download

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.

RT-STM32F401RE-NUCLEO64-MAX7219-7_segment_display-176

Be the first to reply at 7-segment display and STM32 using ChibiOS

Leave a Reply