11.07.2015 Views

Atmel QTouch Library User Guide

Atmel QTouch Library User Guide

Atmel QTouch Library User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

In case of XMega devices, the resources are used internal to the library and hence cannot beused by the host applicationoooAnalog Comparator0 on PORTA (AC0 on PORTA)Timer/Counter1 on PORTC (TCC1)Event System Channel0 (EVSYS_CH0)Example for 32bit AVRBased on the application design, 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.For your design, you would need the following information to select the correct library varianta. Device to be used for the design(only AT32UC3C0512 supported)b. 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 port on which your design permits to have the X linesb. The X lines can be spread on a single port.d. Number of Y lines to be used in the designc. 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 designd. If yes, how many rotors/sliders would be needed?e. 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 -GCCAfter selecting the right library variant, following steps are to be performed1) Define the constants and symbol names requireda. The next step is to define certain constants and symbols required in the hostapplication files where the touch API is going to be used. These values arederived from the parameters defined in step 2 for your applicationb. The constant/symbol names are as listed in the table belowc. The constant/symbol definitions can be placed in any of the followingiv. In the user’s ‘C’ file prior to include touch_api.h in the filev. Defined user’s project options.vi. Modify the defines in a touch_qm_config32.h andtouch_qm_config32_assembler.h file available in the path.C:\Program Files\<strong>Atmel</strong>\<strong>Atmel</strong>_<strong>QTouch</strong>_Libraries_4.x\Generic_<strong>QTouch</strong>_Libraries \AVR_Tiny_Mega_XMega\QMatrix\common_filesSymbol / Constantname_QMATRIX_QT_NUM_CHANNELSRange of valuesSymbol defined to indicateQMatrix acquisition methodis requiredThe number of channelsthe library supports.(Possiblevalues:4,8,16,24,32,64).CommentsDefine this symbol to indicate QMatrixacquisition method is requiredValue should be same as the numberof channels that the library supportsNUM_X_LINES The number of X lines the Value should be same as the number63

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!