Module 4 - Arithmetic
From memory access, addressing modes, the SREG, to arithmetic operations in AVR assembly,
1. Memory in AVR Architecture
AVR Architecture is an 8 bit single-chip RISC microcontroller with a modified Harvard Architectur...
2. Addressing Modes
Due to how the AVR Architecture and its memory are organized, AVR instructions, including arithme...
3. The Status Register
The Status Register (SREG) is a special 8 bit register that saves different operational status fl...
4. Advanced Arithmetic Operations
As a refresher, here are some fundamental AVR arithmetic and logical instructions. Mnemonic Op...
5. The Stack
The Stack is a memory section of the SRAM that follows First-In-First-Out (FIFO) principles. It i...
6. Printing Bytes as Hexadecimal Values
To easily debug and view numbers, we can create a subroutine that outputs numbers into serial. Si...
7. 𝔗𝔥𝔢 ℭ𝔬𝔡𝔢
#define __SFR_OFFSET 0x00 #include "avr/io.h" .global main main: RCALL SER_init LDI ZH, ...
8. References
“AVR ® Instruction Set Manual AVR ® Instruction Set Manual.” Available: https://ww1.microchip.com...