STM32L-Discovery
Timer Count Down



Home
STM32L Home Page
STM32 Index









INTRODUCTION:
Often I must do the speaker for MKT or Training presentations, in this situation is essential know how much time is left at the end of the session.
For this reason I made this project using the STM32L-Discovery.

This example was tested on STM32L-Discovery and does the following things:

Configure the GPIOs for driving the LED3 (green - PB7) and LED4 (blue - PB6).
Configure the GPIO for read the Blue Button (UP - PA0) and a Button connected to PD2 (DOWN), that change the Time SetUp.
Configure the SYSTICK to 1mS
.
The LCD visualize the minutes that remain to arrive to 0.
Time SetUp max is 120min.

Harware request:
Connect a Push Button (N.O.) from PD2 and GND
Optional: if you connect a buzzer from PB6 and GND when the LED4 (Blue) flashing also the buzzer does the same.


This examples was tested using:
STM Library Ver. 1.1.1
KEIL Ver. 4.60

EXPLANATIONS:
At PowerOn the LCD display: "29 MIN" and start to CountDown.
For SetUp the Time push: Blue button (Up) and button that you have connect on PD2 (Down).
The LCD visualize the minutes that remain to arrive to 0.
When the display shows 10 min we have:
the BLUE LED flashing 4 times
When the display shows time <= 9 min we have:
the LCD flashing and visualize the minutes that remain to 0
the Green LED flashing
When the Time arrive at 0 min the BLUE LED flashing 11 times.
When the Time is below 0 min on the display appears the flashing word: STOP
For restart the Count Down press the Black Button.

For get this example click here and download the STM32L-Discovery Timer Count Down




Home
STM32L Home Page
STM32 Index