Atmel QTouch Library User Guide
Atmel QTouch Library User Guide
Atmel QTouch Library User Guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
• It is recommended to disable PULL-UP resistor on all port pins used for touch sensing onthe device selected (e.g. PUD bit in MCUCR, SFIOR for a few of the tinyAVR andmegaAVR devices Please refer to the Data sheet of the selected device).• The 16 bit timer in each device has been used for performing touch measurementsperiodically. The datasheet for all the devices have to be checked to ensure that thecorrect timer peripheral and its registers are used (file: main.c).• The interrupt vector macro may also change from device to device and this needs to beverified in the datasheet for the device used.• Check if the timer is configured correctly to support the measurement period needed (e.g.25msec or 50 msec).• The sample applications for the evaluation kits and supported devices illustrate theproper initialization sequence and usage of the timer resources (file: main.c). Please usethis as a reference for your application design.The host application must provide the current time to the library. This information is passed to thelibrary as an argument to the function qt_measure_sensors()”. This is used for time-based libraryoperations such as drift compensation.Integrating QMatrix acquisition method libraries in your applicationExample for 8bit AVRBased on the application design needs, the user needs to select the right library variant and theconfiguration to be used along with the variant. This section illustrates the steps required to selectthe right QMatrix acquisition method library variant and configuration for your application. QMatrixacquisition method library Variants are offered for IAR and AVR-GCC tool chains. First step is toselect the compiler tool chain for which the libraries are required. The list of supported compilertool chains can be found in section 5.7.2.2There are specific library variants distributed for each microcontroller. For your design, you wouldneed the following information to select the correct library varianta. Device to be used for the designb. The number of touch sensing channels needed by the application – Then identify theMaximum number of channels required for the design that are supported by the library.c. Number of X lines to be used in the designa. The ports on which your design permits to have the X linesb. The X lines can be spread on a maximum of three ports, the more ports used themore is the code memory requirement by the library.d. Number of Y lines to be used in the designa. The port-pins ports on which your design permits to have the Y linese. Do you need support for Rotors and/or Sliders in your designa. If yes, how many rotors/sliders would be needed?b. Based on a) above, identify the maximum number of rotors sliders that the librarysupportsf. Which compiler platform you intend to use to integrate the libraries – IAR or AVR -GCCFollow the steps listed below to arrive at the right library variant1) Select the device from the list of supported devices listed in 5.7.2.4.12) Select the right library variant for the device selected from the selection guide availableinC:\ Program Files\<strong>Atmel</strong>\<strong>Atmel</strong>_<strong>QTouch</strong>_Libaries_4.x\<strong>Library</strong>_Selection_<strong>Guide</strong>.xlsEach variant supportsa. a specific number of channels,b. Supports a specific configuration of X x Y matrix pins ( eg 4 x 2 for 4 - X pins & 2- Y pins )568207K-AT42-09/11