MPLAB® Code Configurator for Touch Host Driver
Getting Started With Touch Host Driver
This tutorial provides a detailed, step-by-step guide for configuring and generating host driver firmware for the MTHC2120. It also includes the procedure for connecting the external host interface, offering additional clarity on hardware connections.
Create a new 32-bit MPLAB® Code Configurator (MCC) Harmony project.

Upon clicking the Finish button of the New Project Wizard, the MCC Content Manager will open along with the newly created project.
Add the Touch Host Driver to the MCC content.
From the Content Manager, click the Select MPLAB Harmony button.

Select Touch Host Driver from the optional content and click Finish.

This will close the Content Manager and open the MCC Resource Management and Project Graph windows.
Add the Touch Host Driver to the project.
In the Device Resources pane of the Resource Management tab, expand the Touch Turnkey library to find the Touch Host Interface component.

Click on the Add button (green square with white cross) next to Touch Host Interface to add it to the Project Graph. The configuration options are shown in the right-hand pane.

From the Select Turnkey Device supported list of devices drop-down, choose the turnkey device. MTCH2120 is selected in this example.

Add the SERCOM module.
I2C is the only interface for the host driver and the selected MTCH2120 turnkey device. Choose a satisfying Serial Communication (SERCOM) and select the corresponding pins from the PIN configurator.
Add the tuning option.
Check Enable Tuning option and select a SERCOM for Universal Asynchronous Receiver Transmitter (UART) and choose the corresponding pins from the pin manager.

Configure the SERCOM module.
Configure the UART settings as follows.

Configure the I2C settings as follows.

Configure INTERRUPT.
Change INTERRUPT Pin Name as you want and copy the name.

Configure the pins.
Open Pin Configuration from Windows > MPLAB Code Configurator > Harmony.

Configure the UART pins in the Pin Configuration window as follows.

Configure the I2C pins in the Pin Configuration window as follows.

Configure the Interrupt pin in the Pin Configuration window.

Disable SysTick.
Click System in the Project Graph.
Go to Cortex-M0+ Configuration.
Go to SysTick.
Uncheck the Enable SysTick option.

Generate the files.
Click on the Generate button to start generating the MCC files for the project.

Add code and compile.
Add code (touch_init_example() and touch_mainloop_example()) to main.c. Refer to the mtch2120_host_example.c file for reference and compile the project.

Connect to MPLAB Data Visualizer.
Refer to the "How to Connect to Data Visualizer" section for more details on how to connect the kit to Data Visualizer.
External Host Interface Connection Procedure

External Host Jumper Settings

Disconnect the SCL connection between J4 and J5, and connect the EVK SCL (I²C clock) pin to PA09 on the SAMD21 Xplained Pro.
Disconnect the SDA connection between J4 and J5, and connect the EVK SDA (I²C data) pin to PA08 on the SAMD21 Xplained Pro.
Disconnect the INTR connection between J4 and J5, and connect the interrupt (INTR) pin to PA04 on the SAMD21 Xplained Pro.
Connect the ground (GND) between the SAMD21 Xplained Pro and the MTCH2120 EVK.
Disconnect the VDD connection between J4 and J5, and supply external power to the MTCH2120 EVK.
Release Information
Release notes for Touch Host Driver are available on the Microchip MPLAB® Harmony 3 Touch Host Driver Release Notes GitHub® page.