ST STM8-TOUCH-LIB STM8 touch sensing library 数据手册

Data brief
For further information contact your local STMicroelectronics sales office.
September 2010Doc ID 17896 Rev 11/9
STM8-TOUCH-LIB
STM8 touch sensing library
Features
■Complete C source code library with firmware examples for all STM8 microcontrollers ■Both resistor-capacitor (RC) and charge transfer (CT) acquisition principles supported ■
Multifunction capability to combine capacitive sensing functions with traditional MCU features (communications, LED/beeper/ LCD control) ■Configuration of STM8 GPIO as touchkey ■
Flexible touchkey/wheel/slider configuration and combination
–RC acquisition: up to 24 keys and 2 wheels/sliders supported
–CT acquisition: up to 16 keys and 2 wheels/sliders supported ■Acquisition, filtering and calibration functions ■Enhanced processing features for optimized sensitivity and immunity
Touch-sensing user interface through firmware API for status reporting and application configuration
MCU resources
–Minimized number of external components –Reduced MCU memory space
■Up to 8-bit wheel/slider resolution with only three capacitive sensing channels ■Active shield feature ■Compliance with MISRA
Compliance with Cosmic, IAR and Raisonance C compilers
Description
STMicroelectronics STM8-TOUCH-LIB is a touch sensing library that provides a complete robust free source-code solution to transform any 8-bit STM8 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, wheels or sliders with traditional MCU features (communications, control of LEDs, beeper or LCD) in the same application.
Two acquisition principles, RC and CT, are available and can be configured at compiling level. Both acquisition principles offer the same advanced processing algorithms to filter out noise and to compensate environmental parameters such as temperature, humidity, and power supply variation.
www.st
Resistor-capacitor (RC) acquisition principle STM8-TOUCH-LIB
2/9Doc ID 17896 Rev 1
1 Resistor-capacitor (RC) acquisition principle
The RC acquisition principle consists in measuring the charge and discharge time duration of a RC cell made of the electrode capacitance (C X ) and a load resistor (R L ).
The RC acquisition is supported by all STM8S and STM8L microcontrollers and requires a direct connection of the device to earth to operate properly. The main features are the following:
●Up to 24 touchkeys distributed over 3 GPIO ports
●Up to 2 wheels or sliders with 2 different hardware implementations (5 or 8 capacitive sensing channels)
环丙沙星栓Capacitive sensing channels are acquired sequentially
2 Charge transfer (CT) acquisition principle
The charge transfer acquisition consists in charging the electrode capacitance (C X ) and transferrin
g part of the accumulated charge into a sampling capacitor (C S ). This sequence is repeated until the voltage across C S  reaches a given threshold. The number of transfers required to reach the threshold depends on the size of the electrode capacitance. This acquisition principle provides a better sensitivity and robustness than RC acquisition.It requires a dedicated hardware composed of analog switches and STM8L MCU. The charge transfer acquisition is only supported by STM8L101x and STM8L15x devices since it requires a dedicated hardware composed of analog switches used to interconnect several GPIOs which is only available on these products.The main features are the following:
Number touchkeys supported –Up to 6 touchkeys on STM8L101x MCUs –
Up to 16 touchkeys on STM8L15x MCUs
镀镍设备
●Up to 2 wheels or sliders with a single hardware implementation (3 capacitive sensing channels)
Number of capacitive sensing channels acquired simultaneously –Up to 2 channels on STM8L101x
MCUs –
Up to 8 channels on STM8L15x MCUs
STM8-TOUCH-LIB Library architecture
Doc ID 17896 Rev 13/9
3 Library architecture
Figure 1 shows the STM8-TOUCH-LIB firmware layers.
MCU resources STM8-TOUCH-LIB
4/9Doc ID 17896 Rev 1
4 MCU resources
Table 1 shows the STM8 peripherals that are used by the STM8-TOUCH-LIB. Care must be
精加力taken when using them to avoid any misbehavior.
4.1 Number of charge transfer capacitive sensing channels
Table 2 and Table 3 provide the maximum number of charge-transfer capacitive sensing channels for the STM8L101x and STM8L15x package, respectively.
Table 1.
List of STM8 peripherals used by the STM8-TOUCH-LIB
Peripheral
Function
Acquisition principle
GPIOs
I/O control
RC, CT 16-bit timer with 8-bit prescaler (TIM2 or TIM3)V IH /V IL  measurement
RC 8-bit timer (TIM4)Generic timebase for the state machine RC, CT Comparator (COMP)Charge transfer
CT Routing interface (RI)
I/O control and charge transfer
CT
Table 2.
STM8L101x resources used for CT acquisition
A c q u i s i t i o n  g r o u p
I /O  p o r t
TSSOP20 / UFQFPN20
WFQFPN28VFQFPN32 / LQFP32
T S S O P  p i n
U F Q F P N  p i n
N u m b e r  o f  a v a i l a b l e  p i n s
U s a g e
P i n
N u m b e r  o f  a v a i l a b l e  p i n s
U s a g e
P i n
N u m b e r  o f  a v a i l a b l e  p i n s U s a g e Group 1
PB0
1073
青岛开发区人事局2
channels with one sampling capacitor 124
3
channels with one sampling capacitor 134  3 channels with one sampling capacitor PB11181314PD09689PD1--910Group 2
PB2
1292  1 channel
with one sampling capacitor
144
3 channels with one sampling capacitor
154
3 channels with one sampling capacitor假如古代也有手机
PB313101516PD2--1011PD3
-
-11
12
Maximum number of channels
3
with 2 sampling capacitors
6
with 2 sampling capacitors
6
with 2 sampling capacitors
STM8-TOUCH-LIB MCU resources
Doc ID 17896 Rev 15/9
Table 3.
STM8L15x resources used for CT acquisition
A c q u i s i t i o n  g r o u p
I /O  p o r t
STM8L151 (no LCD)
STM8L152 (with LCD)
WFQFPN28
WFQFPN32 / LQFP32
VFQFPN48 / LQFP48
WFQFPN32 / LQFP32
VFQFPN48 / LQFP48
P i n
Number of available pins
Usage
P i n
Number of available pins
Usage
P i n
Number of available pins
Usage
P i n
Number of available pins
Usage
P i n
Number of available pins
Usage
Group 1
PA6
-2
1 channel with 1 sampling capacitor
63  2
channels
with 1
sampling capacitor 73
2
channels
with 1
sampling capacitor 63
2 channels with 1 sampling capacitor
73  2 channels with 1 sampling capacitor PA555656PA444
545
Group 2
PC7
-2  1 channel
with 1 sampling capacitor -2  1 channel
with 1 sampling capacitor 46
3  2
channels with 1
sampling capacitor -2
1 channel
with 1 sampling capacitor 46
3
2 channels with 1 sampling capacitor
PC42529
43
2
943
PC32428
42
2
8
42Group
3
PC2
231cannot be used
for
touch sensing
27
3
2 channels with 1 sampling capacitor
41
3
2 channels
with 1
sampling capacitor 27
3  2 channels with 1 sampling capacitor
41
3
2 channels with 1 sampling capacitor
PD7-24362
4
36PD6-23
35
2
3
35Group
4
PD5
-2  1 channel
with 1 sampling capacitor
22
3
2 channels with 1 sampling capacitor
34
3
2 channels
with 1
sampling capacitor 22
3  2 channels with 1 sampling capacitor
34
3
2 channels with 1 sampling capacitor
PD42021332
1
33PB71920
31
2
31Group
5
PB6
183  2 channels with 1 sampling capacitor
19
3
2 channels with 1 sampling capacitor
30
3
2 channels
with 1
sampling capacitor 19
3
2 channels with 1 sampling capacitor
30
3
2 channels with 1 sampling capacitor
PB51718291
8
29PB41617
28
1
7
28Group
6
PB3
日落公园153  2 channels with 1 sampling capacitor
16
3
2 channels with 1 sampling capacitor
27
3
2 channels
with 1
sampling capacitor 16
3  2 channels with 1 sampling capacitor
27
3
2 channels with 1 sampling capacitor
PB21415261
5
26PB11314
25
1
4
25Group
7
PB0
123  2 channels with 1 sampling capacitor
13
3
2 channels with 1 sampling capacitor
24
3
2 channels
with 1
sampling capacitor 13
3
2 channels with 1 sampling capacitor
24
3
2 channels with 1 sampling capacitor
PD31112231
2
23PD2101122
1
122Group
8
PD1
92  1 channel with 1
sampling capacitor 102
1 channel with 1
sampling capacitor 213  2
channels with 1
sampling capacitor 101cannot be used for
touch
sensing 213
2 channels with 1 sampling capacitor
PD089
20
-20
PE5
--
19
-
19
Maximum
number of channels
10 channels with 7 sampling capacitors 14 channels with 8 sampling capacitors 16 channels with 8 sampling capacitors 13 channels with 7 sampling capacitors 16 channels with 8 sampling capacitors

本文发布于:2024-09-21 04:27:16,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/323155.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:青岛   镀镍   日落   开发区   设备   公园   人事局
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议