Atmel QTouch Library User Guide
Atmel QTouch Library User Guide Atmel QTouch Library User Guide
X0,X1,X2,X3 are on PB0,PB1,PB2,PB3NY 1,2,3,4,7,8 Indicates the number of Y-Lines that the library needsfor supporting the listed number of channelsCFGkkrsNY=7 support only for ATXmega DevicesNY=3 support only for 32Bit Devicesk – library variant supports only keyskrs – library variant supports keys, Rotors and SlidersNRS 0,1,2,3,4,8 Maximum number of rotor sliders that the librarysupports.NRS=3 support only for 32Bit DevicesThe table below provides a few examples of the naming convention.Example Library nameConfiguration supportedlibavr51g2_8qm_4x_2y_krs_2rs.a • Compiler tool chain : GCC• Device : ATMega164P• 8 Channels• 4 X lines• 2 Y lines• Supports Keys, Rotors and Sliders ( krs )• 2 Rotors and Sliderslibavr25g1s1_16qm_8x_2y_k_0rs.r90 • Compiler tool chain : IAR• Device : ATTiny88• 16 Channels• 8 X lines• 2 Y lines• Supports only keys ( k)• 0 Rotors and SlidersQMatrix acquisition method library variantsDevices supported for QMatrix AcquisitionRefer to the Library_selection_guide.xls for the list of devices supported for QMatrix for thisrelease.PIN Configuration for QTouch LibrariesPin Configuration for QTouch Acquisition MethodPin configurability for QTouch acquisition method is provided for 8Bit AVR’s. QTouchacquisition method libraries can be used to configure SNS and SNSK on any pins of theport. But few rules should be followed while assigning the SNS and SNSK on particularpins. These rules are internal to the library. But QTouch Studio –Pin Configuration Wizardcan be used to assign SNS and SNSK on the pins and rules are internally taken care in theQTouch Studio Pin Configuration Wizard.By default, for 4 and 8 channel QTouch acquisition libraries, the channel numbering followsthe pin number of the port.To use the pin configurability, enable the macro _STATIC_PORT_PIN_CONF_ in theproject options or define the macro in the touch_qt_config.h file.To use the pin configurability feature, the SNS_array and SNSK_array masks are exportedfor the user, which needs to be initialized. These SNS_array and SNSK_array masks can888207K-AT42-09/11
Note:be taken from the QTouch Studio Pin Configuration Wizard and can be copied atappropriate place in the main.c file as explained in the example projects provided.QTOUCH_STUDIO_MASKS macro is used for providing pin configurability feature forQTouch Acquisition method libraries.In case the macro QTOUCH_STUDIO_MASKS enabled in project space,SNS_array and SNSK_array takes values that are supplied by the user in main.c files.This will reduce the code memory foot print of the library.In case the macro QTOUCH_STUDIO_MASKS is not enabled in project space,SNS_array and SNSK_array are calculated internal to the library according to theconfigured sensors.1. Port pin configurability is enabled for the following configurations,4- channel intraport configuration8-channel intraport configuration12-channel configuration16- channel configuration2. In case, the user wants to use the pin configurability for the other supportedconfigurations, (4- channel interport and 8-channel interport), the user has to enable themacro _STATIC_PORT_PIN_CONF_ in his project space.Rules for configurable SNS-SNSK Mask GenerationXXXSNS1=PORTAPORT PAIR 1 Ch2 Ch1 Ch0SNSK1=PORTBX X XXXXSNS2=PORTCPORT PAIR 2 Ch5 Ch4 Ch3SNSK2=PORTDX X X89
- 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 68 and 69: Note: When using the IAR IDE / comp
- 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 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
- Page 118 and 119: maintains the States of QMatrix, QT
- Page 120 and 121: equired as shown in the case A of F
- Page 122 and 123: Figure 37 QMatrix method schematicQ
- Page 124 and 125: Figure 39 QMatrix API Flow diagram
- Page 126 and 127: CAT Module Pin NameCSA0CSB0CSA1CSB1
- Page 128 and 129: The QTouch method acquisition using
- Page 130 and 131: Host Application codeUsing the init
- Page 132 and 133: Frozen Stop Stop Run Run Run Run On
- Page 134 and 135: Figure 45 Raw acquisition mode API
- Page 136 and 137: Figure 46 GNU Example project usage
Note:be taken from the <strong>QTouch</strong> Studio Pin Configuration Wizard and can be copied atappropriate place in the main.c file as explained in the example projects provided.QTOUCH_STUDIO_MASKS macro is used for providing pin configurability feature for<strong>QTouch</strong> Acquisition method libraries.In case the macro QTOUCH_STUDIO_MASKS enabled in project space,SNS_array and SNSK_array takes values that are supplied by the user in main.c files.This will reduce the code memory foot print of the library.In case the macro QTOUCH_STUDIO_MASKS is not enabled in project space,SNS_array and SNSK_array are calculated internal to the library according to theconfigured sensors.1. Port pin configurability is enabled for the following configurations,4- channel intraport configuration8-channel intraport configuration12-channel configuration16- channel configuration2. In case, the user wants to use the pin configurability for the other supportedconfigurations, (4- channel interport and 8-channel interport), the user has to enable themacro _STATIC_PORT_PIN_CONF_ in his project space.Rules for configurable SNS-SNSK Mask GenerationXXXSNS1=PORTAPORT PAIR 1 Ch2 Ch1 Ch0SNSK1=PORTBX X XXXXSNS2=PORTCPORT PAIR 2 Ch5 Ch4 Ch3SNSK2=PORTDX X X89