TBC 503: Microcontrollers - Rapid Recall Question & Answer Sheet

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/14

flashcard set

Earn XP

Description and Tags

Flashcards covering Units 1 and 2 high-priority questions on microcontroller introduction, architecture, programming, I/O interfacing, ADC, and PWM.

Last updated 3:29 AM on 9/29/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

15 Terms

1
New cards

What is a Microcontroller and what is its primary significance?

A microcontroller is a compact, self-contained single-chip microcomputer integrating a CPU, program memory (Flash/ROM), data memory (RAM), Timers, Interrupt Controller, and parallel/serial I/O ports on a single silicon die. Its significance lies in its ultra-low power consumption, economical cost, and ability to execute dedicated, real-time control operations 24/724/7 without external support ICs.

2
New cards

What are the primary differences between a Microprocessor and a Microcontroller?

A Microprocessor is a standalone CPU containing processing circuits (ALU, registers, control unit) without on-chip RAM, ROM, or I/O, requiring external support chips for general-purpose PC computing. A Microcontroller integrates CPU, RAM, Flash/ROM, and I/O ports on a single silicon chip for dedicated, low-power tasks. Differences are summarized by the mnemonic 'SCAM-BIP': Size, Cost, Architecture, Memory, Bus, I/O, and Power.

3
New cards

What is the difference between Harvard and Von Neumann Architecture?

Harvard Architecture uses physically separate memories and separate buses for program instructions and data, allowing simultaneous instruction fetching and data reading/writing. Von Neumann Architecture uses a single shared memory space and bus for code and data, causing the Von Neumann Bottleneck where instruction and data access cannot occur simultaneously.

4
New cards

What are the core components inside a microcontroller and their respective roles?

  1. CPU: Brain containing ALU (math and logic operations), Control Unit (instruction decoder), and Registers (Program Counter - holds address of next instruction; Stack Pointer - manages return addresses; Accumulator).
  2. Memory: Flash/ROM (non-volatile firmware storage), RAM (volatile runtime variables), and EEPROM (non-volatile user settings).
  3. I/O Ports & Timers: Bidirectional GPIO pins for sensors/LEDs; Timers for accurate delays and PWM.
5
New cards

How do PIC, AVR, and ARM microcontroller families compare in architecture, speed, and applications?

• PIC (Microchip): 8-bit RISC8\text{-bit RISC}, modified Harvard architecture, single accumulator (WREG), executes 11 instruction per 44 clock cycles; used in industrial PLCs and white goods (e.g., PIC16F877A). • AVR (Atmel/Microchip): 8-bit RISC8\text{-bit RISC}, modified Harvard, 3232 general-purpose registers, executes 11 instruction per 11 clock cycle; core of Arduino Uno (ATmega328P). • ARM (ARM Holdings IP): 32-bit RISC32\text{-bit RISC}, load-store Harvard architecture, ultra-high speed (tens to hundreds of MHz), lowest power per MIPS; used in smartphones, IoT gateways, and automotive ADAS.

6
New cards

What are real-world applications of microcontrollers in automotive, consumer, and industrial domains?

• Automotive: Engine Control Unit (ECU) for microsecond fuel injection and spark timing; Anti-lock Braking System (ABS) rapidly pulsing hydraulic brakes 3030 times/sec; Airbags deploying within 20 ms20\,ms. • Consumer: Microwave ovens scanning keypads and controlling magnetron relays; Washing machines modulating motor RPM. • Industrial: Robotic arms and CNC generating stepper/servo motor PWM pulses; PLCs sequencing factory conveyor actuators.

7
New cards

What are cross-compilers, assemblers, and linkers in microcontroller development tools?

• Cross-Compiler: A compiler running on a Host PC (x86) that generates executable machine code for a target microcontroller (AVR/ARM), necessary because microcontrollers lack RAM to compile locally. • Assembler: Translates human assembly mnemonics directly into binary opcodes (.obj). • Linker / Locator: Merges object files with runtime libraries and assigns physical memory addresses (.hex).

8
New cards

What are the advantages and limitations of Embedded C versus Assembly language?

• Embedded C: Features hardware-access keywords (e.g., sbit); offers high portability, fast prototyping, and high readability, with slight compiler memory overhead (used in 95%95\% of industry). • Assembly Language: Uses low-level processor mnemonics; delivers maximum execution speed and absolute minimum binary size, but has zero portability and tedious development (used for bootloaders and critical ISRs).

9
New cards

What is an Integrated Development Environment (IDE) and what are its key features and examples?

An IDE is a unified software application combining a source code editor, cross-compiler, assembler, linker, and debugger within a single GUI. Features include syntax highlighting, device selection databases, one-click build engines for Intel HEX files, and interactive debugging. Examples: Keil μVision\mu\text{Vision} (8051/ARM), MPLAB X (PIC), and Atmel Studio / Microchip Studio (AVR).

10
New cards

Why is an infinite loop like while(1) mandatory in microcontroller software?

Microcontrollers have no Operating System to return execution to when main() exits. If main() terminates, the CPU's Program Counter runs into uninitialized memory space, executing random garbage instructions and crashing the system. An infinite loop (while(1)) ensures the firmware executes continuously and reliably 24/724/7.

11
New cards

How is an active-high LED circuit designed and programmed in Embedded C?

• Hardware Circuit: MCU Pin P1.0 →\rightarrow [Anode LED Cathode] →\rightarrow [Resistor] →\rightarrow GND (0 V0\,V). Current-limiting resistor formula: R=VCC−VLEDI=5 V−2 V10 mA=300 to 330 ΩR = \frac{V_{CC} - V_{LED}}{I} = \frac{5\,V - 2\,V}{10\,mA} = 300\text{ to }330\,\Omega • Embedded C Program: Includes <reg51.h>, defines sbit LED = P1^0;, initializes LED = 0;, and toggles LED = 1; and LED = 0; inside a while(1) loop separated by delay_ms(500) calls.

12
New cards

What is the difference between a Software Simulator and an In-Circuit Debugger (ICD)?

• Software Simulator (e.g., Keil Simulator, Proteus): Pure software running on a PC that models CPU and peripheral behavior without physical hardware; fast and free, but timing is approximate and cannot test real electrical noise. • In-Circuit Debugger - ICD (e.g., PICkit, Atmel-ICE, ST-Link): Hardware probe interface using JTAG or SWD connecting PC to silicon on a PCB; runs at true crystal clock speed in real-time to detect physical hardware faults.

13
New cards

What is the purpose of a 10 kΩ10\,k\Omega Pull-Up Resistor and how is Switch Debouncing resolved?

• Pull-Up Resistor (10 kΩ10\,k\Omega): Prevents an unconnected input pin from entering a floating state by pulling it reliably to Logic 1 (+5 V+5\,V) when open, while pressing the button pulls it to GND (Logic 0). • Switch Debouncing: Resolves mechanical contact bounce (10 to 20 ms10\text{ to }20\,ms) by adding a 20 ms20\,ms delay (delay_ms(20)) in software before re-confirming the button state.

14
New cards

How does a 10-bit10\text{-bit} ADC operate and how are its step size and conversion calculated?

A 10-bit10\text{-bit} ADC samples continuous analog voltages (0 V to 5 V0\,V\text{ to }5\,V) and converts them into 210=1024 levels2^{10} = 1024\text{ levels} (digital values 0 to 10230\text{ to }1023). • Step Size Formula: Resolution=VREF1023=5.0 V1023≈4.88 mV\text{Resolution} = \frac{V_{REF}}{1023} = \frac{5.0\,V}{1023} \approx 4.88\,mV • Conversion Formula: Digital Value=(VINVREF)×1023\text{Digital Value} = \left(\frac{V_{IN}}{V_{REF}}\right) \times 1023 (e.g., for VIN=2.5 VV_{IN} = 2.5\,V, output =511= 511).

15
New cards

What is Pulse Width Modulation (PWM) and how are Duty Cycle and Average Voltage calculated?

PWM simulates continuous analog outputs by rapidly switching a digital pin between 0 V0\,V and 5 V5\,V and modulating the Duty Cycle. • Duty Cycle Formula: Duty Cycle (%)=(TONTPERIOD)×100%\text{Duty Cycle (\%)} = \left(\frac{T_{ON}}{T_{PERIOD}}\right) \times 100\% • Average Voltage Formula: VAVG=VCC×Duty CycleV_{AVG} = V_{CC} \times \text{Duty Cycle} (e.g., at 50%50\% duty cycle with 5 V5\,V, VAVG=2.5 VV_{AVG} = 2.5\,V).