Download the latest MPLAB® X IDE and MPLAB Code Configurator (MCC) plugin. Create a new 32-bit MCC Harmony project.
2
Select the path where the Harmony v3 repository will be downloaded. The default location might be C:\Users\..\Harmony3 or C:\Users\..\.mcc\libraries\HarmonyContent.
3
From the Content Manager, click the Select MPLAB Harmony button.
4
Select Touch Turnkey from the optional content and click Finish.
How to Create a Project
1
Create a Harmony v3 project and select Touch Host Interface from the available component list.
2
Drag and drop or double-click on the component to add it to the Project Graph. The configuration options are shown in the right-hand pane.
3
Select the turnkey device from the supported list of devices. AT42QT2120 is selected in this example.
4
I2C is the only interface for the host driver and the selected AT42QT2120 turnkey device. Serial Peripheral Interface (SPI) is supported for AT42QT1110. Choose a satisfying Serial Communication (SERCOM) and select the corresponding pins from the PIN configurator.
5
Check Enable Tuning option and select SERCOM for Universal Asynchronous Receiver Transmitter (UART) and choose the corresponding pins from the pin manager.
6
Generate the files for the project.
7
Add code (touchDeviceProcess() and touchTuneProcess()). Refer to host_example.c file for reference and compile the project.
How to Connect to Data Visualizer
1
Flash the project and open Data Visualizer.
2
Select the COM port, set the Baud rate and click Connect.
3
When data starts streaming, under Touch Session, choose the same COM port and click Connect.
4
See the streaming data in the Touch window.
5
Error codes are shown in the General Status window. Go to common and individual parameters to tune them accordingly.