MCC Melody in VS Code®: I2C Proximity Ex. 3 - Callbacks + DV Run Time | Videos
MCC Melody in VS Code®: I2C Proximity Ex. 3 - Callbacks + DV Run Time
Getting Started with MCC Melody in VS Code® (for PIC16/PIC18/AVR Development) Playlist:
https://youtube.com/playlist?list=PLtQdQmNK_0DTt4jZ7BQiFBV51zTt3MGqO&si=evOSLi5ww8ycAe0R
Link to Part 1: https://youtu.be/rER0qkbnFpw
Link to Part 2: https://youtu.be/B7h3FoFTH5s
The previous videos have built up pseudo configurations for MCC Melody configurations associated with a proximity sensor example, namely: Polled Printf, Callbacks Data Streamer, Callbacks DV Run Time.
In this video we build up and test the final config on hardware, using the Curiosity Nano Explorer. We enable I2C interrupt-driven host, 100 ms timer, add DV Runtime with CDC UART (TX: RF0, RX: RF1 weak pull-up), generate code, flash, and auto-discover symbols (proximity, frame count, debug IO) in MPLAB Data Visualizer. Due to the DV Run Time, we can directly find static or volatile variables in the .elf file, so no manual framing is needed.
Timestamps:
00:03 - Data Streamer done → Now: DV Runtime (simpler visualization)
00:57 - Ctrl Shift P → MCC Launch → Select DV Runtime config
01:16 - Reuse I2C host (RB2 SDA, RB1 SCL) → Interrupts on
02:04 - Pin Grid: Confirm I2C on Curiosity Nano Explorer
02:31 - Add TMR1 → 100 ms, interrupt-driven
03:00 - LED: RF3 output
03:35 - Add DV Runtime → Auto-adds CDC UART
03:53 - UART: RF0 TX, RF1 RX → Enable RX weak pull-up (critical for UI commands)
04:47 - Debug IO: RB4 (switch)
05:11 - Generate code → Copy DV Runtime example snippet
05:57 - Replace main.c → Confirm Timer0 → Remove blocking wait
06:15 - Clean & build DV Runtime → Success
06:34 - Debug → Auto-detect board
06:53 - Data Visualizer DVT Setup: Start session → Pick debug/production .elf
07:15 - Tip: Match .elf timestamp or rename output (prox_sensor_DVRT.elf)
08:32 - Ctrl Shift P → MPLAB Data Visualizer → Open DVT
09:12 - Load launch.json → Start DV Runtime streaming
09:55 - Browse symbols → Auto-find proximity_value, frame_count
10:31 - Add to plot → Live read/write variables (reset frame count to 0!)
11:15 - Add Debug IO → Real-time control from PC
11:42 - DV Runtime lets you tweak timing at runtime (see user guide)
12:11 - Wrap-up: Full multi-config flow in VS Code MCC Melody
To view this video, please click manage cookies below and accept functional cookies.
{"SalesForceSecurePath":"https://microchip.my.salesforce-scrt.com","EmbeddedServiceName":"Messaging_For_Microchip","SalesForcePath":"https://microchip.my.site.com/ESWMessagingForMicrochi1755319480924","AgentAvailableHeader":"No problem. Chat with our engineering experts or schedule a call that's convenient for you.","ScheduleCallUrl":"https://microchip.my.site.com/schedulemeetingportal/s/","SalesforceOrgId":"00Do0000000KAkK","JsUrl":"https://microchip.my.site.com/ESWMessagingForMicrochi1755319480924/assets/js/bootstrap.min.js"}