Generate QTouch® Surface Gesture Project

 Objective

The following lab shows you how to create a QTouch® Surface project in Microchip's Atmel START, where you can add horizontal and vertical sensors, and configure surface and gesture parameters. The resulting project supports GCC and IAR compilers. This project is generated for ATTiny1617 Water Tolerant Touch Surface Kit.

 Materials

Hardware Tools

Tool About Purchase
hwtool-50px.png
ATTINY1617
ATTINY1617
hwtool-50px.png
ATTINY1617
Water Tolerant Touch Surface Kit

Software Tools

Tool About Installers
Installation
Instructions
Windows Linux Mac OSX
Atmel® START (ASF4)
Integrated Software Framework
Web Based

 Procedure

1

Open Atmel START

Go to microchip.com/start and select the CREATE NEW PROJECT option.

CreateNewProject.png

2

Select Device and Create New Project

Start typing attiny1617 on the Filter on device… box. Select 'ATtiny1617-MFR' and proceed to click on CREATE NEW PROJECT.

FilterByDevice.png

3

Add Software Components

After project creation, the project dashboard will open as follows. Click Add software component to add the QTouch Library.

AddSoftwareComponent.png

You can type touch in the Filter box to be able to find the library faster. Add the QTouch Library by clicking the + icon and then clicking on Add Component.

AddQTouchLibrary.png

QTouch Library Middleware will be added to the project.

QTouchLibraryAdded.png

4

Add Sensors

The ATtiny1617 Water Tolerant Touch Surface Kit has six self-cap channels in the horizontal (X-axis) direction and five self-cap channels in the vertical (Y-axis) direction.

Adding Surface

a

Select the 'QTouch' tab and then click on the 2D Surface drop-down menu.

b

Enter the Number of Horizontal channels as 6 and the Number of Vertical channels as 5.

c

Select 'Selfcap' from the Technology drop-down menu.

d

Select '1 & 2 Finger gestures' from the Gesture Type drop-down menu.

e

Click Add button

AddingSurface.png

Atmel START loads the surface with the selected configuration and a warning pops up asking you to enter the CPU and Peripheral (PTC, Timer, UART) default clock settings.

  • Click Yes to load QTouch default settings for the CPU and peripheral clocks.
  • Click No to configure CPU and peripheral clocks manually.
ClockWarning.png

5

Touch and Debug Interface Pin Selection

Click on the 'Pins' tab on the left side.

PinsTab.png

Refer to ATtiny1617 Water Tolerant Touch Surface Kit design files

Based on the design files, Y lines should be selected as follows:

YLines.png

Pin Selection

Click on each channel to modify the assigned pin.

ModifyPins.png

Select the channel from the channels list as per the hardware design files.

SelectChannels.png

Driven Shield

Click on the 'Driven Shield' tab to enable and configure the driven shield.

This feature is not supported on all devices. The Enable Driven Shield check box is greyed out when not supported.

DrivenShield.png

a

Click on the Enable Driven Shield check box

b

Select the driven shield pin from the shield pin drop down menu.

DrivenShieldConfiguration.png

Debug

Click on the 'Debug' tab to enable and configure debug port pins.

a

Configure UART TXD and RXD pins as per the hardware.

b

UART default baud rate is 38400 bps for AVR devices and 115200 bps for SAM Devices.

c

To modify default UART settings click on View/Configure UART

d

Uncheck the Enable Data streamer check box to disable the debug port in order to save memory in the final application.

DataStreamer.png

6

Parameters

Channel

Select the 'Parameters' tab. Channel properties such as Oversamples, Digital Gain, Analog Gain, Series Resistor, CSD (additional cycles), Prescaler, Threshold, Hysteresis and Sensor Adjacent Key Suppression (AKS™) Group can be modified in this tab.

Note: All keys forming a touch surface should be configured with similar threshold and hysteresis, and all in the same Adjacent Key Suppression (AKS™) Group.

Parameters.png

Sensor

Select the 'Sensor' tab. Sensor parameters such as Detect Integration, Away from Touch Recal Integration Count, Away from Touch Recalibration Threshold, Touch Drift Rate, Away from Touch Drift Rate, Drift Hold Time, Re-burst mode and Max on Duration can be modified in this tab.

Note: Detect Integration should not be more than two in surface and gesture projects.

SensorParameters.png

Scroll Down in the same tab to change Scan Rate, Acquisition Frequency and Noise Handling using Frequency Hop. Frequency Hop can be enabled by selecting the Enable Frequency Hop check box.

FrequencyHop.png

The Frequency Hop auto-tune feature can be enabled by the Enable Frequency Auto Tune check box. When Frequency Hop is enabled, configuration parameters related to frequency hopping can be modified. Similarly, Frequency Hop Auto tune configuration parameters can be changed when Frequency Hop Auto Tune is enabled.

FrequencyHopSettings.png

Surface

Select the 'Surface' tab. Surface parameters such as Position Resolution, Deadband Percentage, Median Filter, IIR Filter, Position Hysteresis and Minimum Contact can be changed in this tab.

Note: Position resolution should be less than or equal to 8-bit, when gestures are enabled.

SurfaceSettings.png

Gesture

Select the 'Gesture' tab. This tab displays gesture parameters when the check boxes are ticked. Otherwise, gestures are enabled and loaded with default settings for gesture parameters.

Note: All '1 Finger' or both '1 & 2 Finger' gestures are enabled based on the gesture selection during surface sensor creation.

To disable the gestures after surface sensor creation, uncheck the Enable Gesture check box.

DisableGestures.png

When all the gesture check boxes are enabled, it displays the gesture parameters as shown below. All the gesture time-related parameters are timed with 10 ms timer, e.g. if Tap Release Timeout is configured as 5, this means 5x10 = 50 ms.

Note: Ensure that while configuring Tap Release Timeout, Swipe Timeout, and Tap Hold Timeout you follow the equation:

Tap Release Timeout < Swipe Timeout < Tap Hold Timeout

GestureParameters.png

7

Notifications

Click on 'Notifications' tab to check the notifications triggered by Atmel START.

Notifications.png

8

Summary

Select 'Summary' tab which displays Project Configuration Summary and QTouch Library Module Versions. Click on Download Summary to download the summary information.

Summary.png

9

Export

After completing all the configuration, click the EXPORT PROJECT option. Atmel Studio IDE is selected by default. Aditionally, you can select the IAR IDE if required for the project, then enter the file name and click Download Pack.

Export.png
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.