Channel 47 N/A N/A N/A N/A N/A X7Y5 X7Y5Channel 48 N/A N/A N/A N/A N/A X0Y6 X0Y6Channel 49 N/A N/A N/A N/A N/A X1Y6 X1Y6Channel 50 N/A N/A N/A N/A N/A X2Y6 X2Y6Channel 51 N/A N/A N/A N/A N/A X3Y6 X3Y6Channel 52 N/A N/A N/A N/A N/A X4Y6 X4Y6Channel 53 N/A N/A N/A N/A N/A X5Y6 X5Y6Channel 54 N/A N/A N/A N/A N/A X6Y6 X6Y6Channel 55 N/A N/A N/A N/A N/A X7Y6 X7Y6Channel 56 N/A N/A N/A N/A N/A N/A X0Y7Channel 57 N/A N/A N/A N/A N/A N/A X1Y7Channel 58 N/A N/A N/A N/A N/A N/A X2Y7Channel 59 N/A N/A N/A N/A N/A N/A X3Y7Channel 60 N/A N/A N/A N/A N/A N/A X4Y7Channel 61 N/A N/A N/A N/A N/A N/A X5Y7Channel 62 N/A N/A N/A N/A N/A N/A X6Y7Channel 63 N/A N/A N/A N/A N/A N/A X7Y7Sensor NumberingThe ordering and numbering of sensors is related to the order in which the sensors are enabled.This is independent of the acquisition method (QMatrix or <strong>QTouch</strong> acquisition method libraries).For example, consider this code snippet:…./* enable slider */qt_enable_slider (CHANNEL_0, CHANNEL_2, AKS_GROUP_1, 16,HYST_6_25, RES_8_BIT, 0);/* enable rotor */qt_enable_rotor (CHANNEL_3, CHANNEL_5, AKS_GROUP_1, 16, HYST_6_25,RES_8_BIT, 0);/* enable keys */qt_enable_key (CHANNEL_6, AKS_GROUP_2, 10, HYST_6_25);qt_enable_key (CHANNEL_7, AKS_GROUP_2, 10, HYST_6_25);In the case above, the slider on channels 0 to 2 will be sensor 0, the rotor on channels 3-to-5 issensor 1 and the keys on channels 6 and 7 are sensor numbers 3 and 4 respectively.When the touch status is reported or queried, the corresponding sensor positions and statusindicate the touch status. For example, the slider is in detect if “qt_measure_data.qt_touch_status.sensor_states” bit position 0 is set. Similarly, the rotor on channels 3 to 5 issensor 1, and the keys on channels 6 and 7 are sensors 2 and 3 respectively.However, the code could be re-arranged as follows to give a different sensor numbering./* enable rotor */qt_enable_rotor (CHANNEL_3, CHANNEL_5, NO_AKS_GROUP, 16,HYST_6_25, RES_8_BIT, 0);/* enable keys */qt_enable_key (CHANNEL_6, AKS_GROUP_2, 10, HYST_6_25);qt_enable_key (CHANNEL_7, AKS_GROUP_2, 10, HYST_6_25);/* enable slider */428207K-AT42-09/11
qt_enable_slider (CHANNEL_0, CHANNEL_2, NO_AKS_GROUP, 16,HYST_6_25, RES_8_BIT, 0);Now, the rotor is sensor 0, the keys are sensors 1 and 2, and the slider is sensor 3.So, the order in which the user enables the sensors is the order in which the sensors arenumbered. Depending on the user requirements, the sensors can be configured in the preferredorder.NOTE: In case of QMatrix, the channels on the Unused X lines (or) unused Y lines should beignored and not to be used as arguments in this API.Ex: If the host application needs only 24 channels , there are two possible options.1. In 32 (8x4 configuration), if X6 and X7 are unused, channel6, channel7,channel14, channel15, channel 22, channel23, channel30, channel 31cannot be used2. In 32 (8x4 configuration), if Y3 is unused, channe24, channel25,channel26, channel27, channel 28, channel29, channel30, channel 31cannot be usedFiltering Signal MeasurementsThe ATMEL <strong>QTouch</strong> <strong>Library</strong> API provides a function pointer called “qt_filter_callback”. The usercan use this hook to apply filter functions to the measured signal values.If the pointer is non-NULL, the library calls the function after library has made capacitive channelmeasurements, but before the library has processed the channel information and determining thesensor states.43
- Page 1: Atmel QTouch LibraryUser GuideSuppo
- Page 4: 5.6.11.6.1 Debug Support in the sam
- Page 7 and 8: 6.3.16.21 touch_info_t ............
- Page 12 and 13: • ARM: refers to a device in the
- Page 14 and 15: Libraries for AVR microcontrollers
- Page 16 and 17: QMatrix charge transfer is labeled
- 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 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 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 136 and 137:
Figure 46 GNU Example project usage
- 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
- Page 186 and 187:
May 2010Ver 4.2July 2010Ver 4.3Jan