Difficulty: Easy & Basic
A digital input floats when a switch is open. What gives it a defined high level?
A Series capacitor
B Pull-up resistor
C Heat sink
D Crystal oscillator
Answer: B. Pull-up resistor. A pull-up biases the pin high when the switch is not driving it.
One button press creates several rapid transitions. What should be applied?
A Overclocking
B Quantization
C Debouncing
D Multiplexing
Answer: C. Debouncing. Debouncing filters the mechanical contact’s repeated transitions.
In an asynchronous UART frame, what marks the beginning?
A Start bit
B Stop bit
C Parity bit
D Address bit
Answer: A. Start bit. The receiver detects the start bit before sampling data bits.
Which optional UART field can detect some bit errors?
A Chip select
B Clock divider
C Reset vector
D Parity bit
Answer: D. Parity bit. Parity provides a simple check on the transmitted data bits.
Several SPI devices share a clock. What selects one device?
A ADC reference
B Watchdog output
C Pull-up resistor
D Chip-select signal
Answer: D. Chip-select signal. The controller asserts a chip-select line for the intended peripheral.
Why are pull-up resistors used on I2C lines?
A Open-drain signaling
B Analog conversion
C Clock multiplication
D Firmware encryption
Answer: A. Open-drain signaling. Open-drain participants pull lines low; resistors restore the high level.
For an analog output from a digital value, which peripheral is suitable?
A ADC
B CRC
C DAC
D UART
Answer: C. DAC. A digital-to-analog converter produces an analog output from a code.
Which circuit indicates whether a voltage exceeds a reference?
A Flash controller
B UART
C Timer prescaler
D Comparator
Answer: D. Comparator. A comparator compares input and reference voltages.
To timestamp an external pulse edge, use which timer feature?
A Input capture
B Output compare
C Flash erase
D Serial parity
Answer: A. Input capture. Input capture latches the timer value at a detected edge.
What does a timer prescaler change?
A Memory size
B Counting rate
C Pin voltage
D Program language
Answer: B. Counting rate. A prescaler divides the clock supplied to the timer.
Supply voltage falls too low for reliable operation. Which circuit detects this?
A DMA controller
B Brown-out detector
C DAC
D Shift register
Answer: B. Brown-out detector. Brown-out detection monitors supply voltage and can force reset.
A peripheral moves samples to RAM without CPU copying each item. What is used?
A DMA
B PWM
C GPIO
D PLL
Answer: A. DMA. Direct memory access transfers data with limited processor intervention.
Which event can wake a sleeping controller if configured?
A Enabled interrupt
B Source comment
C Constant declaration
D Unused function
Answer: A. Enabled interrupt. A permitted interrupt can resume execution from a sleep mode.
Why should an interrupt handler normally be brief?
A Increase flash wear
B Raise supply voltage
C Disable all timers
D Reduce response delay
Answer: D. Reduce response delay. Lengthy handlers delay other processing and interrupt response.
Software repeatedly reads a status flag until ready. What is this called?
A Preemption
B Bootloading
C Debouncing
D Polling
Answer: D. Polling. Polling checks the condition repeatedly rather than waiting for an event.
What model describes behavior through states and event-triggered transitions?
A Voltage divider
B Ring oscillator
C State machine
D Lookup table
Answer: C. State machine. A finite-state machine changes state in response to defined events.
Where are function return addresses commonly kept during nested calls?
A Flash image
B EEPROM
C Stack
D GPIO register
Answer: C. Stack. Call frames on the stack commonly retain return information.
Which region commonly supplies runtime dynamic allocations?
A Vector table
B Heap
C Boot ROM
D Pin register
Answer: B. Heap. A heap allocator provides blocks requested during execution.
How does a memory-mapped peripheral expose control registers?
A Audio frequencies
B Addressed memory locations
C Mechanical switches
D Optical pulses
Answer: B. Addressed memory locations. The processor accesses peripheral registers through assigned addresses.
Which startup setting can select a microcontroller’s clock source?
A UART parity
B ADC sample
C Task queue
D Configuration bits
Answer: D. Configuration bits. Device configuration bits often choose clock and other startup behavior.
What provides the time base for processor operation?
A Clock source
B Voltage sensor
C EEPROM cell
D Pull-down switch
Answer: A. Clock source. An oscillator or external clock supplies timing transitions.
Which build tool places code and data sections at target addresses?
A Oscilloscope
B Linker
C Logic probe
D Transducer
Answer: B. Linker. The linker resolves symbols and maps sections into the target memory layout.
To set one register bit without changing others, use what?
A Full reset
B Heap allocation
C Bit mask
D Parity frame
Answer: C. Bit mask. Masking selects the target bit while preserving unrelated bits.
Which software layer holds board-specific initialization and pin mapping?
A Board support package
B Application protocol
C Source archive
D Compiler optimizer
Answer: A. Board support package. A BSP adapts generic software to the board’s hardware.
What does a checksum primarily help detect?
A Processor temperature
B Motor torque
C Data corruption
D Memory capacity
Answer: C. Data corruption. A checksum compares computed values to reveal many accidental changes.