Uploaded October 2026 | Updated November 2026, 1 hour ago
In this video, we build our first AVR application with bare metal programming, using MPLAB Tools for VS Code. Starting from the datasheet and device header files, we configure the onboard USER LED as a GPIO output and blink the using direct register access and built-in _delay_ms() function.
Along the way, we cover how to:
- Locate LED0 and PB7 using the Kit Pinout Viewer
- Configure GPIO registers directly
- Use AVR header file macros
- Add timing delays with _delay_ms()
- Read datasheet clock settings and prescalers
- Build and flash firmware with the integrated debugger
This is a beginner-friendly introduction to bare-metal embedded programming with Microchip AVR devices and MPLAB extensions for VS Code.
Next video: using timers and interrupts instead of software delays.
Previous Bare Metal Series using MPLAB® X: youtube.com/playlist?list=PLtQdQmNK_0DQ8KGcZ1BOPv-3RDPvtqJ1H
MPLAB Tools in VS Code Video Playlist:
youtube.com/playlist?list=PLtQdQmNK_0DRncMlBVPL2JTDJnOpDdSWi
Check out our help guide for MPLAB® Tools in VS Code here: developerhelp.microchip.com/xwiki/bin/view/software-tools/ides/extensions/get-started
00:00 – Intro
00:21 – Overview
00:34 – Finding Onboard USER LED
1:49 – Reminders from the Documentation
2:25 – Setting up GPIO for LED
3:11 – Toggle the LED
3:38 – How to add the delay
3:59 – Setting up the _delay constants
4:21 – Referencing Datasheet for oscillator values
5:29 – calculating our constant
6:12 – Building and programming the device
7:14 – Outro
In this video, we build our first AVR application with bare metal programming, using MPLAB Tools for VS Code. Starting from the datasheet and device header files, we configure the onboard USER LED as a GPIO output and blink the using direct register access and built-in _delay_ms() function.
Along the way, we cover how to:
- Locate LED0 and PB7 using the Kit Pinout Viewer
- Configure GPIO registers directly
- Use AVR header file macros
- Add timing delays with _delay_ms()
- Read datasheet clock settings and prescalers
- Build and flash firmware with the integrated debugger
This is a beginner-friendly introduction to bare-metal embedded programming with Microchip AVR devices and MPLAB extensions for VS Code.
Next video: using timers and interrupts instead of software delays.
Previous Bare Metal Series using MPLAB® X: youtube.com/playlist?list=PLtQdQmNK_0DQ8KGcZ1BOPv-3RDPvtqJ1H
MPLAB Tools in VS Code Video Playlist:
youtube.com/playlist?list=PLtQdQmNK_0DRncMlBVPL2JTDJnOpDdSWi
Check out our help guide for MPLAB® Tools in VS Code here: developerhelp.microchip.com/xwiki/bin/view/software-tools/ides/extensions/get-started
00:00 – Intro
00:21 – Overview
00:34 – Finding Onboard USER LED
1:49 – Reminders from the Documentation
2:25 – Setting up GPIO for LED
3:11 – Toggle the LED
3:38 – How to add the delay
3:59 – Setting up the _delay constants
4:21 – Referencing Datasheet for oscillator values
5:29 – calculating our constant
6:12 – Building and programming the device
7:14 – Outro










