STMicroelectronics AN3279 Application Note Adjustable LED Blinking Speed

This application note provides a short description of how to use the touch sensing key to change an LED blinking speed.


STMicroelectronics AN3279 Application Note Adjustable LED Blinking Speed - cover page
Brand
STMicroelectronics
Document type
Application Note
Language
English
Pages
13
File format
PDF
File size
153 KB
Published
06 August, 2012
Updated
30 September, 2023
MD5 checksum
BEB4DECB8F8EE6F1A400DFC069902984

About this manual

This document explains how to utilize the touch sensing feature of the STM8S-DISCOVERY evaluation board to control an LED (LD1) blinking speed. The application uses the TS1 key; pressing it increases the blink rate, and the third press turns the LED off.

The software implementation relies on two firmware libraries: the standard STM8S library for general functions like GPIOs and clocking, and a specific touch sensing library to manage the RC acquisition principle via timer TIM3. Timer TIM4 acts as the time-base generator that is reprogrammed upon detecting a touch event.

What's inside

  • Application description
  • Hardware required
  • Application schematics
  • Application principle
  • Touch sensing library configuration
  • Standard firmware library configuration
  • Software flowcharts

Frequently asked questions

What microcontroller is used in the STM8S-DISCOVERY for this application?

The application uses the STM8S105C6T6 microcontroller.

How many times must the TS1 key be pressed to turn off the LED?

The LED is switched off after the third time the TS1 key is pressed.

Which timer controls the blinking speed of the LED?

The application uses timer TIM4 as a time-base generator to control the blinking speed.

Download PDF (153 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →