Module 2 - Introduction to AVR Assembly
1. Introduction to AVR Assembly Language
Assembly is a low-level programming language that allows manipulation of every bit in memory, res...
2. ATmega328P Hardware & Memory Architecture
A. Memory Map The ATmega328P memory map provides information on how the Microcontroller Unit (MCU...
3. Input/Output (I/O) Programming
On the Arduino Uno (ATmega328P), digital I/O is controlled through Port B, Port C, and Port D. Ea...
4. Assembly Integration with Arduino IDE
To combine Assembly with Arduino C++ code, the extern "C" directive is used in the .ino file and ...
5. AVR Assembly Instruction Set
Operand Notation Before diving into the instructions, here are the common operand symbols used: ...
6. Status Register (SREG)
The Status Register contains flags that indicate the results of arithmetic/logic operations. This...
7. Delay Implementation Without Library
Delays can be created using nested loops that consume a certain number of clock cycles. Delay Cal...
8. Complete Program Examples
A. Blink LED #define __SFR_OFFSET 0x00 #include "avr/io.h" .global main main: SBI DDRB, 5 ...