Introduction to Microcontrollers Flashcards

(30 cards)

1
Q

What is a microcontroller?

A

A compact computer system on a single chip containing a CPU, memory, and peripherals for embedded applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an embedded system?

A

A hardware and software system designed to perform one dedicated task under constraints like power, speed, and reliability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give examples of microcontroller uses.

A

Appliances, cars, robotics, sensors, smart devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which microcontroller does the Arduino Uno/Nano use?

A

ATmega328P.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the clock speed of the ATmega328P?

A

16 MHz.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How much Flash does the ATmega328P have?

A

32 KB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How much SRAM does the ATmega328P have?

A

2 KB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How much EEPROM does the ATmega328P have?

A

1 KB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Flash memory used for?

A

Storing program code (non-volatile).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is SRAM used for?

A

Variables, stack, temporary data (volatile).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is EEPROM used for?

A

Persistent storage of small data values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the Fetch–Decode–Execute cycle?

A

The CPU process: fetch instruction, decode it, then execute it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Harvard architecture?

A

Separate program and data memory for simultaneous access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Von Neumann architecture?

A

Program and data share the same memory and bus.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which architecture does the ATmega328P use?

A

Harvard architecture.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How many general-purpose registers does the ATmega328P have?

A

32 (R0–R31).

17
Q

What is the SREG register?

A

Status Register containing CPU flags such as Zero, Carry, Negative, Overflow.

18
Q

What does the Zero (Z) flag represent?

A

An operation resulted in zero.

19
Q

What does the Carry (C) flag represent?

A

A carry or borrow occurred in arithmetic.

20
Q

What is the stack used for?

A

Function calls, return addresses, local variables, interrupt handling.

21
Q

Which register controls the stack?

A

Stack Pointer (SP).

22
Q

What does DDRx control?

A

Data Direction Register – sets pin as input (0) or output (1).

23
Q

What does PORTx do?

A

Sets output value or enables input pull-up resistors.

24
Q

What does PINx do?

A

Reads the logic level present on the input pins.

25
Name the main I/O ports on the ATmega328P.
Port B, Port C, Port D.
26
What is the purpose of the ADC?
Converts analog voltages into digital values (10-bit).
27
What are timers used for?
Delays, counting events, PWM generation.
28
What communication interfaces does the ATmega328P support?
USART, SPI, I2C (TWI).
29
How can microcontroller power consumption be reduced?
Sleep modes, lowering the clock speed, disabling unused peripherals.
30
Why is reliability important in embedded systems?
They often run continuously and unattended, so failures can be critical.