1 Data Visualizer Run Time (DVRT) Basics

The Data Visualizer Run Time (DVRT) functionality on the MPLAB® Data Visualizer, running on a host computer, is supported by an MPLAB Code Configurator (MCC) Melody Library, communicating with the Data Visualizer via a Universal Asynchronous Receiver/Transmitter (UART) connected to your computer’s COM port.

1.1 DVRT Quickstart

DV Run Time: MCC Melody Configuration

  • Application Builder ➔ Add Component ➔ Data Streamer Library (adds the UART driver) Go to Device Resources>Libraries>Data Visualizer>Data Streamer Library.
    Note: If not available: DV Run Time is not included as default content. Therefore, it must first be added through the MCC Content Manager before it can be selected from Builder Add Component or Device Resources.
  • Timer ➔ Timer PLIB Selector: <Select any PLIB> All Timer PLIBs will meet requirements of this example. Leave as 1ms (default).

  • UART ➔ UART PLIB Selector: <Select Serial/CDC port UART> The Curiosity Nano, via a USB/serial bridge, facilitates a connection between a UART on the Target MCU and a virtual COM port on your PC, e.g., to connect to the MPLAB Data Visualizer or other terminal programs.
  • UART Pins Configuration:
    • Pin Grid View ➔ Select pin for UART Transmit - Tx Find the Tx pin from your schematic and set it in Pin Grid View.
    • Pin Grid View ➔ Select pin for UART Receive - Rx, Enable (weak) pullup Find the Rx pin from your schematic and set it in Pin Grid View. Enabling a pullup on a UART Rx pin is necessary for stable opperation
  • Data Visualizer Setup for DV Run Time
Figure 1-1. Introduction to the Data Visualizer Run Time (DVRT) protocol, for the MPLAB Data Visualizer

1.2 DVRT System Overview

Figure 1-2. The DV Run Time Protocol System, implemented across both microcontroller (MCU) and MPLAB® Data Vizualizer (Host PC)

1.3 Connecting the MPLAB® Data Visualizer DVRT Protocol Options to the Melody Library Fields

The image below shows the MPLAB Data Visualizer integrated into MPLAB X IDE, with a DVRT Protocol Session on the left side and, the configuration options for the MCC Melody DV Run Time library on the right side.

The default configurations are sufficient for operation; however, this section provides guidance for understanding how to use the DVRT protocol.
  1. API Prefix: This text will be the prefix for all APIs associated with the DVRT.
  2. Number of Dynamic Variables: This number has to be higher or equal to (>=) the number of variables in the DVRT Streaming Table in the Data Visualizer. On the Data Visualizer side, this is configured by setting the number of Streaming Slots.
    Figure 1-3. MPLAB® Data Visualizer DVRT Protocol Session (PC Side, on the left) with DV Run Time Library (MCU Side, on the right)
  3. Project FW Code: Can be used to distinguish between different projects. The Data Visualizer compares the Firmware Code read from the target to an expected value. A warning is displayed if the values don’t match.
    Note: The default value of the Project Firmware Code matches the Expected FM Code in the Data Visualizer. This Project Firmware Code is used in the DVRunTime_Config.h.
    Note: In the DVRT library, the U suffix (e.g., 8U, 20U, 200U) denotes an unsigned integer constant, ensuring MISRA-compliant type clarity and safe use with types like uint8_t or uint16_t.