STMicroelectronics AN3996 Adjustable LED Blinking Speed Application Note

This application note provides a short description of the demonstration firmware Discover which is preprogrammed in the Flash memory of the STM8S003K3T6 microcontroller


STMicroelectronics AN3996 Adjustable LED Blinking Speed Application Note - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
10
File format
PDF
File size
99 KB
Published
06 August, 2012
Updated
30 September, 2023
MD5 checksum
EFC104DC371767821727FC72B49FA877

About this manual

The document details a demonstration firmware preprogrammed into the Flash memory of the STM8SO003K3T6 microcontroller within the STM8SVLDISCOVERY evaluation board. This software utilizes the basic 8-bit timer TIM4 as a time-base generator to control the blinking frequency of LED LD1.

What's inside

  • Application description
  • Hardware required
  • Application principle
  • Software description
  • STM8S standard firmware library configuration
  • Main loop flowchart
  • Blinking_StateMachine flowchart
  • Revision history

Specifications

Master clock source at power-onHSI clock with prescaler division factor equal to 8
Master clock frequency2 MHz
TIM4 time base4 ms
TIM4 counting frequency62.5 KHz

Frequently asked questions

What happens when the push button B1 is pressed?

Each time the push button event is detected, the delay between LED toggles is adjusted to change the blinking frequency.

What are the LED blinking periods for each button press?

The first press sets a 200 ms period, the second press sets a 100 ms period, and the third press switches the LED off.

What is the initial blinking period at startup?

At application start-up, the blinking period is configured to 1 second.

Download PDF (99 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →