Self-Capacitance Touch Sensors Example Using QT7 Xplained Pro and PIC18F47Q10 Curiosity Nano Evaluation Kit
This example showcases a self-capacitance touch application using the PIC18F47Q10 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.
- PIC18F47Q10 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 PIC18F-Q DFP v1.28.451 or newer
- PIC18F47Q10 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 PIC18F47Q10 Curiosity Nano Evaluation Kit is mounted on the CNANO Touch Adapter. In this project, the PIC18F47Q10 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, navigate to
pic18f47q10-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.
- Button0 is not working as the pin assigned to it is connected to CLKIN
This example project showcases how to interface the QT7 Self-Capacitance extension header with the PIC18F47Q10 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 PIC18F47Q10. 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.