Introduction To Microcontrollers Flashcards

(29 cards)

1
Q

Microcontroller vs Microprocessor

A

Microprocessor: Just the CPU.
Microcontroller: CPU + Memory + Peripherals.

https://sem2.rezafara.com/Microcontroller_1/week1/images/slide15.png

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

What can we use I/O ports for? Let’s say an 4 8-bit ports

A

For sensors and multiplexing

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

What does
RAM, ROM, GPIO, UART, SPI, I2C, ADC, DAC
stand for

A

-RAM: Random Access Memory
- ROM: Read-Only Memory
- Flash: Flash Memory (a type of EEPROM)
- GPIO: General-Purpose Input/Output
- UART: Universal Asynchronous Receiver/Transmitter
- SPI: Serial Peripheral Interface
- I2C: Inter-Integrated Circuit
- ADC: Analog-to-Digital Converter
- DAC: Digital-to-Analog Converter:

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

The Vertically Integrated (Proprietary) Model

A

A single company controls the entire stack: CPU design, peripheral integration, chip manufacturing, and sales. This creates a self-contained ecosystem with proprietary tools and architectures

Examples: Microchip PIC and Atmel AVR

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

The ARM Ecosystem (IP Licensing)

A

ARM designs processor cores and licenses them to other companies. These companies then build unique microcontrollers around the licensed core.

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

The Programming Hierarchy

A

Modeling languages
Customer > Object-oriented languages > Procedural languages > Assembler languages > Machine code

https://sem2.rezafara.com/Microcontroller_1/week1/images/slide19.png

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

What is an Embedded System?

A

An embedded system is a specialized computer system; a combination of a processor, memory, and input/output peripherals that has a dedicated function within a larger mechanical or electrical system.

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

SIMPLE EMBEDDED SYSTEM
Describe:
- Primary goal
- Examples
- Software stack
- User interaction
- Resources

A
  • Primary goal: Perform one specific task reliably and repeatedly.
  • Examples: Arduino, Refrigerator Controller, Car Engine Control Unit (ECU), Electric Toothbrush
  • Software stack: Hardware Firmware (That’s it!)
  • User interaction: Often no direct user interaction. May have a single button or sensor input.
  • Resources: Highly Constrained (e.g., 2 KB RAM, 32 KB Storage)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define “Firmware”

A

A Hardware-Specific, Single Application computer software that provides low-level control for a device’s specific hardware. Its a permanent program, often stored in non-volatile memory (Flash, ROM, EEPROM).

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

Volatile and nonvolatile memory examples

A

Volatile: DRAM, SRAM. They lose data when powered off.
Non-volatile. Retains data without power
- ROM (Read-Only Memory) – Permanent, non-modifiable.
- Flash– Rewritable
- EEPROM– Electrically erasable

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

Microprocessors

A

A single chip containing the full central processing unit (CPU). It’s a clock-driven programmable device (determined by software) that processes binary data using ultra-fast storage (registers).

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

They are the communication pathways in a computer system.

A

Buses

https://sem2.rezafara.com/Microcontroller_1/week1/images/slide4.png

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

Bus that specifies the memory location to access.

A

Address Bus

https://sem2.rezafara.com/Microcontroller_1/week1/images/slide4.png

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

Bus that carries data between the CPU and memory.

A

Data Bus

https://sem2.rezafara.com/Microcontroller_1/week1/images/slide4.png

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

Bus that transmits control signals.

A

Control Bus

https://sem2.rezafara.com/Microcontroller_1/week1/images/slide4.png

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

A mechanism for hardware or software to request the CPU’s attention. It allows for efficient handling of asynchronous events.

A

Interrupts. The CPU suspends its current task, services the interrupt, and then resumes.

https://sem2.rezafara.com/Microcontroller_1/week1/images/slide9.png

17
Q

Multiplexer operation and mayor disadvantage

A

A multiplexer acts as a switching circuit that selects one of several inputs to send to the single output.

One major disadvantage of multiplexers is that instead of sampling each input value every frame, inputs to multiplexers must wait their turn to be sampled from the single input pin. Data may be lost during frames where the input is waiting to be read.

18
Q

Why Use Assembly?

A

Direct Hardware Control: To manipulate specific hardware registers that are not accessible from C.

Performance Optimization: Hand-crafting assembly for critical loops can be smaller and faster than compiler-generated code.

Bootloaders & Startup Code: The very first code a processor runs after power-on is often in assembly to set up the system before C code can run

19
Q

Core Components of a Microprocessor

A

Arithmetic Logic Unit (ALU)

Control Unit

Registers

20
Q

Arithmetic Logic Unit (ALU)

A

Performs arithmetic operations (addition, subtraction) and logical operations (AND, OR, NOT).

21
Q

Control Unit

A

Directs the flow of operations. It fetches instructions from memory, decodes them, and generates control signals to execute them.

22
Q

Types of Registers

A

General-Purpose Registers: Used to store data temporarily during program execution.

Special-Purpose Registers:
- Program Counter (PC): Holds the memory address of the next instruction to be executed.
- Instruction Register (IR): Holds the current instruction being executed.
- Accumulator: A primary register for storing the results of ALU operations.
- Status Register (or Flag Register): Contains flags that indicate the status of the processor and the results of operations (e.g., zero flag, carry flag, overflow flag).

23
Q

The Fetch-Decode-Execute Cycle

A

This is the fundamental process of a microprocessor

Fetch: The control unit fetches the next instruction from the memory location pointed to by the Program Counter (PC) and stores it in the instruction register.
Decode: The instruction it is decoded by the control unit to determine what operation is to be performed.
Execute: The control unit sends signals to the appropriate parts of the microprocessor (like the ALU) to perform the operation. The PC is then updated to point to the next instruction, and the cycle repeats.

24
Q

How are CPU, memory, and I/O devices connected?

A

By the address, data, and control buses.

25
Memory Mapping
The process of assigning a **unique address** to each **memory location**.
26
Address Decoding
The process of using the **address lines** to *select* a specific **memory chip**. This is typically done using logic gates (like AND, NAND, OR) or dedicated decoder ICs (like the 74LS138).
27
*Interfacing* RAM and ROM
The **RD** signal is used to **read** from memory, and the **WR** signal is used to **write** to **RAM**. ROM is *read-only*, so only the RD signal is connected.
28
**Memory**-Mapped I/O vs **I/O** Mapped I/O (or **Peripheral** I/O)
Memory-Mapped I/O: I/O devices are **treated as memory locations**. The **same instructions** used to access memory (LDA, STA) are used to access I/O devices. I/O-Mapped I/O (or Peripheral I/O): I/O devices have a **separate address space from memory**. **Special instructions** (IN, OUT) are used to access I/O devices. The 8085 supports I/O-mapped I/O.
29
Types of Interrupts
**Hardware** Interrupts: Generated by **external devices** (e.g., a keyboard, a timer) **Software** Interrupts: Generated by **executing** an **instruction** (e.g., RST 0 - RST 7). **Vectored vs. Non-Vectored:** Vectored: The processor **automatically jumps** to a specific memory location (the interrupt vector) for each interrupt. Non-Vectored: The **external device** must provide the address of the ISR. **Maskable vs. Non-Maskable:** Maskable: Can be *enabled or disabled* by the **programmer** using instructions like EI (Enable Interrupts) and DI (Disable Interrupts). Non-Maskable: *Cannot be disabled* (e.g., TRAP). It is used for **critical events** like power failure.