This example showcases a self-capacitance touch application using the PIC18F56Q71 Curiosity Nano board 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.
- MPLAB® X IDE v6.25.0 or newer
- MPLAB® XC8 v3.0.0 or newer
- MPLAB® Code Configurator (MCC) v5.6.2 or newer
- Microchip PIC18F-Q Series Device Support v1.28.451 or newer
- PIC18F56Q71 Curiosity Nano Evaluation Kit
- Curiosity Nano Touch Adapter
- QT7 Xplained Pro Extension Kit
- Type-B Micro USB cable
The PIC18F56Q71 Curiosity Nano is mounted on the Curiosity Nano Touch Adapter which has two extension headers. The QT7 Xplained Pro is connected to the 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 and slider touch events are indicated by LEDs on the QT7 XPRO and can 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
pic18f56q71-curiosity-nano-qt7-mplab-mcc.X/mcc_generated_files/touch/datastreamer/
project folder and click Select Folder - Update the Baud Rate to 115200 in the COM settings
- Start streaming for COM data
For more detailed procedure for Data Visualization, refer to the Visualize Touch Data Using MPLAB® Data Visualizer.
None.
This example project showcases how to interface the QT7 Self-Capacitance extension header with the PIC18F56Q71 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 PIC18F56Q71. 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.