2.1 DVRT Interrupt Mode PIC32 MK MCJ

This example application demonstrates how to use Data Visualizer Run Time (DVRT) module in interrupt mode to transfer data to visualizer tool.

Description

This example demonstrates how to use the DVRT library to view and update volatile variables during run time. In the process, the example demonstrates reading the variables, changing the LED toggle rate from visualizer tool and read back the updated value.

Downloading and Building the Application

To clone or download this application from Github, go to the main page of this repository and then click Clone button to clone this repository or download as zip file. This content can also be downloaded using content manager by following these instructions.

Path of the application within the repository is apps/dvrt_interrupt_pic32mk_mcj/firmware.

To build the application, refer to the following table and open the project using its IDE.

Project Name Description
pic32mk_mcj_curiosity_pro.X MPLABX project for PIC32MK MCJ Curiosity Pro Board

Setting Up the Hardware

The following table shows the target hardware for the application projects.

Project Name Description
pic32mk_mcj_curiosity_pro.X PIC32MK MCJ Curiosity Pro Board

Setting Up PIC32MK MCJ Curiosity Pro Board

  • Connect the Debug USB port on the board to the computer using a micro USB cable

Running the Application

  1. Build and Program the application using its IDE
  2. Select the DVRT for Main Project from drop down menu of DV Icon from the taskbar of MPLAB IDE
  3. Connect to the EDBG Virtual COM port and configure the serial settings as follows:
    • Baud Rate : 115200
    • Char Length : 8 Bits
    • Parity : None
    • Stop Bits : 1 Bit
  4. From the options, change the address size to 4 and click on icon to start communication.
  5. Add the variables into DVRT Streaming Table to read from device and update to tool.
  6. In the Time Plot tab, add the variables and observe the data as shown below
  7. In DVRT Write/Read Table tab, add the variable LED_toggle_delay, read and change its value to observe LED toggle at new time delay.
Refer the table below for details of Switch and LED:
Board LED Name
PIC32MK MCJ Curiosity Pro Board LED2