Bare Metal Programming in VS Code – Basic Bare-Metal Application @MicrochipDeveloperHelp
Bare Metal Programming in VS Code – Basic Bare-Metal Application  @MicrochipDeveloperHelp
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
Bare Metal Programming in VS Code – Basic Bare-Metal ApplicationDiagnostic of SmartDebug utility for DDR interfacesMicrochip CMSIS Solution – Installation, Creating a CMSIS VS Code® Profile & Blinking a LEDPhase NoiseSAMA5D2 Secure Boot (Part 2): Generating and Writing Customer Keys Using Secure SAM-BA® Cipher ToolProvisioning a SAMA7D65 MPU to Boot from NAND Using the SAM-BA®In-System Programmer (ISP)MPLAB® Harmony in VS Code®: Importing and Upgrading MPLAB® Discover ProjectsSecure Gateway Architecture for 10BASE-T1S Client Networks With AWS® CloudIntro to Bare Metal Programming - Episode 14: Final Project - Part 1Linux® Ultra-Fast BootSchematic Design Entry using SmartDesign in Libero® SoCImplementing Multizone Security In RISC-V Applications
Microchip Developer Help |

Bare Metal Programming in VS Code – Basic Bare-Metal Application

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER