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
Rev. 8207I-AT42-04/10
Table of Contents
Table of Contents...................................................................................
1
Preface ..............................................................................................
2
Introduction ......................................................................................
3
Overview ...........................................................................................
4
bbreviations and Definitions ........................................................
4.1 Definitions....................................................................................................................
.............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
QMatrix acquisition method...................................................................................
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 ..........
.4
5.3 Maximum ON Duration..........................................................................................
5.3
Positive / Negative Drift .........................................................................................
5.3
Positive Recalibration Delay..................................................................................
5.4
ensor specific settings ...................................................................................
.
5.4
Detect threshold ....................................................................................................
.4.2
Hysteresis .............................................................................................................
5
Position Resolution .............................................................................................
.4 ..
5.4
Position Hysteresis................................................................................................
.4.5
Adjacent Key Suppression (AKS)..........................................................................
5.5
sing the Sensors.............................................................................................
5.5
Avoiding Cross-talk ...............................................................................................
5.5.2
Multiple measurements .........................................................................................
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 ..
5.6.3.1
Typedefs........................................................................................... ..
5.6
.3.2 Enumerations .................................................................................... ..
5.6.3.2.1
sensor_type_t .............................................................................. ..
5.6.3.2.2
aks_group_t................................................................................. ..
2
8207J-AT42-05/10
5
eneric QTouch Libraries ...............................................................
5.1
ntroduction........................................................................................................
5.2
cquisition Methods ..........................................................................................
5.2
QTouch acquisition method...................................................................................
5.2.1.1
Sensor schematics for a QTouch acquisition method design ................
.2
5.6.4.3
qt_touch_lib_measure_data_t.......................................................... ..
....
....
....
...
....
....
....
....
....
....
....
....
....
....
....
....
....
....
.............. 24
.............. 24
.............. 25
.............. 25
.................26
.............. 26
.............. 27
.............. 27
.............. 28
.............. 28
.............. 29
.............. 29
.............. 30
.............. 30
.............. 30
5.6.4.4
qt_burst_lengths............................................................................... ..
5.6.4.5
tag_sensor_t..................................................................................... ..
5 .4.6
qt_lib_siginfo_t .................................................................................. ..
.6
5.6.5
Public Functions..............................................................................................
..
5.6.5.1
qt_set_parameters ........................................................................... ..
5.6.5.2
qt_enable_key .................................................................................. ..
5.6.5.3
qt_enable_rotor ................................................................................ ..
5.6.5.4
qt_enable_slider ............................................................................... ..
5.6.5.5
qt_init_sensing ................................................................................. ..
5.6.5.6
qt_measure_sensors........................................................................ ..
5.6.5.7
qt_calibrate_sensing ........................................................................ ..
5.6.5.
qt_reset_sensing ..............................................................................
8 ..
5.6.5.9
qt_get_sensor_delta......................................................................... ..
5.6.5.10
qt_get_library_sig ......................................................................... ..
.6.6
Sequence of Operations and Using the API.................................................... ..
5.6.6.1
Channel Numbering ......................................................................... ..
5.6.6.1.1
Channel numbering when using QTouch acquisition method..... ..
5.6.6.1.2
Channel numbering when routing SNS and SNSK pins to different ports
5.6.6.1.3
Channel numbering when routing SNS and SNSK pins to the sa
e
5.6.6.2
Channel numbering when using QMatrix acquisition method..........
..
5.6
5
.................31
.............. 31
.............. 31
...... 33
port ...... 34
.............. 35
.............. 37
.............. 38
.............. 40
.............. 41
.6.3 Sensor Numbering ............................................................................ ..
5.6.6.4
Filtering Signal Measurements......................................................... ..
5.6.6.5
Allocating unused Port Pins for User Application............................. ..
5.6.6.6
Disabling and Enabling of Pull-up for AVR devices ......................... ..
5.6
Constraints ....................................................................................................... ..
5 .7.1
QTouch acquisition method constraints ............................................ ..
5.6.7.2
QMatrix acquisition method constraints ............................................ ..
5.6.7
Design Guidelines for QMatrix acquisition method systems............
m
....
...
....
....
....
...
...
...
....
....
....
....
....
n
....
....
ra
n
....
....
ra
....
....
....
....
....
....
....
....
.................41
.7
.6
.............. 41
.............. 41
3
..
.............. 42
.................43
5
.6.8 Frequency of operation (Vs) Charge cycle/dwell cycle times: ......................... ..
.6.9
Interrupts ......................................................................................................... ..
.6.10
Integrating QTouch libraries in your application .............................................. ..
5.6.10.1
Directory structure of the library files ............................................ ..
5.6.10.2
Integrating QTouch acquisition method libraries in your applicatio ..
5.6.10.2.1
Example for 8bit AVR ................................................................ ..
5.6.10.2.2
Example for ATSAM ..................................................................
..
5.6.10.2.3
Checklist of items for integrating QTouch acquisition method lib
r
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.6.10.3 Integrating QMatrix acquisition method libraries in your applicatio ..
5.6.10.3.1
Example ..................................................................................... ..
5.6.10.3.2
Resources used by QMatrix acquisition method libraries ......... ..
5.6.10.3.3
Checklist of items for integrating QMatrix Capacitive sensing lib r
5.6.10.4
Common checklist items............................................................... ..
5.6.10.4.1
Configuring the stack size for the application ............................ ..
.6.11
Example project files .......................................................................................
5.6.11.1
Using the Sample projects............................................................ ..
5.6.11.2
Example applications for QTouch acquisition method libraries.... ..
5.6.11.2.1
Selecting the right configuration ................................................ ..
5.6.11.2.2
Changing the settings to match your device.............................. ..
5.6.11.2.3
Changing the library configuration parameters.......................... ..
5
..
3
.
5.6.11.6.1
Debug Support in the sample applications for EVK2080 and Q 0
5.6.11.6.2
How to turn on the debug option................................................ ..
5.6.11.6.3
Debug Interface if USB Bridge board is not available ............... ..
.............. 66
0 boards 66
.............. 66
.............. 67
.............. 67
.................67
.............. 67
.............. 68
.............. 68
.............. 68
rkbench 69
................... 69
urations .................. 70
S/SNSK
....
T6
....
....
....
....
....
....
....
....
W
5
.7 Library Variants ........................................................................................... ..
5.7.1
QTouch Acquisition method library variants .................................................... ..
5.7.1.1
Introduction....................................................................................... ..
5.7.1.2
Support for different compiler tool chains......................................... ..
5.7.1.3
QTouch Acquisition method library naming conventions ................. ..
5.7.1.3.1
Naming convention for libraries to be used with GCC tool chain ..
5.7.1.3.2
Naming convention for libraries to be used with IAR Embedded o
5.7.1.4
QTouch acquisition method library variants ......................................
5.7.1.5
Port combinations supported for SNS and SNSK pin config
5.7.1.5.1
Tips on pin assignments for the sensor design using one pair of N
ports 70
5.7 .5.2
Port combinations supported for two port pair SNS and SNSK pin
onfigurations ............................................................................................... ..
5.7.1.6
Sample applications and Memory requirements for QTouch acquis n
libra ies 72
5.7.2
QMatrix acquisition method library variants.....................................................
..
5.7.2.1
Introduction....................................................................................... ..
.. ..
S
.1
c
...
itio
..............71
method
r
.................72
.............. 72
.............. 72
72
75
.............. 75
5.7.2.2
Support for different compiler tool chains.......................................
5.7.2.3
Matrix Acquisition method library naming conventions .....................................
5.7.2.4
QMatrix acquisition method library variants .........................................................
5.7.2.4.1
Devices supported for QMatrix Acquisition .................................
..
.7.2.4.2
Device configurations supported by the QMatrix acquisition meth
d
....
....
....
Q
5
....
o
library
ariants 75
.8
MISRA Compliance Report .........................................................................
..
5.8.1
What is covered .............................................................................................. ..
.8.2
Target Environment......................................................................................... ..
.8.3
Deviations from MISRA C Standards .............................................................. ..
5.8.3.1
QTouch acquisition method libraries....................................................................
5.8.3.2
QMatrix acquisition method libraries ................................................ ..
5.
Known Issues .............................................................................................. ..
5.10
Checklist......................................................................................................................
Device Specific Libraries............................................................. ..
.1
Introduction.................................................................................................. ..
.2 Devices supported ...................................................................................... ..
v
5
....
....
....
....
.............. 76
.................77
5
.................77
5
.................77
77
.............. 78
....
9
....
.............. 78
.... 79
6
..
....
...........80
6
.............. 80
6.3
Touch Library for AT32UC3L devices ....................................................... ..
6.3
Salient Features of QTouch Library for UC3L ..................................................
.............. 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
....
.1 ..
6.3.1.1
QMatrix method sensor ....................................................................
..
...
...
....
....
...
....
6.3.1.2
QTouch method sensor........................... ........................................ ..
6.3
.1.3
Autonomous QTouch sensor ............................................................ ..
6.3.1.4
Additional Features .......................................................................... ..
Device variants supported for UC3L ......................................................................................
.
Library ...............
4
8207J-AT42-05/10
5.6.11.6
Debug Support in Example applications....................................... ..
6
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
..
3
Table 12 Sleep mode support for Autonomous QTouch ............................
..
6.3.9.4
Autonomous QTouch Sensor API Flow for UC3L.......................... ..
F
igure 34 Autonomous QTouch API Flow diagram ................................... ..
5
6.3.9.
Autonomous QTouch method Enable and Disable Sensor for UC3 ..
.3.10
Raw acquisition mode support for UC3L ....................................................... ..
Figure 35 Raw acquisition mode API Flow diagram ................................. ..
6.3.11
Library Configuration parameters for UC3L...................................................
..
Table 13 QTouch Library for UC3L Configuration parameters .................
..
6.3.12
Example projects for QTouch Library for UC3L.............................................
..
6.3.12.1
Example Project usage............................................................... ..
Figure 36 GNU Example project usage with AVR32 Studio ..................... ..
Figure 37 IAR Example project usage with IAR Embedded Workbench fo V
5
.3.6
API State machine for UC3L ........................................................................... ..
igure 26 State Diagram of QTouch Library for UC3L ................................ ..
6.3.7
QMatrix method sensor operation for UC3L.................................................... ..
6.3.7.1
QMatrix method pin selection for UC3L ...........................................
..
Table 10 QMatrix Resistive drive pin option ...............................................
..
6.3.7.2
QMatrix method Schematic for UC3L .............................................. ..
6.3.7.2.1
Internal Discharge mode ............................................................. ..
6.3.7.2.2
External Discharge mode ............................................................ ..
6.3.7.2.3
SMP Discharge Mode ................................................................. ..
6.3.7.2.4
VDIVEN Voltage Divider Enable option ...................................... ..
6.3.7.2.5
SYNC pin option .......................................................................... ..
Figure 27 QMatrix method schematic .........................................................
..
6.3.7.3
QMatrix method hardware resource requirement for UC3L.............
..
6.3.7.4
QMatrix method Channel and Sensor numbering for UC3L ............ ..
Figure 28 QMatrix channel numbering for UC3L ........................................ ..
.6 .7.5
QMatrix method API Flow for UC3L.................................................. ..
Figure 29 QMatrix API Flow diagram for UC3L .......................................... ..
6.3.7.6
QMatrix method Disable and Re-enable Sensor for UC3L .............. ..
6.3.8
QTouch Group A/B method sensor operation for UC3L .................................. ..
6.3.8.1
QTouch Group A/B method pin selection for UC3L ......................... ..
Table 11 QTouch Resistive drive pin option ............................................... ..
6.3.8.2
QTouch Group A/B method Schematic for UC3L ............................ ..
6.3.8.2.1
Resistive Drive option.................................................................. ..
6.3.8.2.2
SYNC pin option .......................................................................... ..
Figure 30 QTouch Group A/B and Autonomous QTouch schematic arrang
6.3.8.3
QTouch Group A/B method hardware resource requirement for UC3L...............
6.3.8.4
QTouch Group A/B method Channel and Sensor numbering for UC3L
Figure 31 QTouch method Channel/Sensor numbering ............................. ..
Figure 32 QTouch method Channel/Sensor numbering when Group A and
together ....................................................................................................... ..
6.3.8.5
QTouch Group A/B method API Flow for UC3L............................... ..
Figure 33 QTouch method API Flow diagram............................................. ..
6.3.8.6
QTouch Group A/B method Disable and Re-enable Sensor for UC3 ..
6.3.9
Autonomous QTouch sensor operation for UC3L ........................................... ..
6.3.9.1
Autonomous QTouch Sensor pin selection for UC3L ...................... ..
6
.3.9.2
Autonomous QTouch sensor Schematic for UC3L ..........................
6.3.9.3
Autonomous QTouch method hardware resource requirement for U
Plik z chomika:
roman61
Inne pliki z tego folderu:
AVRQTouchStudioSetup_VSS_dotNET.exe
(384787 KB)
Touch Sensors Design Guide.pdf
(1215 KB)
ReleaseNotes_QTouch_Studio.pdf
(40 KB)
ReleaseNotes_QTouch_Library_4.2.txt
(14 KB)
QTouch_Library_Selection_Guide.xls
(515 KB)
Inne foldery tego chomika:
• Katalog półprzewodników VRT DVD2009 +crack
• Katalogi - Układy scalone
• Katalogi - Układy scalone(1)
• Katalogi - Wielka baza układów scalonych
• Katalogi - Wielka baza układów scalonych(1)
Zgłoś jeśli
naruszono regulamin