5 Protocol Comparison

MPLAB Data Visualizer supports three protocols for variable monitoring: Variable Streamer, DVRT, and X2Cscope. This section helps you choose the right protocol for your application.

Variable Streamer

Variable Streamer is the most lightweight protocol option. Variables to stream are predefined at compile time, and the user sends streaming data manually from a location in the application. Data is continuously streamed from the target to the PC as it is sampled. The protocol only supports streaming (one-way communication from target to PC).

The protocol uses UART for communication and has minimal firmware overhead.

Best for:
  • Simple data logging with minimal firmware overhead
  • Applications where the streamed variables are fixed
  • Projects already using MCC with Variable Streamer driver
Refer to Variable Streamers for comprehensive information on this protocol.

DVRT

DVRT provides flexible runtime configuration. Variables can be configured at runtime without code changes - the set of streamed variables and timing parameters can be dynamically updated. Data is continuously streamed to the PC as it is sampled. In addition to streaming, DVRT allows reading and writing individual variables on demand (bi-directional communication).

The protocol has low overhead and uses UART for communication and a timer interrupt for sampling.

Best for:
  • General debugging requiring flexible variable selection
  • Applications needing continuous real-time streaming
  • Quick iteration where streamed variables change frequently
Refer to DVRT Protocol for comprehensive information on this protocol.

X2Cscope

X2Cscope is a runtime debugging tool that uses the LNet protocol. The protocol has low overhead and uses UART for communication and a timer interrupt for sampling.

X2Cscope supports watch and scope functionality. With the scope function, X2Cscope first samples data into an internal buffer on the target MCU, then transfers the complete buffer to the PC. This approach allows capturing high-frequency signals without requiring high-bandwidth continuous communication. The set of monitored variables and timing parameters can be dynamically updated at runtime. Trigger detection is performed on the target MCU itself and controls whether data is actually captured into the buffer on the target.

The watch function reads/writes variables on demand. The MCU only responds when requested, there is no streaming. There is not any need for a buffer on the MCU to do this.

Best for:
  • Motor control applications requiring parameter tuning
  • Capturing fast signals with precise trigger timing
  • Applications where continuous streaming bandwidth is limited
Refer to X2Cscope Protocol for comprehensive information on this protocol.

Quick Reference

Variable StreamerSVRTX2Cscope
OverheadMinimalLowLow
ComplexityMinimalLowLow
Streaming configurationFixed (compile time)Flexible (runtime)Flexible (runtime)
Adjustable data rateNoYesYes (sample factor)
Can write to the targetNoYesYes
Data capture methodStreamingStreamingBuffered
Trigger supportPC-sidePC-sideTarget-side
MCC Driver supportYesYesYes