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.

Choice of portsavailable for thedesignPORT_X_1 = BPORT_X_2 = DYA Line on PORTDYB Line on PORTCSMP Pin on PORTD pin 7QT_DELAY_CYCLES of 4listed in 5.7.2.2Any pins that are not conflictingwith the host application andfollow the configuration supportedby library can be used.OrThis can be filled from the outputof the pin configurator tool in<strong>QTouch</strong> Studio. Please refer tosection 5.8.2Given the above requirements for the applications, the first step is to select the right libraryvariant required.Step 1:Select the Device that suits the requirements based on the touch sensing channels needed fromthe library selection guide available at C:\ Program Files\<strong>Atmel</strong>\ <strong>Atmel</strong>_<strong>QTouch</strong>_Libaries_4.x\<strong>Library</strong>_Selection_<strong>Guide</strong>.xlsStep 2:From the <strong>Library</strong>_selection_<strong>Guide</strong>.xls list,, we see that there are a few variants of librariessupported for AT Tiny device. Since the application requires 6 channels and rotor slider support,one has to select a library variant which supports at least 6 channels or more. Hence we selectthe 8 channel library which supports the required Port combination and the delay cycle preferredwhich works out to be the variant• libv1g1s1_8qm_4x_2y_krs_2rs.r90Step 3:Defining the constants / symbols in the project space or modifying in touch_qm_config.hIn the host application file (say main.c), define the following constants and symbols#define _QMATRIX_#define QT_NUM_CHANNELS 8#define NUM_X_LINES 4#define NUM_Y_LINES 2#define NUM_X_PORTS 2#define PORT_X_1B#define PORT_NUM_1 1#define PORT_X_2D#define PORT_NUM_2 2#define PORT_YAD#define PORT_YBC#define PORT_SMPD#define SMP_PIN 7#define QT_DELAY_CYCLES 4#define ROTOR_SLIDER_#define QT_MAX_NUM_ROTORS_SLIDERS 2Note:1. Some of these macro’s can be taken from the output of the Pin configurator tool from<strong>QTouch</strong> Studio. Refer to section 5.8.261

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

Saved successfully!

Ooh no, something went wrong!