What architecture family does the ATmega328P belong to?
The AVR 8-bit RISC microcontroller family.
What does RISC stand for?
Reduced Instruction Set Computer.
How many general-purpose registers does the AVR architecture have?
32 registers (R0–R31).
Why are AVR registers arranged in one register file?
To allow fast single-cycle arithmetic and logic operations.
What are the three 16-bit pointer registers?
X, Y, and Z.
What do pointer registers do?
Access data memory indirectly.
What memory organisation does the ATmega328P use?
Harvard architecture.
Where are program instructions stored?
Flash memory.
What memory stores variables and the stack?
SRAM.
What memory stores small non-volatile data?
EEPROM.
What is the width of the program counter?
16 bits.
What does the instruction decoder do?
Determines the CPU operations required for each instruction.
What does the ALU do?
Performs arithmetic and logic operations.
What does SREG contain?
Status flags (Carry, Zero, Negative, Overflow, Sign, Half-Carry, Bit-copy, Global Interrupt Enable).
What does the Global Interrupt Enable (I) flag do?
Enables or disables all maskable interrupts.
What does the Stack Pointer do?
Points to the top of the stack in SRAM.
What is the stack used for?
Return addresses, saved registers, local variables.
What are I/O registers?
Memory-mapped registers used to configure peripherals.
How wide is the ATmega328P data bus?
8 bits.
How wide is the program memory address bus?
16 bits.
What is memory-mapped I/O?
Assigning peripheral registers to addresses in the data memory space.
What are the three registers for each I/O port?
DDRx, PORTx, PINx.
What does DDRx control?
Pin direction (input 0, output 1).
What does PORTx do?
Outputs logic values or enables pull-ups.