Self-Capacitance Touch Sensors Example Using QT7 Xplained Pro and PIC16F17576 Curiosity Nano Evaluation Kit
This example showcases a self-capacitance touch application using the PIC16F17576 Curiosity Nano Evaluation Kit in combination with the QT7 Xplained Pro extension board. The project offers user feedback for touch events either through the on-board LEDs on the QT7 XPRO or by displaying data on a PC using MPLAB® Data Visualizer over USB.
- PIC16F17576 Curiosity Nano Evaluation Kit User Guide
- Curiosity Nano Touch Adapter User Guide
- QT7 Xplained Pro Extension Kit
- MPLAB® X IDE v6.25.0 or newer
- MPLAB® XC8 v3.0.0 or newer
- MPLAB® Code Configurator v5.6.2) or newer
- Microchip PIC16F1xxxx DFP v1.27.418) or newer
- PIC16F17576 Curiosity Nano Evaluation Kit
- Curiosity Nano Touch Adapter
- QT7 Xplained Pro Extension Kit
- USB Type-C® cable
The Curiosity Nano Touch Adapter board features two Xplained Pro Extension Headers, supporting both Self- and Mutual-Capacitance Touch Extension Kits, along with two power configuration options and a header mount for the Nano Development board. The PIC16F17576 Curiosity Nano Evaluation Kit is mounted on the CNANO Touch Adapter. In this project, the PIC16F17576 Curiosity Nano Evaluation Kit along with the Curiosity Nano Touch Adapter serve as the circuit interface, connecting to the QT7 Xplained Pro board through extension header 1, as shown below.
Once the setup is ready, open the application project in IDE, build the project and program the target board. Button/Slider touch events are indicated by LEDs on the QT7 XPRO and can also be monitored in the MPLAB® Data Visualizer.
- The project supports unidirectional tuning
Configure the COM Port:
- Select Auto-configure in Variable Streamers tab
- Select the correct COM port in source
- Configuration files are stored as part of the project source files
- In Auto-configure Options, browse the
pic16f17576-curiosity-nano-qt7-mplab-mcc.X/mcc_generated_files/touch/datastreamer/
project folder and click Select Folder - Update the Baud Rate to 38400 in COM Settings
- Start streaming for COM data
For a more detailed procedure for Data Visualization, refer to Visualize Touch Data Using MPLAB® Data Visualizer
- Driven shield is disabled because the shield pin is on a non-supported port. The corresponding pin has been set as Output Low.
This example project showcases how to interface the QT7 Self-Capacitance extension header with the PIC16F17576 microcontroller. It leverages the Analog-to-Digital Converter (ADC) in Capacitive Voltage Divider (CVD) mode to enable touch sensing and supports Universal Asynchronous Receiver and Transmitter (UART) communication on the PIC16F17576. The application detects touch inputs from the self-capacitance buttons and slider on the QT7 XPRO board. When a touch is registered, the corresponding LED for each button or slider position lights up. Additional touch parameters can be monitored in MPLAB® Data Visualizer using the provided datastreamer files.