
Master bare metal embedded programming on the ATMega328, building from scratch with C and assembly, configuring fuse bytes, bootloaders, and serial communication.
Explore the four-part course structure that guides you from tools and build automation to board bring-up on ATmega328, covering architecture, memory model, interrupts, and embedded C with assembly.
Set up your bare metal embedded development environment using Windows or Linux, open source tools, and a terminal emulator to communicate with ATmega328 on the Arduino Uno.
Discover how a C program executes on an avr microcontroller, how memory is organized and managed, and how the ATmega328 architecture, registers, status bits, and pipeline govern runtime behavior.
Explore the ATmega328 architecture, including flash program memory, EEPROM, and SRAM, with separate program and data buses enabling CPU pipelining, plus timers, watchdog, SPI, TWI, USART, and ADC.
Explore the atmega328p architecture: an avr core with an alu, 32 eight-bit registers, program memory and flash, program counter, instruction register and decoder, status register and indirect addressing.
Understand the AVR stack and stack pointer, including push and pop operations for local variables and return addresses for subroutines and interrupts, on a downward-growing stack with 11-bit wide sp.
Explore how the program stack stores local variables and return addresses, and examine stack frames through a practical C program that prints stack contents and demonstrates stack pointer behavior.
Learn how software and hardware interrupts trigger an AVR microcontroller, how interrupt vectors and interrupt service routines work, and how global and per-interrupt enables control response time and stack handling.
Master the AVR memory map, covering data memory, program memory, and EEPROM, with memory-mapped registers and extended io. Understand bootloader versus application sections and access with SBM, in, and out.
Explore the AVR instruction set, a reduced instruction set computer with 16-bit encoding, covering arithmetic, logical, data transfer, bit test, and MCU control, and learn about its pipelining.
Review the AVR microcontroller architecture and instruction set, understand memory organization (program and data memory), and explore the status register, pipeline behavior, and stack frame management for efficient bare-metal programming.
Learn the C programming language fundamentals and implement simple C programs by exploring keywords, operators, statements, and control constructs, reinforced with practical exercises.
Discover the C language as a middle level language blending high and low level features. Learn how programs organize into functions with the main function and a multi-file structure.
Understand identifiers in C, naming variables and functions with letters, digits, and underscores, honoring case sensitivity and conventions. Learn about reserved keywords and best practices like lowercase names and underscores.
Explore primitive C data types, memory representation, and type qualifiers like signed, unsigned, long, and short. Learn how arrays are defined and initialized, including multi-dimensional arrays and array indexing.
Explore constant types in C, including integer, floating point, character, and string constants, and learn how declaration, expression, control, and compound statements organize code into a functional program.
Explore how operators, precedence, and associativity govern expression evaluation, covering unary, binary, relational, logical, and conditional operators, plus assignment and automatic type conversion.
Explore control statements in C, including if else, switch, loops (for, while, do-while), break, continue, and goto, with practical examples like the sum of squares of digits.
Explore functions as self-contained units that modularize logic in C programs, covering return types, void returns, arguments, prototypes, by-value parameter passing, and return statements governing caller–callee flow.
Develop hands-on with embedded C programming by mastering the program structure, data types, operators, and statements, control flow via conditionals, and modularizing logic with functions through practical implementations.
Elevate your embedded coding skills by exploring advanced C concepts and AVR assembly, including rate manipulation, storage class and scope, macros, inline functions, and cross-language programming.
Explore bitwise operations in C, including ones complement, and, or, xor, and left and right shifts, with bitwise assignment and precedence for embedded peripherals.
Learn bitwise operations in AVR assembly, including and, or, eor, shifts, rotates through carry, and complement, updating zero, negative, overflow, and carry flags across 32 general purpose registers.
Explore C storage classes including automatic, external, static, and register, and learn how scope, permanence, and the declaration location determine variable and function accessibility in embedded C.
Examine the volatile keyword and how it prevents compiler optimization for variables that may change outside the program, with implications for memory-mapped data in embedded avr microcontrollers.
Explore macro definitions and constants in C, including preprocessor steps, multi-line and parameterized macros, and the trade-offs between readability, compilation, and potential bugs.
Explore inline functions versus macros in avr c programming: how inlining reduces call overhead, affects code size, and how to force inline with always_inline using delay and busy_wait examples.
Explore how C uses pointers to access memory, including the address and indirection operators, and perform pointer arithmetic; compare passing by value and by reference, and examine pointers with arrays.
Explore cross language programming by mixing C and assembly in an avr embedded project, learn calling conventions, register usage, and stack management for passing parameters and return values.
Blend inline assembly in C with assembly instructions using operands, constraints, and clobbers for precise hardware control. Use it to initialize pins, implement delays, and perform division with registers.
Advance your bare metal embedded programming by mastering C and assembly, including macros and inline functions, and applying assembly skills to time-critical low-level drivers.
Explore interrupts on the AVR uC, including interrupt vectors, vector table placement via linker scripts, and interrupt service routines for int0, int1, and bin change interrupts, with hands-on exercises.
Learn how interrupts signal events, suspend the microcontroller’s task, and use enable bits, priority, and the interrupt vector table to trigger the appropriate interrupt service routine.
Learn to instruct the linker to place the interrupt vector table at address 0 with a custom linker script, mapping dot text, dot data, and dot vss sections.
Learn how the linker script places the interrupt vector table and reset ISR in program memory using naked C functions and precise section attributes.
Learn how to configure external interrupts on an AVR microcontroller, implement an interrupt service routine for interrupt 0 and 1, manage priority, and handle edge or level triggering with debounce.
Learn to implement pin change interrupts on an AVR uC, configure pcicr and pcmsk, and write an interrupt service routine to respond to pin changes.
Explore how interrupts are handled in AVR bare metal programming, including interrupt service routines, interrupt vector tables, boot-to-main flow, and the roles of the C compiler and linker.
GPIO section introduction
You will learn about the General Purpose Input Output port available in the ATmeag328 uC. You will also learn about the registers used to configure, read and write the GPIO ports.
You will learn how to configuration GPIO ports and understand read and write operation.
You shall interface LEDs and button switches with the GPIO pins and implement a program to control the LEDs using the switches.
You will interface the 4x4 keypad with the development board and implement the driver program.
You will interface the 4x4 keypad with the development board and implement the driver program.
AVR microcontrollers have internal EEPROM for semi-permanent data storage. Like flash memory, EEPROM can maintain its contents when electrical power is removed. The ATmega328/P contains 1K bytes of EEPROM memory. EEPROM stands for Electronically Erasable Programmable Read Only Memory which is a type of non-volatile memory used in various electronic devices to store relatively small amount of data.
In this lesson, you will learn about the different programming operations of the EEPROM memory.
In this lesson, you shall implement the EEPROM driver. The driver shall support all the three operating modes those are Erase & write, Erase only and Write only. It exposes four functions to be consumed by the application module. These functions are eeprom_init(), eeprom_read(), eeprom_write() and eeprom_erase().
In the previous lesson, you defined the EEPROM registers, the function prototypes and implemented the functions eeprom_init(). In this lesson, you shall continue with the remaining implementation.
In the previous lesson you developed EEPROM driver and tested its all the three operations. In this lesson, you shall learn about interrupt based EEPROM driver. We shall modify the earlier implementation to incorporate the interrupt triggered write operation.
In the earlier lesson, we disabled the EEPROM Ready Interrupt bit in the EECR register. If the bit is set, the EEPROM ready interrupt will be triggered constantly when EEPE bit is cleared. That means when the program starts the uC will be executing EEPROM Ready interrupt service routine only and the code in main program is never executed. Note this point, it is important while designing interrupt based EEPROM driver.
Set up the GNU toolchain and AVRDUDE to flash the ATmega328 and test the development board. Compile the first embedded program and automate builds with make for future projects.
Explore the bare metal ATmega328 development environment, including the development platform, tools and utilities, and development board, with the GNU toolchain, make, avrdude, and terminal emulators for flashing and debugging.
Set up the required tools, utilities, and drivers for bare metal programming on the ATmega328 micro-controller, following Windows or Linux handouts to install compiler toolchain, Tera Term, and USBASP driver.
Discover the base circuitry for the ATmega328 development board, including the reset circuit, 16 mhz crystal with 22pF capacitors, and power wiring with red and black wires.
Learn how to use an in-circuit programmer to flash an ATmega328 in a bare-metal setup, including wiring, USB ASP usage, and the four data lines MOSI, RESET, SCK, MISO.
Program on-chip flash and eeprom, plus fuse and lock bits, on ATmega328 with avrdude in command line or interactive mode, using config, part, port, and -U memory operations.
Program the ATmega328 fuse and lock bytes to secure on-chip memory and configure bootloader and clock settings, using efuse 0xfd, hfuse 0xde, lfuse 0xff with AVRDUDE and usbasp.
Learn how a bootloader in the bootloader section of flash memory enables programming an AVR uC over a serial channel, then flash the board with avrdude to blink an LED.
Learn to interface an FTDI USB-serial adapter with an ATmega328 bare-metal board, configure power, wire Vcc and ground and TX/RX lines, and flash a program using an Intel hex image.
Learn the two-stage build process for AVR microcontrollers: compile to object files with GCC, then link to an executable and flash via Intel hex.
Explore how to automate embedded builds with make and makefiles, defining targets, prerequisites, and recipes to compile object files, link them into executables, generate hex images, and clean projects.
Enhance build automation for avr bare-metal projects by making the makefile portable, maintainable, and extensible through centralized variables managing C and assembly sources.
Set up the development environment, install tools, and wire the circuitry to the development board; use the in-circuit programmer and USB adapter to flash the program and explore make-based automation.
drive red and green leds on avr microcontroller with modulo logic; red on for multiples of 7, green for multiples of 30, in a 1-65535 loop with 0.5 s delays.
Develop a bare-metal AVR uC program that blinks red, green, and white LEDs via serial input, using modular functions, initialization, interrupt handling, and serial I/O over a USB serial adapter.
Implement an optical encoder on a bare-metal avr microcontroller, encoding 62 alphanumeric characters across six outputs to drive indicators, using the development board and serial adapter per the handout.
Implement and test a program that reads the status register, performs signed addition and subtraction, and displays flag states before and after operations using serial input and C language constructs.
Examine the stack frame of functions by implementing a C program, calling div_long to divide unsigned long, returning quotient via a pointer and printing the frame with print_espie.
Convert an unsigned hexadecimal number to binary coded decimal using a 16-bit variable. Implement the conversion in assembly with C, reading hex digits from the serial console and printing BCD.
Implement a program to add two unsigned binary coded decimal numbers using 16-bit BCD. Read digits from the serial console, perform inline assembly language, and print the sum.
Implement an external interrupt zero on an Atmega328 microcontroller. Create an ISR on the falling edge to drive LCD on pin 4 and LED on pin 15 using provided code.
Learn to implement a pin change interrupt on an AVR microcontroller, handling PCINT12 and PCINT13 with edge-triggered detection, and map to LEDs and an LCD while validating correct edge behavior.
Explore embedded systems as dedicated computer hardware and software powered by a microcontroller, including hard real time and soft real time classifications from vending machines to anti-lock brakes.
A microcontroller is a complete computer system on a chip, unlike general purpose microprocessors, and includes CPU, memory, I/O, timers, ADC, DAC, and serial interfaces for embedded applications.
Examine microcontroller processor architecture by contrasting risc and cisc instruction sets and memory organization, including harvard and von neumann designs, and review pipelining implications.
>>> Your Search for In-depth Embedded System Programming Course ends here!! <<<
If you want to know how to kick start embedded programming skill and level up your career, read on. Hello, my name is Arabinda Verma and I have spent more than 15 years in research & software development, trained hundreds of graduates in programming and software engineering. When I ask students to tell me what their biggest challenge while learning Embedded Programming is, they all say the same thing: “Fundamentals are not clear.” To really become comfortable with embedded systems, students need guidance, mentorship, and practice. This isn’t always the case in programming schools and universities despite the high investments in time and money that they require.
This made me design this course, which will take you from the basics of embedded training to the advanced microcontroller architectures.
Why this course?
Embedded systems might appear complex to newcomers or even experienced programmers. With a different pedagogic approach, this course will help you become familiar with different aspects of this area, which will prove particularly helpful regardless of your experience in programming.
The course helps you build a sound understanding of C & Assembly programming. It discusses the architecture of the ATMega328 microcontroller and how software and hardware interact. You will gain here foundational knowledge, applied skills, hands-on programming exercises, proper guidance and mentorship.
I strongly believe that even the most complex contexts can be broken down to be assimilated by all students, regardless of their level.
Plus a 30 DAY MONEY BACK GUARANTEE if you're not satisfied for any reason.
What you will gain from this course?
You will rig-up the development board using the basic electronic components like capacitors, resistors, LEDs, microcontroller etc. And interface the development board with PC through USB-serial adapter and in-circuit programming. You shall setup the development environment on PC, configure the microcontroller and flash the bootloader.
You will learn memory management through the C compiler, microcontroller architecture, instruction execution, interrupt handling and cross-language programming. You shall implement programs using the C and Assembly programming languages and implement pre-main functionalities to bring up the development board. These topics not only introduce you to the programming but also prepare you to deal with the ecosystem of programming an embedded system.
What other students are saying about this course?
Lots of students have already taken the right decision by enrolling in the course. Following is what they are saying.
"........ Arabinda Verma has done an excellent job of making the basic of microcontroller for anyone who is struggling in developing embedded concepts. Furthermore, after completing internal's and peripherals very clear through his tutorials. It serves as a good foundation course the course I am more confident in writing my own drivers for the microcontroller. For the best result, I would suggest to purchase any hardware board of AVR architecture and implement the code discussed in the tutorials. I am also looking forward to Arabinda's other tutorial. Happy Learning :)" -Yousuf
"Awesome course for beginners to build foundation of embedded system and C programming. The best part of the course is to build the development board on the breadboard and run/test programs........." - Akash
"Very useful course to learn and understand embedded systems." - Ajaganna
Planned updates to this course
On the demand of our student’s we are continuously bringing updates that could help you more in this topic. Updates to this course are life time free for enrolled students Let’s talk more about this in the discussions section inside this course.
Update 4 (5th, Feb'19): Added EEPROM programming & driver development.
Update 3 (22nd, Jan’19): Added a section for programming challenges solution.
Update 2 (15th, Jan’19): Added section on GPIO
Update 1 (1st, Jan'19): Restructured the course.
My promise!
Now you don’t need to spend hours finding out a right course, instructor, study material for embedded programming. If you are in any way not satisfied, for any reason, you can get a full refund from Udemy within 30 days. The course comes with a ”No questions asked money back guarantee for 30 days". So, there is nothing for you to lose.
Enroll today and jump into the fascinating world of embedded systems to gain top skills and knowledge in this so-promising area of programming.