Visualize Touch Data using Data Visualizer

Last modified by Microchip on 2023/11/10 10:22

Warning: This tutorial uses the old Harmony configuration tool (MPLAB® Harmony Configurator (MHC)). New Harmony projects should use the MPLAB Code Configurator (MCC) instead.

 

Objective

This page provides information on configuring the Data Visualizer option in MPLAB® Harmony based touch projects and visualizing the touch technology data in the Data Visualizer tool.

Reference Materials

Procedure

Enable Data Visualizer

Ensure the Enable Data-Streamer option is selected in the Debug Option section of the Parameters tab while generating the project in the Harmony Configurator.

PTC Manager View: Enable Data-Streamer option

Detailed information on how to generate a touch project using Harmony Configurator can be found on the "Generate a Touch Project with MPLAB® Harmony" page.


Choose and configure UART

In the Project Graph window, in the QTouch® Library middleware, a new dependency called UART (a yellow icon) is shown.

Project Graph window: New dependency called UART (a yellow icon)

Right-click on the UART icon and select the proper SERCOM from the Satisfiers list.

Select SERCOM from the Satisfiers list

The chosen SERCOM appears on the project graph and the connection to the QTouch Library is made.

SERCOM appears on the project graph

Click on the SERCOM module. The configuration options are on the right side. Choose the PADs for the receive and transmit pinout from the schematics.

Configuration Options


Select pin configuration

Click on Tools > Pin Configuration to choose the UART pins.

Click on Tools > Pin Configuration

From the schematics of the board, we know the UART TX and RX pins. Go to the Pin Settings tab and choose the pins for the configured SERCOM.

Pin Settings tab.  Choose the pins for the configured SERCOM


Generate and program the board

Click on the Generate Code icon at the top left corner of the screen to generate the code.

Select Generate Code icon

The project is populated with touch source and header files. The datastreamer source files and script files are found under the datastreamer folder of the project.

Datastreamer source files and script files

In the main.c file, call the function touch_process to invoke all touch functionalities.

main.c file view, call the function touch_process

Build the project and program the generated HEX file to the device.

Open Data Visualizer

The Xplained Pro Kits support Data Gateway Interface (DGI) and virtual COM Port interface in order to transmit data from the kits to the Data Visualizer.

In touch projects, debug data is sent through the serial interface (COM Port).

When the kit is connected, the EDBG will be recognized under Serial Port Control Panel title bar.

EDBG recognized under Serial Port Control Panel title bar


Select COM Port

In the Serial Port Control Panel:

Select the EDBG Virtual COM Port (COMxx) (If multiple Xplained Pro kits are connected, disconnect other Xplained Pro kits to identify correct COM Port).
Uncheck the Open Terminal check-box and select Autodetect Protocol.
Click on the config search path and choose the datastreamer folder where the script files are located.
Click Connect.
Serial Port Control Panel

​The Data Visualizer tool automatically checks for data on 9600, 19200, 38400, 57600, 115200, 230400, 500000, 1000000 and 2000000 baud rates.


Configuration Files
Verify whether the DS, DB, SC files are present in the ../touch/datastreamer/ folder. The Data Visualizer prompts you to select the folder containing configuration information if there was no folder selected before.
Configuration files are stored as part of the project source files. Browse the ../touch/datastreamer/ project folder and click on Select Folder.
The selected folder will be saved by the Data Visualizer. It may be necessary to change this folder location when you want to view data of another/updated project.

Dashboard

The dashboard displays basic and advanced information in a tabular/graphical form:

Basic Information

Dashboard showing basic and advanced information

Advanced Information

Sensor Data Table

Graphical Information
The graphical view provides a graphical representation of the signal, reference, and touch delta.

Graphical representation of the signal, reference, and touch delta

Lastly, by clicking on the legends, you can select the desired signals to plot.


Back to Top