How to Use QTouch Studio For Pin Configurability

Note:

The Qtouch Composer is available for few select set of devices.But user can use Qtouch Studio 4.4 for the devices which are not supported in Qtouch Composer.

The following steps describe the details on how to use pin configurability for QTouch Acquisition method:

  1. 1.

    Open AVR QTouch Studio .Enable the Design Mode Radio button on the left hand side of the screen.

    Figure 1. Selecting the Design mode in the AVR QTouch Studio

  2. 2.

    Go to File Menu option and click New Design .

    Figure 2. Selecting the New Design in the AVR QTouch Studio

  3. 3.

    In the Create New Design Window, give the Project name and Kit Technology (QTouch in this case) and and Number of sensors (Keys/Rotors/Sliders) and click Create Design.

    Figure 3. Creating New Design in the AVR QTouch Studio

  4. 4.

    After Creating Design, the new screen pops up which shows all the sensors which have been created.

    Figure 4. New Design Sensors in the AVR QTouch Studio virtual kit

  5. 5.

    Now Go to Tools->Pin Configuration Wizard.Pin configuration .

    Figure 5. Selecting the pin configuration wizard for the design

  6. 6.

    Pin configuration Window will pop up with the information on the usage of the tool. Click Next to proceed to the configuration.

    Figure 6. Start page of the wizard

  7. 7.

    Select the MCU and click Next as shown below.

    Figure 7. Selecting the MCU for the New Design

  8. 8.

    Select the SNS and SNSK ports needs for the design and click Next.

    Figure 8. Selecting SNS and SNSK ports in the new design

  9. 9.

    Select the pins used for the design and click Next .

    If there is error in the selection of the pins (Ex: conflictin pins used), a red marker will be appear and the user cannot proceed to next step in configuration until the user has done the correct pin selection.

    Now once the selection is done without errors, Click Next.

    Figure 9. Selecting the SNS and SNSK Port Pins in the new Design(With Error)

    Figure 10. Selecting the SNS and SNSK Port Pins in the new design(Without Error)

    Once the pins are selected, Pin Wizard will provide the summary report .Check whether details are correct as specified.Click Next.

    Figure 11. Summary report

    Figure 12. Code Generation tab in Pin Configuration wizard

  10. 10.

    In the New Window Screen, the code is shown on the screen.QTOUCH_STUDIO_MASKS needs to be enabled in the project option or in touch_ config.h file. And in the main.c file, this code SNS_array and SNSK_array needs to be copied from here and put under QTOUCH_STUDIO_MASKS macro as shown below in the main.c file.

    #ifdef QTOUCH_STUDIO_MASKS
        SNS_array[0][0]=0x09;
        SNS_array[0][1]=0x22;
        SNS_array[1][0]=0x00;
        SNS_array[1][1]=0x00;
        SNSK_array[0][0]=0x14;
        SNSK_array[0][1]=0x88;
        SNSK_array[1][0]=0x00;
        SNSK_array[1][1]=0x00;
    #endif
Note:
  1. 1.

    To use 4 and 8 channel libraries(interport case) for pin configurability , _STATIC_PORT_PIN_CONF_ macro needs to be enabled in the touch_config.h file..

  2. 2.

    QTOUCH_STUDIO_MASKS needs to be enabled if using pin configurability .If not enabled then, static pin mapping will work same as in the earlier versions of the libraries.