QTouch Library User Guide.pdf

(2171 KB) Pobierz
Atmel QTouch Library User Guide
Atmel QTouch Library
r Guide
Supports QTouch ® and QMatrix ® acquisition for Keys, Sliders
and Rotors
Rev. 8207J-AT42-05/10
Use
306568917.004.png 306568917.005.png
Rev. 8207I-AT42-04/10
.............2
.............7
.............9
.............9
A ...........10
.... 10
G ...........11
I .............. 11
A .............. 12
.1 . ................12
.............. 13
.................13
.3 . ................14
G .............. 14
.1 . ................15
.2 . ................15
5.3.3 . ......15
.................16
.5 . ................16
.6 . ................17
S . ............. 17
.1 . ................17
5 . ................17
.3 .................18
.4 . ................18
5 . ................19
U .............. 19
.1 . ................19
.................19
5.6 . ............. 20
5 . ................20
5 . ................20
5 . ................20
.............. 20
.............. 20
.............. 20
.............. 21
5.6.3.2.3 channel_t ......................................................................................................... 21
5.6.3.2.4 hysteresis_t ..................................................................................................... 21
5.6.3.2.5 resolution_t ...................................................................................................... 22
5.6.3.2.6 recal_threshold_t ............................................................................................. 22
5.6.4 Data structures.......................................................................................................................23
5.6.4.1 qt_touch_status_t ................................................................................................. 23
5.6.4.2 qt_touch_lib_config_data_t .................................................................................. 24
5.2 Sensor schematics for a QMatrix acquisition method design ................................
5.3
5.3 Recalibration Threshold ........................................................................................
5.3 Detect Integration ..................................................................................................
Drift Hold Time ................................................................................................................
lobal settings common to all sensors of a specific acquisition method ..........
5.3 Positive / Negative Drift .........................................................................................
5.3 Positive Recalibration Delay..................................................................................
5.4 Detect threshold ....................................................................................................
.4.2 Hysteresis .............................................................................................................
.4 ..
5.4 Position Hysteresis................................................................................................
.4.5 Adjacent Key Suppression (AKS)..........................................................................
5.5 Avoiding Cross-talk ...............................................................................................
QTouch API and Usage ....................................................................................
.6.1 QTouch Library API......................................................................................... ..
....
....
....
....
...
....
....
.6.2 touch_api.h - public header file ....................................................................... ..
.6.3 ype Definitions and enumerations used in the library...................................T ..
2
8207J-AT42-05/10
306568917.006.png
 
....
....
....
...
....
....
....
....
....
....
....
....
....
....
....
....
....
....
.............. 24
.............. 24
.............. 25
.............. 25
.................26
.............. 26
.............. 27
.............. 27
.............. 28
.............. 28
.............. 29
.............. 29
.............. 30
.............. 30
.............. 30
.6
5
.................31
.............. 31
.............. 31
...... 33
port ...... 34
.............. 35
.............. 37
.............. 38
.............. 40
.............. 41
m
....
...
....
....
....
...
...
...
....
....
....
....
....
n
....
....
ra
n
....
....
ra
....
....
....
....
....
....
....
....
.................41
.7
.6
.............. 41
.............. 41
3
..
.............. 42
.................43
5
.................44
5
.................44
.............. 44
.............. 45
.............. 47
.............. 48
ies......... 49
.............. 50
.............. 52
.............. 55
ies......... 55
.............. 56
.............. 56
.................57
.............. 57
.............. 57
.............. 57
.............. 59
.............. 60
5.6.11.2.4 Using the example projects ........................................................................... 61
5.6.11.3 Example applications for QMatrix acquisition method libraries ........................ 61
5.6.11.3.1 Selecting the right configuration .................................................................... 62
5.6.11.3.2 Changing the library configuration parameters.............................................. 63
5.6.11.3.3 Using the example projects ........................................................................... 64
5.6.11.4 Adjusting the Stack size when using IAR IDE .................................................. 64
5.6.11.5 Optimization levels............................................................................................ 65
5
..
3
.
306568917.001.png
 
.............. 66
0 boards 66
.............. 66
.............. 67
.............. 67
.................67
.............. 67
.............. 68
.............. 68
.............. 68
rkbench 69
................... 69
urations .................. 70
S/SNSK
....
T6
....
....
....
....
....
....
....
....
W
S
.1
c
...
itio
..............71
method
r
.................72
.............. 72
.............. 72
72
75
.............. 75
....
....
....
Q
5
....
o
library
v
5
....
....
....
....
.............. 76
.................77
5
.................77
5
.................77
77
.............. 78
....
9
....
.............. 78
.... 79
6
..
....
...........80
6
.............. 80
.............. 80
Q .............. 80
.................80
.............. 80
.............. 80
.............. 80
.............. 81
6.3.2 8 1
6.3.3 Compiler tool chain support for UC3L ....................................................................................81
Table 8 Compiler tool chains support for UC3L QTouch ..................... 81
6.3.4 Overview of QTouch Library API for UC3L.............................................................................82
Figure 25 Overview diagram of QTouch Library for UC3L ............................................. 82
6.3.5 Acquisition method support for UC3L.....................................................................................83
Table 9 Acquisition method specific API......................................................................... 83
....
...
...
....
....
...
....
.
Library ...............
4
8207J-AT42-05/10
6
306568917.002.png
 
6 . ................83
F .............. 84
.................84
.............. 84
.............. 85
.............. 85
.............. 85
.............. 86
.............. 86
.............. 86
.............. 86
.............. 88
.............. 88
.............. 88
.............. 88
.............. 89
.............. 90
.............. 91
.................91
.............. 91
.............. 92
.............. 92
.............. 92
.............. 92
ement ........ 93
93
.............. 94
.............. 94
are used
.............. 94
.............. 95
.............. 97
.............. 97
.................97
.............. 97
.............. 97
L ........... 97
.............. 98
.............. 98
.............. 98
.............. 99
6 . ................99
.............. 99
...............100
............ 101
...............101
............ 101
............ 101
R32 .... 102
6.3.12.2 QMatrix Example Project ................................................................................ 102
6.3.12.3 QTouch Group A Example Project ................................................................. 102
6.3.12.4 Autonomous QTouch Example Project .......................................................... 102
6.3.13 Code and Data Memory requirements for UC3L ..................................................................103
6.3.13.1 QMatrix method memory requirement............................................................ 103
Table 14 Typical Code and Data memory for Standalone QMatrix operation ............. 103
6.3.13.2 QTouch Group A/B method memory requirement.......................................... 104
....
...
....
....
....
....
....
....
....
....
....
....
....
....
....
...
....
....
....
....
....
....
....
....
....
B
....
....
....
L
....
....
....
C
....
......
.....
L..
......
......
......
......
......
......
......
r A
..
5
.3.6 API State machine for UC3L ........................................................................... ..
igure 26 State Diagram of QTouch Library for UC3L ................................ ..
6
306568917.003.png
 
Zgłoś jeśli naruszono regulamin