Atmel QTouch Library User Guide
Atmel QTouch Library User Guide Atmel QTouch Library User Guide
Note: When using the IAR IDE / compiler tool chain, the map file generated for the application willlist total CSTACK & RSTACK requirements. Please adjust the total CSTACK and RSTACKvalues in the IAR project options to be greater than the values listed in the map file. Refer tosection 5.6.11.4 which illustrates how to change the settings in IAR IDE.Table 5 : Stack requirements of the QTouch capacitive sensing libraries when using IAR IDEprojectsQTouch Acquisition method Libraries : Stack usage for IAR compiler tool chainConfiguration CSTACK size RSTACK sizeSingle port pair - only keys ( 4 / 8 channels ) 0x30 0x28Single port pair – keys/ rotors/ sliders (4/8 channel) 0x40 0x2CTwo port pairs - only keys keys (16 channel) 0x50 0x28Two port pairs – keys/ rotors/ sliders (16 channel) 0x60 0x2CTable 6 : Stack requirements of the QMatrix capacitive sensing libraries when using IAR IDEprojectsQMatrix Acquisition method Libraries : Stack usage for IAR compiler tool chainNumber ofchannelsConfiguration CSTACK size RSTACK size4 ONLY KEYS 0x20 0x204 KEYS/ROTOR/SLIDER 0x30 0x208 ONLY KEYS 0x25 0x208 KEYS/ROTOR/SLIDER 0x35 0x2016 ONLY KEYS 0x30 0x2016 KEYS/ROTOR/SLIDER 0x40 0x2032 ONLY KEYS 0x35 0x2532 KEYS/ROTOR/SLIDER 0x45 0x2556 ONLY KEYS 0x45 0x2556 KEYS/ROTOR/SLIDER 0x55 0x2564 ONLY KEYS 0x45 0x2564 KEYS/ROTOR/SLIDER 0x55 0x25Example project filesThe QTouch library is shipped with various example projects to illustrate the usage of the touchAPI’s to add touch sensing to an application across various devices688207K-AT42-09/11
Sample applications are also provided for the following kits1 TS2080A, QT600_ATtiny88_QT8, QT600_ATxmega128a1_QT16 : QTouch Technologyevaluation Kits2 TS2080B, QT600_ATmega324_QM64 : QMatrix Technology evaluation KitsNote: Example projects must be built in the installed folder, and if moved/copied elsewhere thenpaths must be edited appropriately.Using the Sample projectsThe sample applications are shipped with the complete set of files required to configure, build anddownload the application for both IAR-workbench and AVR Studio IDE.Since more than one device may use the same library (applicable for QTouch acquisition methodlibraries), example project files and applications have been provided only for select devices whichuse these libraries.Example applications for QTouch acquisition method librariesSelecting the right configurationEach example project for a device can support multiple configurations (i.e a. keys only, b. withrotors and sliders c.16 channel etc…). The configuration sets determine the configuration optionsfor using the library and also the right library variant to link with the project.The configuration sets for IAR IDE are named according to the convention listed belowConfiguration set for IAR IDENaming convention : g_qt_k_rsField ValuesCommentsNamevP v1, v3, xmega, uc3a, VersionP of the core AVR device supported by this library variantuc3b, uc3cQ 1 to 6 GroupQ of the core AVR device supported by this library variantCH 4, 8, 12, 16, 32 Total number of channels supported by each library.RS 1, 2, 3, 4, 8 Total number of rotors / sliders supported for the respective channelcounts mentioned in previous row.The configuration sets for AVR Studio IDE are named according to the convention listed belowConfiguration set for AVR Studio IDEg_qt_k_rsField ValuesCommentsNameavrP avr25, avr4, avr 51, avr5, VersionP of the core AVR device supported by this libraryxmega, uc3a, uc3b, uc3c variantQ 1 to 6 GroupQ of the core AVR device supported by this libraryvariantCH 4, 8, 12, 16, 32 Total number of channels supported by each library.RS 1, 2, 3, 4, 8 Total number of rotors / sliders supported for the respectivechannel counts mentioned in previous row.Depending on your need, you need to select the right configuration required and build the project.69
- Page 18 and 19: Maximum ON DurationIf an object uni
- Page 20 and 21: Setting Variable name Data Type Uni
- Page 22 and 23: Guard ChannelGuard channel in Qtouc
- Page 24 and 25: 7 AKS groups are supported by the l
- Page 26 and 27: Data structuresThis section lists t
- Page 28 and 29: The signal gain for each sensor is
- Page 30 and 31: • This function can be called any
- Page 32 and 33: unit16_t qt_measure_sensors( uint16
- Page 34 and 35: Channel NumberingChannel numbering
- Page 36 and 37: qt_reset_sensing()qt_enable_xxx()qt
- Page 38 and 39: Port AAll SNSK pinsterminatedon thi
- Page 40 and 41: Example:Pins A0 ,A3 and A5 of PORT
- Page 42 and 43: Channel 47 N/A N/A N/A N/A N/A X7Y5
- Page 44 and 45: channel 0channel 1channel 2channel
- Page 46 and 47: Disabling and Enabling of Pull-up f
- Page 48 and 49: ‣ Recommended threshold should be
- Page 50 and 51: QMatrix acquisitionmethod libraries
- Page 52 and 53: definition is not required.QT_NUM_C
- Page 54 and 55: SNS1 and SNSK1 pins usethe same por
- Page 56 and 57: • It is recommended to disable PU
- Page 58 and 59: Table 4 :List of configurable param
- Page 60 and 61: Number ofchannels requiredfor the a
- Page 62 and 63: 2. The above definitions should be
- Page 64 and 65: NUM_Y_LINES_ROTOR_SLIDER_QT_MAX_NUM
- Page 66 and 67: has Four Comparators (AC0A , AC1A ,
- Page 70 and 71: Figure 5-11: Selecting the right co
- Page 72 and 73: SNS1 - SNSK1 & SNS2 -SNSK2QT_NUM_CH
- Page 74 and 75: Selecting the right configurationTh
- Page 76 and 77: Figure 5-20 : Specifying QMatrix ac
- Page 78 and 79: Debug Support in Example applicatio
- Page 80 and 81: Support for different compiler tool
- Page 82 and 83: Maximum number of rotor / sliders s
- Page 84 and 85: Tips on pin assignments for the sen
- Page 86 and 87: ATtiny88)v1g1s2(ATtiny461,ATmega16a
- Page 88 and 89: X0,X1,X2,X3 are on PB0,PB1,PB2,PB3N
- Page 90 and 91: 1. The channel numbers are allocate
- Page 92 and 93: SNSK_array[1][1]=0x00; (SNSK odd ma
- Page 94 and 95: SNSK_array[1][0]=0x14; (SNSK even m
- Page 96 and 97: Figure 5-28: New Design Sensors in
- Page 98 and 99: Figure 5-31: Selecting the MCU for
- Page 100 and 101: Figure 5-34: Selecting the SNS and
- Page 102 and 103: 2. QTOUCH_STUDIO_MASKS needs to be
- Page 104 and 105: Figure 5-38: Selecting New Design3.
- Page 106 and 107: Figure 5-42: Start window of the co
- Page 108 and 109: Figure 5-45: Selecting the X,YA,YB,
- Page 110 and 111: The code can be copied using the
- Page 112 and 113: ApplicablereleaseQTouch libraries v
- Page 114 and 115: Device Specific LibrariesIntroducti
- Page 116 and 117: Table 8 Compiler tool chains suppor
Sample applications are also provided for the following kits1 TS2080A, QT600_ATtiny88_QT8, QT600_ATxmega128a1_QT16 : <strong>QTouch</strong> Technologyevaluation Kits2 TS2080B, QT600_ATmega324_QM64 : QMatrix Technology evaluation KitsNote: Example projects must be built in the installed folder, and if moved/copied elsewhere thenpaths must be edited appropriately.Using the Sample projectsThe sample applications are shipped with the complete set of files required to configure, build anddownload the application for both IAR-workbench and AVR Studio IDE.Since more than one device may use the same library (applicable for <strong>QTouch</strong> acquisition methodlibraries), example project files and applications have been provided only for select devices whichuse these libraries.Example applications for <strong>QTouch</strong> acquisition method librariesSelecting the right configurationEach example project for a device can support multiple configurations (i.e a. keys only, b. withrotors and sliders c.16 channel etc…). The configuration sets determine the configuration optionsfor using the library and also the right library variant to link with the project.The configuration sets for IAR IDE are named according to the convention listed belowConfiguration set for IAR IDENaming convention : g_qt_k_rsField ValuesCommentsNamevP v1, v3, xmega, uc3a, VersionP of the core AVR device supported by this library variantuc3b, uc3cQ 1 to 6 GroupQ of the core AVR device supported by this library variantCH 4, 8, 12, 16, 32 Total number of channels supported by each library.RS 1, 2, 3, 4, 8 Total number of rotors / sliders supported for the respective channelcounts mentioned in previous row.The configuration sets for AVR Studio IDE are named according to the convention listed belowConfiguration set for AVR Studio IDEg_qt_k_rsField ValuesCommentsNameavrP avr25, avr4, avr 51, avr5, VersionP of the core AVR device supported by this libraryxmega, uc3a, uc3b, uc3c variantQ 1 to 6 GroupQ of the core AVR device supported by this libraryvariantCH 4, 8, 12, 16, 32 Total number of channels supported by each library.RS 1, 2, 3, 4, 8 Total number of rotors / sliders supported for the respectivechannel counts mentioned in previous row.Depending on your need, you need to select the right configuration required and build the project.69