Atmel QTouch Library User Guide
Atmel QTouch Library User Guide Atmel QTouch Library User Guide
Disabling and Enabling of Pull-up for AVR devicesThe Pull-up circuit available (in AVR devices) for each GPIO pin has to be disabled beforeQTouch acquisition is performed. For tinyAVR and megaAVR devices the Pull-up circuit for allGPIO port pins are enabled and disabled together. When user needs to configure the pins thatare not used by QTouch library for his application, he may enable the Pull-up circuit after QTouchmeasurements are performed and disable them before the touch acquisition starts once again (asshown in the code snippet below)./* Disable pull-ups for all pins */MCUCR |= (1u
o Event System Channel0 (EVSYS_CH0)• The sensor channel number and the relation with X and Y lines strictly follows from thetable provided in the section Table 1.• A rotor /slider sensor can be configured with 3 to 8 channels per rotor or slider dependingon the requirement of the application subject to the total number of channels available inthe library variant selected as listed below.Number of X x Y Maximum Channels per ROTOR_SLIDERchannels4 4 x 1 48 4 x 2 416 4 x 4 416 8 x 2 832 8 x 4 856 8 x 7 864 8 x 8 8• For example, 16 channel libraries with 4X and 4Y lines supports maximum of 4 channelsper Rotor/Slider. But, a 16 channel with 8X and 2Y lines supports maximum of 8channels per Rotor/Slider.• If the lines of the Drive and Receive electrode (X lines or the Y lines) share the samelines with the JTAG, JTAG needs to be disabled. Please check the data sheet to ensurethat there are no conflicts between the X/Y lines and JTAG lines used for the device.• YB line for a particular device cannot be changed and it has to be the configured to bethe ADC port of the selected device.• The AIN0 pin of the device needs to be connected to the GND.• In case of XMEGA devices, the reference pin for input to analog comparator is Pin7 ofPORTA with all the combinations of libraries supported. Hence, this needs to beconnected to GND• Proper grounding should be taken care when the controller board and touch sensingboard are different.• The channels used for an individual rotor or slider should all be on the same Y line.• The maximum number of Rotors / Sliders supported by the QMatrix acquisition methoddepends on the configuration. Refer to the Library_Selection_Guide.xls for details.• Vcc should be kept at 4.5V or lower for reliable operationDesign Guidelines for QMatrix acquisition method systemsAVR Microcontrollers can use a number of clock sources, ranging from high precision externalcrystals to less accurate resonators down to simple external RC circuits. Most AVR devices alsocome with integrated RC oscillators. This provides a system clock source without additional costor board space. When using internal RC oscillators some considerations need to be taken. Theaccuracy i.e. frequency of CMOS RC oscillators will vary slightly from device to device due toprocess variance.QMatrix acquisition method uses an internal timer to measure the discharge time of a capacitor,and any frequency variation or fluctuation in the RC Oscillator will thus show up as a variance inthe measurement data. The application should for this reason be designed and tuned to allow forsuch variance in the internal RC oscillator frequency. For most AVR microcontrollers, the ratedaccuracy of the internal RC oscillator is 2%, and to have some headroom and guarantee a robustand stable system, the designer should aim to follow these design rules:‣ Reference Value should be in the 150-300 range‣ Typical delta when touched should be at least 10% of the Reference Value47
- 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 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
Disabling and Enabling of Pull-up for AVR devicesThe Pull-up circuit available (in AVR devices) for each GPIO pin has to be disabled before<strong>QTouch</strong> acquisition is performed. For tinyAVR and megaAVR devices the Pull-up circuit for allGPIO port pins are enabled and disabled together. When user needs to configure the pins thatare not used by <strong>QTouch</strong> library for his application, he may enable the Pull-up circuit after <strong>QTouch</strong>measurements are performed and disable them before the touch acquisition starts once again (asshown in the code snippet below)./* Disable pull-ups for all pins */MCUCR |= (1u