Configuring Adjacent Key Suppression™ (AKS™) Groups on the ATmega328PB Xplained Mini
Objective
In the projects leading up to this one, we've been using the 'V' in the AVR® symbol as our touch button. To demonstrate the Adjacent Key Suppression™ (AKS™) feature, we need more than one touch sensor. In this project, we will configure two additional touch buttons (the 'A' and the 'R' in the AVR logo on the ATmega328PB Xplained Mini) and observe the touch status when AKS is disabled. We will then add all three sensors to a single AKS group and observe the results.
This tutorial builds on the Intro to PTC and Analyze Touch Data Using QTouch® Analyzer projects. Make sure you've completed those before continuing with this hands-on exercise.
Reference Materials
ATmega328PB Xplained Mini Evaluation Kit
Atmel® Studio Integrated Development Environment
Procedure
Stop Reading
If you've just completed the Changing the Detect Hysteresis project, you should click on Stop Reading.
Open the QTouch Project Builder
In the Solution Explorer window, double-click on the .qtdgn file. Note that you may have named your project differently.
Add Button
Click on the Button icon
In the Add Sensors dialogue box, set the 'Number of Button' to 2 and click Add.
You'll see that two more buttons are added to the QTouch kit canvas.
Assign Pins
In the Project Builder Workflow window, click on the 'Pin Selection' tab.
Based on the following table, select the pins that are connected to the QTouch buttons.
A | PE2 | Y6 |
V | PE3 | Y7 |
R | PC3 | Y3 |
Ensure that the order of pin assignments is similar to the one below. This would ensure that sensor numbering of your project is similar to the one followed in this tutorial.
Build and Program
Build the solution.
Program the application by clicking on the 'Start Without Debugging' icon.
QTouch Analyzer
Open the QTouch Analyzer window by clicking on the icon as shown below.
In the QTouch Analyzer window, click ReConnect.
Click on Start Reading.
Use the 'Tabular View' to observe touch delta and state.
Touch Two Buttons
Touch the sensors so that contact is made with more than one sensor simultaneously as shown below.
Open the QTouch Project Builder
In the Solution Explorer window, double click on the .qtdgn file.
Change Button Settings
Select 'Button0' on the QTouch kit canvas and click on the setting icon.
Set the 'AKS Group' setting to AKS_Group_1.
Set AKS Group for Button1 and Button2
Similarly, set the 'AKS Group' as AKS_Group_1 for the rest of the buttons (Button1 and Button2).
Build and Program
Build the solution.
Program the application by clicking on the 'Start Without Debugging' icon.
QTouch Analyzer
Open QTouch Analyzer.
In the QTouch Analyzer window, click ReConnect.
Click on Start Reading.
Use the to observe touch delta and state.
Touch Two Buttons
Touch the sensors so that contact is made with more than one sensor simultaneously as shown below.
Touch Detect
Although multiple sensors may have a delta greater than their respective detect threshold, only one sensor will report touch detection.
Results
You have now learned how to configure the AKS parameter in a QTouch Project.