Microchip University

Video introduction to MPLAB X IDE. Login first.

Note that the device used is a PIC and not an AVR or SAM. I used an ATmega328P XPlained Mini curiousity development module instead.

You may not be able to participate fully in the demos but you can still familiarize yourself with the IDE button functions.

Download MPLAB X IDE and Documentation

You'll need to install the integrated development environment (IDE) before you start any of the exercises for the course listed above.

MPLAB X Installation Instructions


You will also need to download and install both the XC8 and XC16 Compilers; the MPLAB X IDE installation will only tell you to install the SC16 compiler. Here, you can find both:

The second weblink (adjacent)

 can be confusing when it comes to installing the lab exercise files.

Ultimately you want the Lab01 folder under C:\MTT

Reboot your PC.

The next time you start up the app and open the first project, Lab01.X, you may be prompted to update the content: accept it.

C in an Embedded Environment

The training module assumes some exposure to C but not a lot.

I'd recommend you refresh your C knowledge with this module prior to doing anything else.

Download Exercise Files


Lab Exercise 1 will have you download the needed exercise files and recommends dropping them into a new folder like C:\MTT.

Intro to Atmel Studio with ATmega328P



#2 Intro to ATmega328P Xplained Mini


#3 First ATmega328P Project in MPLab X

Code used with video #3

#1. If you have the ATmega328P Xplained Mini evaluation kit ($15.17us), then you can familiarize yourself with using it while working with Atmel Studio when reviewing the video in the link.

#2. No, the app  Atmel Studio 7 is not MPLab X but it's close.

#3. The MPLab X v5 I.D.E. is used in the third link - a video. He does go into looking at port bits using the ATmega328P Simulator.

Introduction to C

and Assembler on the AVR

Part C1: Intro to C on the AVR

Part C2: Intro to C Time Delays on the AVR


Part A1: Intro to Assembler on the AVR

Part A2: Intro to Assembler on the AVR

Part A3: Intro to Assembler on the AVR

Part C1 video is strictly theory with no hands-on.

If you're going to use the book/eBook THE AVR MICROCONTROLLER AND EMBEDDED SYSTEMS, it will start with 6 chapters of assembly language before it gets into C language. It might be a good idea to watch the videos A1 through A3 first.

THE AVR MICROCONTROLLER AND EMBEDDED SYSTEMS Using Assembly and C Second Edition (Based on ATmega328 and Arduino Boards) Kindle eBook or Paperback

This book is the reference source for the training videos in the row above.

Just starting to review the Kindle eBook...

Topic Comments

First ATMEGA328P Project in MPLAB X:


Atmel Programming Tutorial 1 - 1st Programming and Blink a LED:

Intro to Atmel Studio 7 and Atmel ICE.

Atmel Programming Tutorial 2 - Fuses and Using an External Oscillator:

Directions to change microcontroller speed fuse.

Atmel Programming Tutorial 3 - Bit Manipulation and Digital Inputs:


Atmel AVR C - The 3 Most Common Registers Explained.pdf


C Microcontroller Bit Manipulations Explained.pdf

DDRx sets the direction: 0 = in, 1 = out.

If DDRx is set for input, set corresponding PORTx bit to 1 for pullup resistor, 0 for none.

If DDRx is set for output, set PORTx bit to 0 for low output or 1 for high output. 16 Atmel Programming Tutorials.

ATMega328P Register Bit Manipulation:


Pages 233 to 244 of this book

Bit Manipulation Cheat Sheet.pdf

Syntax and Structure of C:




Updated 2024-01-22 @ 8am

Queries/Requests? or