STMicroelectronics STM8S-TOUCH-LIB is a touch sensing library that provides a complete and robust free source-code solution to transform any 8-bit microcontroller into a capacitive touch sensing controller. This solution allows designers familiar with the use of standard microcontrollers to create higher-end human interfaces by replacing conventional electromechanical switches by touch sensing keys.

The STM8 touch sensing library is part of the application firmware. It allows combining various capacitive sensing touchkey/linear/rotary touch sensors with traditional MCU features (communications, control of LEDs, beeper or LCD) in the same application.

Key Features

  • Complete C source code library with firmware examples for STM8S and STM8A microcontrollers
  • Resistor-capacitor (RC) acquisition principle supported
  • Multifunction capability to combine capacitive sensing functions with traditional MCU features (communications, LED/beeper/ LCD control)
  • Flexible touchkey/linear/rotary touch sensors configuration and combination with up to 24 touchkeys and 2 linear/rotary.
  • Acquisition, filtering and calibration functions
  • Enhanced processing features for optimized sensitivity and immunity
  • MCU resources
    • Minimized number of external components
    • Reduced MCU memory space
  • Up to 8-bit linear/rotary resolution
  • Active shield feature
  • Compliant with MISRA
  • Compliant with Cosmic, IAR and Raisonance C compilers


Technical Documentation

Product Specifications
Description Version Size
DB2073 DB2073: STM8S touch sensing library 1.0 183.26 KB
Application Notes
Description Version Size
AN2927 AN2927: Resistor-Capacitor (RC) acquisition principle for STM8 touch sensing applications 3.0 332.05 KB

Presentations & Training Material

Description Version Size
STM32 and STM8 embedded software solutions 7.0 3.12 MB


License Agreement
Description Version Size
SLA0048 SLA0048: Mix Ultimate Liberty+OSS+3rd-party V1 - SOFTWARE LICENSE AGREEMENT 5.2 87.58 KB

Get Software

Part Number Software Version Marketing Status Supplier Download
STM8S-TOUCH-LIB 2.5.0 Active ST


Support & Community