MCC Melody in VS Code®: I2C Proximity Ex.1 - Polled + Printf

Опубликовано: 24 Июль 2026
на канале: Microchip Developer Help
209
4

Getting Started with MCC Melody in VS Code® (for PIC16/PIC18/AVR Development) Playlist:
   • Getting Started with MCC Melody in VS Code...  

Link to Part 2:    • MCC Melody in VS Code®: I2C Proximity Ex. ...  
Link to Part 3:    • MCC Melody in VS Code®: I2C Proximity Ex. ...  

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 first of these on hardware, using the Curiosity Nano Explorer. We configure I2C Host, the UART for printf, as well as adding a LED, and debug IO – then build, flash, and verify via Data Visualizer.

Timestamps:
00:00 - Recap: 3 MCC 3 MPLAB project configs from prior videos
00:43 - Ctrl Shift P → Launch MCC → See all 3 configs (printf, streamer, runtime)
01:00 - Start with Polled Printf config
01:17 - Add I2C host (only 1 on device) → Connect to Explorer bus (RV24 SDA, RB1 SCL)
02:27 - Rename I2C → Polled mode → No interrupts
03:12 - Add Delay driver LED (RF3 output)
03:47 - Config changes persist across visualizations (printf vs streamer)
04:17 - UART setup: RF0 TX, RF1 RX → 115200, redirect printf, interrupt off
05:16 - GPIO: RB4 debug IO (tied to switch)
05:50 - Generate code → 253 files, copy I2C host example snippet
06:53 - Review polled task loop (wait I2C_Host_Tasks())
07:19 - Clean & build → Success
07:39 - Debug: Auto-detect Curiosity Nano → Launch JSON option
08:12 - Data Visualizer → 115200 terminal → Live proximity data!
08:25 - Run → Sensor works, LED toggles, printf output confirmed
08:30 - Next: Data Streamer config (coming up)