Tips on pin assignments for the sensor design usingtwo pairs of SNS / SNSK portsThis section lists tips on selecting the pin assignments when using a single port pair for the SNSand SNSK Pins.Design choice for the sensorSNSK1-SNS1 & SNSK2-SNS2 pinsare all on different ports, number ofchannels = 16(Use the 16channel library in thiscase. Ensure the port definitions forSNS1,SNSK1,SNS2,SNSK2 are all inplace)SNSK1-SNS1 are on same port &SNSK2-SNS2 pins are on same port,number of channels = 8(Use the 8channel library in this case.Ensure the port definitions forSNS1,SNSK1,SNS2,SNSK2 are all inplace)SNSK1-SNS1 are on different ports &SNSK2-SNS2 pins are on same port,number of channels = 12(Use the 12channel library in thiscase. Ensure the port definitions forSNS1,SNSK1,SNS2,SNSK2 are all inplace)SNSK1-SNS1 are on same port &SNSK2-SNS2 pins are on differentports, number of channels = 12(Use the 12channel library in thiscase. Ensure the port definitions forSNS1,SNSK1,SNS2,SNSK2 are all inplace)Example Port configuration with pin assignments• E. g. SNS1(D), SNSK1(B) & SNS2(C), SNSK2(A)• Recommended configuration: (PD0, PB0), (PD1, PB1),..(PD7,PB7), (PC0,PA0).. to (PC7, PA7). In this case channel 0 will beon (PD0, PB0) pins, channel 1 will be on (PD1, PB1) pins,channel 8 will be on (PC0, PA0), channel 9 will be on (PC1,PA1) and so on up to channel 15 will be on (PC7, PA7) pins.• However, the user can mount the sensors on pins as selectedas per the rules illustrated in section 5.8.1 and channelsshould be assigned as given in section 5.6.6.1.1.2• E.g. SNS1(K), SNSK1(K) & SNS2(H), SNSK2(H) on sameports,• Recommended configuration: In case Pin configurability is notused, (PK0, PK1), (PK2, PK3),..(PK6, PK7), (PH0,PH1).. to(PH6, PH7).In this case channel 0 will be on (PK0, PK1) pins,channel 1 will be on (PK2, PK3) pins, channel 4 will be on(PH0, PH1), channel 5 will be on (PH2, PH3) and so on up tochannel 7 will be on (PH6, PH7) pins. The even pins of the portare used as SNS pins and odd pins of the port are used asSNSK pins.• When pin configurability is used, sensors should be mountedon the pins as selected as per the rules illustrated in section5.8.1 and channels should be assigned as given in section5.6.6.1.1.2• E.g. SNS1(H), SNSK1(F) on different ports & SNS2(E),SNSK2(E) on same ports.• Recommended configuration : In case Pin configurability is notused, (PH0, PF0), (PH1, PF1),..(PH7, PF7), (PE0,PE1).. to(PE6, PE7). In this case channel 0 will be on (PH0, PF0) pins,channel 1 will be on (PH1, PF1) pins... channel 8 will be on(PE0,PE1), channel 9 will be on (PE2,PE3) and so on up tochannel 11 will be on (PH6, PH7) pins. The even pins of theport E are used as SNS pins and odd pins of the port E areused as SNSK pins.• When pin configurability is used, sensors should be mountedon the pins as selected as per rules illustrated in section 5.8.1and channels should be assigned as given in section5.6.6.1.1.2 and section 5.6.6.1.1.4• E.g. SNS1(G), SNSK1(G) on different ports & SNS2(B),SNSK2(D) on same ports• Recommended configuration: In case Pin configurability is notused, (PG0, PG1), (PG2, PG3),..(PG6, PG7), (PB0,PD0)... to(PB7, PD7). In this case channel 0 will be on (PG0, PG1) pins,channel 1 will be on (PG2, PG3) pins... channel 3 will be on(PG6, PG7), channel 4 will be on (PB0,PD0) and so on up tochannel 11 will be on (PB7, PD7) pins. The even pins of theport G are used as SNS pins and odd pins of the port G areused as SNSK pins848207K-AT42-09/11
• When pin configurability is used, sensors should be mountedon the pins as selected as per rules illustrated in section 5.8.1and channels should be assigned as given in section5.6.6.1.1.2 and section 5.6.6.1.1.4Sample applications and Memory requirements for <strong>QTouch</strong> acquisition method librariesRefer to the library selection guide for memory requirements for each of the libraries supported inthe release.QMatrix acquisition method library variantsIntroductionVariants of the ATMEL <strong>QTouch</strong> <strong>Library</strong> based on Matrix acquisition technology are available fora range of ATMEL Microcontrollers. Refer to the library selection guide (C:\ Program Files\<strong>Atmel</strong>\<strong>Atmel</strong>_<strong>QTouch</strong>_Libaries_4.x\<strong>Library</strong>_Selection_<strong>Guide</strong>.xls) for the list of devices currentlysupported for QMatrix.Support for different compiler tool chainsThe QMatrix acquisition method libraries are supported for the following compiler tool chains.ToolVersionIAR Compiler 5.51IAR Embedded Workbench 5.5.7.1355GCC – AVR Studio 4.18 build 692WinAVR 20100110IAR Compiler 32bit AVR 4.10GCC – AVR32 Studio 2.5.0GCC GNU Tool Chain 32bit AVR avr32-gnu-toolchain-2.4.2QMatrix Acquisition method library naming conventionsThe libraries are named according the naming convention listed belowTool ChainGCC Tool ChainIAR –EWARNaming conventionlib_qm_x_y__rs.alib_qm_x_y__rs.r90FieldnameDPossible valuesCommon for IAR & GCC:ATtiny167,ATmega128rfa1,ATmega8535Specific to IAR:v1g1s0 (ATtiny44,ATtiny84)v1g1s1 (ATtiny48,CommentsIndicates the device / core group name in short form.For XMEGA Devices, Core groups are taken whichfollowsAs below for both GCC and IARSupported XMEGA DevicesATxmega16A4,85
- 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 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 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