11.07.2015 Views

Atmel QTouch Library User Guide

Atmel QTouch Library User Guide

Atmel QTouch Library User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Integrating <strong>QTouch</strong> acquisition method libraries in your applicationThe following steps illustrate how to add <strong>QTouch</strong> acquisition method support in your application.1) <strong>QTouch</strong> acquisition method library variants are offered for IAR and AVR Studio/GCC toolchains. First step is to select the compiler tool chain to be used based on the code anddata memory requirements. The list of supported compiler tool chains can be found in5.7.1.2.Use 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) to select the <strong>QTouch</strong> acquisition method library variantrequired for the device.a. There are specific library variants distributed for each microcontroller. You wouldneed the following parameters to identify the right library variant to be used inyour applicationi. The microcontroller to be used for the application.ii. The acquisition method to be used for the application.iii. The number of channels you need for the application.iv. Whether Rotor and/or Slider support required in the application.v. The number of rotors and/or slider needed for the application.b. There are specific variants of the library which is pre-built with a specificconfiguration set supported. Use the library selection guide (C:\ ProgramFiles\<strong>Atmel</strong>\ <strong>Atmel</strong>_<strong>QTouch</strong>_Libaries_4.x\<strong>Library</strong>_Selection_<strong>Guide</strong>.xls) to find thesample project using the <strong>QTouch</strong> acquisition method library variant.2) 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.b. The constant/symbol names are as listed in the table below.c. The constant/symbol definitions can be placed in any of the following.i. Defined user’s project options. All the constants/symbols must be definedfor both the compiler and assembler preprocessing definitions.ii. As an alternative, it is also declared in the touch_qt_config.h file. Theuser may modify these defined values based on the requirements.Table 3 : Constant and symbol name definitions required to use the <strong>QTouch</strong> acquisitionmethod librariesSymbol / Constant name Range of values Comments_QTOUCH_This macro has to be defined inorder to use <strong>QTouch</strong> libraries.SNS1 & SNSK1 Refer to library selection guide. To be used if only singleport pair is needed for thedesign.SNS1 – SNSK1&SNS2 – SNSK2Refer to library selection guide.To be used if two port pairsare needed for the design._SNS1_SNSK1_SAME_PORT_ Comment/uncomment define To be enabled if the sameport is used for SNSK1 andSNS1 pins for <strong>QTouch</strong>. IfSNSK1 and SNS1 pins areon different ports then thisdefinition is not required._SNS2_SNSK2_SAME_PORT_ Comment/uncomment define To be enabled if the sameport is used for SNSK2 andSNS2 pins for <strong>QTouch</strong>. IfSNSK1 and SNS1 pins areon different ports then this51

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

Saved successfully!

Ooh no, something went wrong!