Introduction
Here's a fun one: we're going to make a 4-digit seven-segment display count up from 0000 to 9999, over and over, forever, like a little digital odometer. The interesting bit isn't the counting itself, it's how a display with only 11 wires manages to control four separate digits without them all lighting up as the same thing. Once you see the trick behind it, you'll start noticing it everywhere, digital clocks, calculators, car dashboards, all of them.
2. Scope
We'll wire up all 11 pins (7 segments plus 4 digit-selects), figure out how the segments encode each digit 0–9 as a pattern of bits, and write a refresh loop that flashes through all four digits so fast your eye can't tell it's happening one at a time. By the end, you'll understand display multiplexing, a technique that shows up again the moment you deal with anything that needs more outputs than you have spare pins for.
3. Prerequisite
3.1 Hardware
-
STM32 Nucleo-F070RB development board
-
A 4-digit seven-segment display module (the 12-pin multiplexed kind)
-
Breadboard and jumper wires
-
Current-limiting resistors, if your module doesn't already have them built in, check before assuming either way
-
Micro-USB cable
3.2 Software
-
STM32CubeMX (standalone)
-
STM32CubeIDE
-
ST-LINK USB driver
Community Q&A
0 questionsAsk questions and get answers from our community and staff moderators.
No questions yet — be the first to start the conversation!
Ask a Question
Please log in to ask a question or post a reply.
Login to Participate