Atmel QTouch Library User Guide
Atmel QTouch Library User Guide Atmel QTouch Library User Guide
Figure 46 GNU Example project usage with AVR32 StudioThe IAR Example Projects can be used with IAR Embedded Workbench for AVR32 v3.3. The IARExample project gives a Compilation error when building with IAR Embedded Workbench forAVR32 v3.3. The fix for this Compilation error is available in the ‘IAR_Build_Error_Fix.txt’provided in each of the IAR Example project.Figure 47 IAR Example project usage with IAR Embedded Workbench forAVR32QMatrix Example ProjectThe QMatrix method GNU and IAR Example projects can be found in the following path.\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_gnu_qm_ek_example and\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_iar_qm_ek_exampleThe QMatrix Example projects demonstrate the QMatrix operation on the UC3L Evaluation Kit(Rev 2). QMatrix SMP discharge mode hardware arrangement is used for the UC3L EvaluationKit with 6 X Lines and 2 Y Lines. Using the 12 Touch Channels (6x2), 6 Touch Sensors areformed that include a Rotor (that uses six Touch Channels) and 5 keys (each using one Touchchannel).The Example projects demonstrate the QMatrix measured data and Touch Status usage usingthe LED Demo application. The onboard LED0, LED1, LED2 and LED3 are set when the TouchPosition of the Rotor position varies from 0 to 255. By Touching the up key (^), left key (/||) and right key (>), the LED0, LED1, LED2 and LED3 can be individuallycleared. When the down key (v) is touched, it clears all LEDs.QTouch Group A Example ProjectThe QTouch Group A method GNU and IAR Example projects can be found in the following path.\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_gnu_qt_grp_a_example and\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_iar_qt_grp_a_example1368207K-AT42-09/11
The QTouch Group A Example projects demonstrate the QTouch method API usage with aRotor, Slider and two keys Sensor configuration.Autonomous QTouch Example ProjectThe Autonomous QTouch Sensor GNU and IAR Example projects can be found in the followingpath.\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_gnu_autonomous_qt_example and\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_iar_autonomous_qt_exampleThe Autonomous QTouch Example projects demonstrate the Autonomous QTouch Sensor APIusage. The Example projects also demonstrate wake up from Sleep mode using theAsynchronous Timer peripheral event.Note 1: The Example Projects also support relaying the Touch Sensor debug information to the“QTouch Studio – Touch Analyzer” PC Software. The QTouch Studio can also be used forsetting the Sensor and Global configuration parameters of the QTouch Library at run-time.The QTouch Studio can be downloaded from the following path.http://www.atmel.com/products/touchsoftware/qtouchsuite.asp?family_id=702The QDebug two-way debug protocol used by the Example project to communicate (transmit orreceive touch debug data) with the QTouch Studio can be found in the following installation path.\Device_Specific_Libraries\32bit_AVR\UC3L\qdebug• For the UC3L Evaluation kit (uc3l_xx_qm_ek_example Example project) to connect withthe QTouch Studio using the USB interface, the UC3B MCU on the UC3L Evaluation kitmust be Flashed with ISP and Program binaries. The procedure to flash the binaries isavailable in the readme note in the following path.\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_gnu_qm_ek_example\ uc3b\readme.txt or\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_iar_qm_ek_example\ uc3b\readme.txt• For the case of QTouch Group A and Autonomous QTouch Example projects, the‘QT600-USB Bridge’ board can be use to capture the QDebug debug data in the QTouchStudio.Note 2: In order to flash the generated elf binary file for GNU and IAR, the following commandcan be used from the Command Line.avr32program --part UC3L064 program -finternal@0x80000000 -e --run -R -cintuc3l_gnu_qm_ek_example.elfCode and Data Memory requirements for UC3LQMatrix method memory requirementThe Table below captures the Typical Code & Data Memory requirement for the QTouch Librarywhen QMatrix method is used standalone.In addition to the Data memory captured in the Table, the QMatrix method requires additionalData Memory that must be provided to the Touch Library for storing the Signals, References,Sensor information and Touch status. This data memory is provided by the Host Application to137
- 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
- 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 138 and 139: the QTouch Library as QMatrix data
- Page 140 and 141: TOUCH_STATUS_CHANGE 0x0002u Status
- Page 142 and 143: sensor_type_tEnumerationUsesensor_t
- Page 144 and 145: OUT_OF_TOUCHIN_TOUCHCurrently the a
- Page 146 and 147: num_channel_signals uint8_t Length
- Page 148 and 149: touch_at_statusstructureInput / Out
- Page 150 and 151: UseData structure which holds the R
- Page 152 and 153: variable to the Touch library. The
- Page 154 and 155: structure.p_qta_config touch_qt_con
- Page 156 and 157: p_touch_sensor_param touch_qm_param
- Page 158 and 159: current_time_ms touch_time_t Curren
- Page 160 and 161: touch_ret_t touch_qt_sensor_config(
- Page 162 and 163: touch_qt_sensors_calibratetouch_ret
- Page 164 and 165: touch_qt_get_libinfotouch_ret_t tou
- Page 166 and 167: • This API updates the configurat
- Page 168 and 169: Rule Rule Description Advisory/Requ
- Page 170 and 171: VCCPA0No ConnectionPA1PA2ATtiny20PA
- Page 172 and 173: QTouch Library configuration parame
- Page 174 and 175: Recommended setting.Table 19 QTouch
- Page 176 and 177: Figure 51 Schematic overview of QTo
- Page 178 and 179: QTouch Library configuration parame
- Page 180 and 181: Devices supportedThe list of differ
- Page 182 and 183: • The channel number is derived f
- Page 184 and 185: MISRA Compliance ReportThis section
Figure 46 GNU Example project usage with AVR32 StudioThe IAR Example Projects can be used with IAR Embedded Workbench for AVR32 v3.3. The IARExample project gives a Compilation error when building with IAR Embedded Workbench forAVR32 v3.3. The fix for this Compilation error is available in the ‘IAR_Build_Error_Fix.txt’provided in each of the IAR Example project.Figure 47 IAR Example project usage with IAR Embedded Workbench forAVR32QMatrix Example ProjectThe QMatrix method GNU and IAR Example projects can be found in the following path.\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_gnu_qm_ek_example and\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_iar_qm_ek_exampleThe QMatrix Example projects demonstrate the QMatrix operation on the UC3L Evaluation Kit(Rev 2). QMatrix SMP discharge mode hardware arrangement is used for the UC3L EvaluationKit with 6 X Lines and 2 Y Lines. Using the 12 Touch Channels (6x2), 6 Touch Sensors areformed that include a Rotor (that uses six Touch Channels) and 5 keys (each using one Touchchannel).The Example projects demonstrate the QMatrix measured data and Touch Status usage usingthe LED Demo application. The onboard LED0, LED1, LED2 and LED3 are set when the TouchPosition of the Rotor position varies from 0 to 255. By Touching the up key (^), left key (/||) and right key (>), the LED0, LED1, LED2 and LED3 can be individuallycleared. When the down key (v) is touched, it clears all LEDs.<strong>QTouch</strong> Group A Example ProjectThe <strong>QTouch</strong> Group A method GNU and IAR Example projects can be found in the following path.\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_gnu_qt_grp_a_example and\Device_Specific_Libraries\32bit_AVR\UC3L\example_projects\uc3l_iar_qt_grp_a_example1368207K-AT42-09/11