What is a microcontroller?
A compact computer system on a single chip containing a CPU, memory, and peripherals for embedded applications.
What is an embedded system?
A hardware and software system designed to perform one dedicated task under constraints like power, speed, and reliability.
Give examples of microcontroller uses.
Appliances, cars, robotics, sensors, smart devices.
Which microcontroller does the Arduino Uno/Nano use?
ATmega328P.
What is the clock speed of the ATmega328P?
16 MHz.
How much Flash does the ATmega328P have?
32 KB.
How much SRAM does the ATmega328P have?
2 KB.
How much EEPROM does the ATmega328P have?
1 KB.
What is Flash memory used for?
Storing program code (non-volatile).
What is SRAM used for?
Variables, stack, temporary data (volatile).
What is EEPROM used for?
Persistent storage of small data values.
What is the Fetch–Decode–Execute cycle?
The CPU process: fetch instruction, decode it, then execute it.
What is Harvard architecture?
Separate program and data memory for simultaneous access.
What is Von Neumann architecture?
Program and data share the same memory and bus.
Which architecture does the ATmega328P use?
Harvard architecture.
How many general-purpose registers does the ATmega328P have?
32 (R0–R31).
What is the SREG register?
Status Register containing CPU flags such as Zero, Carry, Negative, Overflow.
What does the Zero (Z) flag represent?
An operation resulted in zero.
What does the Carry (C) flag represent?
A carry or borrow occurred in arithmetic.
What is the stack used for?
Function calls, return addresses, local variables, interrupt handling.
Which register controls the stack?
Stack Pointer (SP).
What does DDRx control?
Data Direction Register – sets pin as input (0) or output (1).
What does PORTx do?
Sets output value or enables input pull-up resistors.
What does PINx do?
Reads the logic level present on the input pins.