Q.1 What is the primary purpose of a microprocessor in a digital system?
Perform arithmetic and logical operations
Store large amounts of data
Convert analog signals to digital
Generate power supply voltage
Explanation - A microprocessor contains the CPU that executes instructions, performs calculations, and controls the operation of the system.
Correct answer is: Perform arithmetic and logical operations
Q.2 Which of the following is NOT a typical component found on a microcontroller?
RAM
Flash memory
Graphics processor
I/O ports
Explanation - Microcontrollers usually contain memory, I/O, timers, and ADC, but they typically do not include dedicated graphics processors.
Correct answer is: Graphics processor
Q.3 In the 8051 microcontroller, which register holds the program counter?
ACC
PC
SP
PSW
Explanation - The PC (Program Counter) points to the next instruction address to be fetched from code memory.
Correct answer is: PC
Q.4 What type of addressing mode uses a fixed memory location in the instruction?
Immediate
Direct
Indirect
Register
Explanation - Direct addressing specifies an absolute memory address directly in the instruction.
Correct answer is: Direct
Q.5 Which microcontroller architecture is based on the ARM architecture?
PIC16F
ATmega328P
STM32F103
Intel 8051
Explanation - STM32 series are ARM Cortex-M based microcontrollers.
Correct answer is: STM32F103
Q.6 Which instruction in AVR assembly loads an immediate value into register R16?
LDI R16, 0xFF
MOV R16, 0xFF
LPM R16, 0xFF
LDD R16, 0xFF
Explanation - LDI (Load Immediate) loads a constant into an I/O register or general purpose register.
Correct answer is: LDI R16, 0xFF
Q.7 Which of the following is a characteristic of a RISC processor?
Complex instruction set
Large number of registers
Multiple clock cycles per instruction
Large code size
Explanation - RISC processors emphasize a small, simple instruction set and a large set of general-purpose registers.
Correct answer is: Large number of registers
Q.8 What is the function of the Watchdog Timer in a microcontroller?
To generate a periodic interrupt for timekeeping
To reset the system if software hangs
To manage power consumption
To handle external interrupts
Explanation - The watchdog timer resets the microcontroller if the program fails to clear it within a specified time, preventing infinite loops.
Correct answer is: To reset the system if software hangs
Q.9 Which of the following is NOT a memory type in microcontroller architecture?
SRAM
EEPROM
NAND Flash
ROM
Explanation - NAND Flash is a type of non-volatile memory used in external devices; microcontrollers typically use Flash or EEPROM for program storage.
Correct answer is: NAND Flash
Q.10 What does the acronym ADC stand for?
Analog to Digital Converter
Active Duty Control
Asynchronous Digital Circuit
Amplifier Digital Circuit
Explanation - ADC converts continuous analog signals into discrete digital values for processing by a microcontroller.
Correct answer is: Analog to Digital Converter
Q.11 In PIC microcontroller architecture, which instruction is used to read data from an external port?
IN
OUT
MOVF
ANDLW
Explanation - The IN instruction reads the value from a peripheral port into the W register.
Correct answer is: IN
Q.12 What is the main difference between 8-bit and 16-bit microcontrollers?
Number of I/O pins
Width of data bus and register size
Clock speed
Power consumption
Explanation - An 8-bit microcontroller processes 8-bit data in one cycle, whereas a 16-bit processes 16-bit, affecting performance and memory addressing.
Correct answer is: Width of data bus and register size
Q.13 Which register in a PIC18 microcontroller holds the status bits?
STATUS
PCLATH
PORTA
TRISA
Explanation - STATUS register contains flags like Zero, Carry, and Digit Carry used for conditional execution.
Correct answer is: STATUS
Q.14 Which instruction in ARM assembly loads a register from memory?
LDR
STR
ADD
MOV
Explanation - LDR (Load Register) copies data from memory to a register.
Correct answer is: LDR
Q.15 What is the purpose of the 'Stack Pointer' (SP) in microcontroller architecture?
To keep track of the program counter
To point to the top of the call stack
To hold immediate values
To control interrupt priority
Explanation - SP indicates the current top of the stack, used for function calls and interrupt handling.
Correct answer is: To point to the top of the call stack
Q.16 Which peripheral is used to capture a pulse width in microcontrollers?
ADC
Timer/Counter
USART
PWM module
Explanation - Timers can be configured as counters to count pulses, measuring pulse width or period.
Correct answer is: Timer/Counter
Q.17 Which of the following statements about 'CISC' is true?
It uses a reduced instruction set
It has simple, short instructions
Instructions can have multiple operations
Registers are not used
Explanation - CISC (Complex Instruction Set Computer) contains instructions that perform multiple tasks, making code size larger but instructions fewer.
Correct answer is: Instructions can have multiple operations
Q.18 Which mode of operation allows a microcontroller to enter a low-power state until an interrupt occurs?
Sleep mode
Idle mode
Active mode
Power-down mode
Explanation - Sleep mode turns off most internal clocks, waking only on interrupt, conserving energy.
Correct answer is: Sleep mode
Q.19 What is the function of a 'Timer/counter' module in microcontrollers?
To perform floating-point arithmetic
To convert analog signals to digital
To keep track of time and count events
To control power supply voltage
Explanation - Timer/counter modules generate timing signals, measure durations, and count external events.
Correct answer is: To keep track of time and count events
Q.20 Which of these is an advantage of using an AVR microcontroller for hobby projects?
Large code size
High power consumption
Rich community support
No available development board
Explanation - AVR microcontrollers like the ATmega328P have strong community, extensive libraries, and affordable development boards.
Correct answer is: Rich community support
Q.21 In the AVR instruction set, what does the 'JMP' instruction do?
Jump to a subroutine
Jump to an absolute address
Jump conditionally
Jump relative to current PC
Explanation - JMP sets the program counter to the specified address, causing an unconditional jump.
Correct answer is: Jump to an absolute address
Q.22 Which peripheral module in STM32 microcontrollers provides 12-bit resolution ADC?
TIM2
USART3
ADC1
GPIOE
Explanation - ADC1 is the analog-to-digital converter module offering up to 12-bit resolution.
Correct answer is: ADC1
Q.23 What is the primary purpose of an interrupt vector table?
To store user data
To map interrupt sources to handler addresses
To perform memory management
To keep track of stack usage
Explanation - The interrupt vector table holds addresses of interrupt service routines, allowing the MCU to jump to the correct handler.
Correct answer is: To map interrupt sources to handler addresses
Q.24 Which of the following is a characteristic of an 8051 microcontroller's Harvard architecture?
Separate program and data memory spaces
Unified memory space for code and data
Large external memory only
Only uses ROM
Explanation - The 8051 uses Harvard architecture where code memory (ROM) and data memory (RAM) are separate.
Correct answer is: Separate program and data memory spaces
Q.25 What does the 'SFR' register in a microcontroller stand for?
Special Function Register
Special Feature Register
Standard Function Register
Serial Frame Register
Explanation - SFRs control peripheral functions like I/O ports, timers, and UARTs.
Correct answer is: Special Function Register
Q.26 Which of the following is NOT a valid way to program a PIC microcontroller?
Using C with MPLAB X
Using assembly language
Using Python directly on the PIC
Using a high-level IDE
Explanation - PIC microcontrollers cannot run Python directly; they require compiled C, C++, or assembly.
Correct answer is: Using Python directly on the PIC
Q.27 Which peripheral is typically used for serial communication in microcontrollers?
PWM
UART
ADC
GPIO
Explanation - UART (Universal Asynchronous Receiver/Transmitter) handles serial data transfer.
Correct answer is: UART
Q.28 What is the purpose of the 'Latch' in a microcontroller's I/O port?
To store a single bit permanently
To hold a data value until the next clock cycle
To convert analog to digital
To generate clock signals
Explanation - A latch holds data in a stable state, enabling synchronous operation between components.
Correct answer is: To hold a data value until the next clock cycle
Q.29 Which of the following is a typical voltage level for a 3.3V microcontroller?
0V to 1V
1.8V to 2.5V
2.5V to 3.5V
3.0V to 4.2V
Explanation - A 3.3V microcontroller operates around 3.3V, allowing some tolerance for voltage fluctuations.
Correct answer is: 2.5V to 3.5V
Q.30 Which instruction in 8051 assembly loads a byte from memory into accumulator?
MOV A, @R0
MOV A, #0x12
MOV A, R1
MOV A, @A+DPTR
Explanation - MOV A, @R0 loads the byte from the address pointed to by R0 into accumulator.
Correct answer is: MOV A, @R0
Q.31 Which of these is a typical feature of a 'Real-Time Operating System' (RTOS) for microcontrollers?
Single-thread execution only
Deterministic task scheduling
No support for interrupts
Unlimited memory usage
Explanation - RTOS ensures tasks meet time constraints, essential for real-time applications.
Correct answer is: Deterministic task scheduling
Q.32 What is the maximum number of ports available on a standard AVR ATmega328P?
2
4
6
8
Explanation - ATmega328P has six 8-bit I/O ports labeled PORTA to PORTH.
Correct answer is: 6
Q.33 Which of these is an example of a high-level language commonly used to program microcontrollers?
C++
Assembly
MIPS
XOR
Explanation - C++ is widely used for writing firmware, offering abstraction and object-oriented features.
Correct answer is: C++
Q.34 In an ARM Cortex-M microcontroller, which register holds the priority of the currently executing interrupt?
PRI
IPSR
BASEPRI
CONTROL
Explanation - BASEPRI is used to mask interrupts of lower priority during an ISR.
Correct answer is: BASEPRI
Q.35 What is the main function of the 'GPIO' pins on a microcontroller?
To provide high-frequency clock
To interface with digital sensors and actuators
To store program code
To convert analog signals
Explanation - General-Purpose Input/Output (GPIO) pins can be configured as inputs or outputs for digital signals.
Correct answer is: To interface with digital sensors and actuators
Q.36 Which of the following is a valid way to change the operating frequency of an AVR microcontroller?
Modify the clock prescaler
Change the CPU core voltage
Rewrite the firmware in a different language
Update the interrupt vector table
Explanation - The clock prescaler divides the input clock, altering the CPU frequency.
Correct answer is: Modify the clock prescaler
Q.37 What does 'PWM' stand for in microcontroller peripherals?
Pulse Width Modulation
Parallel Waveform Modulation
Programmable Waveform Mode
Power Wave Mode
Explanation - PWM generates pulses of varying width to control power delivered to devices like motors and LEDs.
Correct answer is: Pulse Width Modulation
Q.38 Which instruction in 8051 assembly performs a logical AND between the accumulator and a register?
AND A, R0
ANL A, R0
ANDR A, R0
ANDC A, R0
Explanation - ANL (AND Logical) applies bitwise AND between accumulator and specified operand.
Correct answer is: ANL A, R0
Q.39 What type of memory is used to store the microcontroller's firmware?
SRAM
ROM
Flash
EEPROM
Explanation - Flash memory is non-volatile and writable in blocks, allowing firmware updates.
Correct answer is: Flash
Q.40 Which peripheral module in STM32 is used to generate analog signals?
ADC
DAC
USART
GPIO
Explanation - DAC (Digital-to-Analog Converter) converts digital data to an analog voltage.
Correct answer is: DAC
Q.41 What is the typical resolution of a 12-bit ADC?
4096 levels
1024 levels
256 levels
8192 levels
Explanation - A 12-bit ADC can represent 2^12 = 4096 discrete values.
Correct answer is: 4096 levels
Q.42 Which of the following describes a 'volatile' variable in C for microcontroller programming?
It changes only at compile time
It may change unexpectedly, e.g., by an ISR
It is stored in ROM
It is used for global constants
Explanation - volatile tells the compiler that the variable can be modified outside the current code flow.
Correct answer is: It may change unexpectedly, e.g., by an ISR
Q.43 Which register holds the value of the next instruction to execute in an AVR microcontroller?
PC
SP
ACC
SREG
Explanation - The Program Counter (PC) points to the address of the next instruction.
Correct answer is: PC
Q.44 What does the 'SREG' register in AVR control?
Interrupt flags
Status flags
Stack pointer
Serial port speed
Explanation - SREG holds flags like Carry, Zero, Sign, and Overflow used for conditional branching.
Correct answer is: Status flags
Q.45 Which of the following is an example of a memory-mapped peripheral?
UART
Timer
Interrupt vector
All of the above
Explanation - Memory-mapped peripherals are accessed through specific address ranges.
Correct answer is: All of the above
Q.46 In a PIC microcontroller, what does the 'BSF' instruction do?
Bit Set F
Bit Shift Forward
Binary Shift Flag
Bit Shift Function
Explanation - BSF sets a specified bit in a register to 1.
Correct answer is: Bit Set F
Q.47 Which of the following is a type of power supply used for microcontrollers?
Linear regulator
Switching regulator
Both A and B
Only A
Explanation - Both linear and switching regulators provide DC power; choice depends on efficiency and noise.
Correct answer is: Both A and B
Q.48 What does the 'E' bit in the AVR Status Register indicate?
External interrupt enabled
EEPROM write in progress
Execution in progress
Error flag
Explanation - The 'E' flag indicates that an EEPROM write operation is underway.
Correct answer is: EEPROM write in progress
Q.49 Which of the following is a typical use of the SPI peripheral in microcontrollers?
Serial communication with sensors
I2C communication
UART data transfer
Parallel data output
Explanation - SPI (Serial Peripheral Interface) is a synchronous serial protocol used for high-speed communication with peripherals.
Correct answer is: Serial communication with sensors
Q.50 How many bits are typically used in the 'SREG' register of an AVR microcontroller?
8
16
32
64
Explanation - SREG is an 8-bit register holding various status flags.
Correct answer is: 8
Q.51 Which peripheral in PIC microcontroller is used for serial communication at variable baud rates?
UART
SPI
I2C
PWM
Explanation - UART handles asynchronous serial communication with configurable baud rates.
Correct answer is: UART
Q.52 What is the function of the 'BR' instruction in AVR assembly?
Branch relative
Bit reset
Binary read
Break request
Explanation - BR is a conditional branch that jumps relative to the current PC if a condition is met.
Correct answer is: Branch relative
Q.53 Which of these is a key advantage of using a 32-bit microcontroller over an 8-bit microcontroller?
Higher processing speed
Lower power consumption
Smaller code size
Easier programming
Explanation - 32-bit MCUs can handle larger data paths and more complex calculations faster.
Correct answer is: Higher processing speed
Q.54 In a PIC16F microcontroller, which bit of the STATUS register indicates a carry-out?
C
Z
N
OV
Explanation - The C bit in STATUS register indicates a carry or borrow from arithmetic operations.
Correct answer is: C
Q.55 Which of the following is a typical use of the Timer module in a microcontroller?
Measure time intervals
Generate analog signals
Control motor speed directly
All of the above
Explanation - Timers can count cycles or external events to measure durations or create time delays.
Correct answer is: Measure time intervals
Q.56 What is the main purpose of an I/O port latch in a microcontroller?
To buffer data between the port and external device
To increase memory size
To reduce power consumption
To provide clock signals
Explanation - Latches hold the output value until the next change, ensuring stable signals.
Correct answer is: To buffer data between the port and external device
Q.57 Which instruction in ARM assembly loads a value from memory into a register?
LDR
STR
ADD
SUB
Explanation - LDR (Load Register) copies data from memory into a CPU register.
Correct answer is: LDR
Q.58 Which of the following is a correct description of a 'clock divider' in a microcontroller?
A device that divides the input voltage by 2
A logic block that divides the system clock frequency
A component that increases the clock frequency
A software routine to manage time
Explanation - A clock divider reduces the frequency of the main clock, allowing slower peripheral operation.
Correct answer is: A logic block that divides the system clock frequency
Q.59 Which peripheral is used to generate a PWM signal in the AVR ATmega328P?
Timer0
ADC0
USART0
SPI0
Explanation - Timer0 can be configured to generate PWM output on OC0A/OC0B pins.
Correct answer is: Timer0
Q.60 What does the 'SET' bit in the STATUS register of a PIC microcontroller signify?
Set Carry Flag
Set Zero Flag
Set Interrupt Flag
Set Overflow Flag
Explanation - The SET bit indicates the carry-out from arithmetic operations.
Correct answer is: Set Carry Flag
Q.61 Which of the following is an example of a high-level programming language for microcontrollers?
Assembly
C
Machine code
Binary
Explanation - C provides abstraction over hardware and is widely used in embedded firmware.
Correct answer is: C
Q.62 In an 8051 microcontroller, which register holds the current interrupt priority level?
PSW
SP
ACC
IP
Explanation - IP (Interrupt Priority) register sets the priority of each external interrupt source.
Correct answer is: IP
Q.63 Which peripheral in a microcontroller is used to convert a digital value to an analog voltage?
ADC
DAC
PWM
UART
Explanation - DAC (Digital-to-Analog Converter) outputs a voltage proportional to the digital input.
Correct answer is: DAC
Q.64 What is the typical resolution of a 10-bit ADC?
1024 levels
256 levels
512 levels
2048 levels
Explanation - A 10-bit ADC offers 2^10 = 1024 discrete steps.
Correct answer is: 1024 levels
Q.65 Which instruction in 8051 assembly performs a logical OR between the accumulator and a register?
ORL A, R0
OR A, R0
ALR A, R0
ORR A, R0
Explanation - ORL (OR Logical) performs bitwise OR between accumulator and operand.
Correct answer is: ORL A, R0
Q.66 What type of memory is typically used to store the bootloader in a microcontroller?
EEPROM
SRAM
Flash
ROM
Explanation - Bootloaders are stored in non-volatile Flash memory, allowing firmware updates.
Correct answer is: Flash
Q.67 Which of the following is a common clock source for microcontrollers?
Crystal oscillator
Battery voltage
Analog sensor output
I2C bus
Explanation - A crystal provides a stable, accurate frequency for the microcontroller's clock.
Correct answer is: Crystal oscillator
Q.68 Which of the following is a characteristic of a 'Cortex-M3' microcontroller?
Supplies 3.3V only
Uses a Harvard architecture
Has an ARMv7-M core with Thumb-2 instruction set
Operates only at 16MHz
Explanation - Cortex-M3 uses the ARMv7-M architecture and supports the Thumb-2 instruction set.
Correct answer is: Has an ARMv7-M core with Thumb-2 instruction set
Q.69 What does 'CSR' stand for in the context of microcontrollers?
Control and Status Register
Clock Speed Ratio
Core State Register
Current State Reset
Explanation - CSR holds configuration bits and status flags for a peripheral.
Correct answer is: Control and Status Register
Q.70 Which of the following is a common method to debounce a mechanical switch in software?
Read the pin once
Use a Schmitt trigger
Implement a delay loop and check again
Use a high-pass filter
Explanation - Software debouncing waits for a stable state by sampling the pin after a short delay.
Correct answer is: Implement a delay loop and check again
Q.71 What is the purpose of the 'TRIS' register in PIC microcontrollers?
To set port direction
To toggle I/O pins
To control pull-up resistors
To enable interrupts
Explanation - TRIS registers define whether pins are inputs or outputs.
Correct answer is: To set port direction
Q.72 Which of the following statements is true about an AVR microcontroller's 'E' flag?
It indicates an external interrupt has occurred
It signals that an EEPROM write is in progress
It denotes that the end of program has been reached
It marks that the program counter is even
Explanation - The 'E' flag indicates an ongoing EEPROM write operation.
Correct answer is: It signals that an EEPROM write is in progress
Q.73 What is the typical supply voltage range for an ATmega328P microcontroller?
1.8V to 3.6V
3.0V to 3.6V
2.7V to 4.5V
5V only
Explanation - ATmega328P operates from 1.8V to 5.5V, but 3.3V is common for low-power designs.
Correct answer is: 3.0V to 3.6V
Q.74 Which peripheral can be used to read temperature directly in some microcontrollers?
ADC
RTC
Thermistor
Built-in temperature sensor
Explanation - Many MCUs include an on-chip temperature sensor accessible via ADC or a dedicated interface.
Correct answer is: Built-in temperature sensor
Q.75 Which of these is an example of an 'interrupt vector' in a microcontroller?
0x0000
0x0040
0xFFFF
0xFF00
Explanation - The vector table contains addresses like 0x0040 for specific interrupts.
Correct answer is: 0x0040
Q.76 In ARM assembly, which instruction is used to set the Least Significant Bit of a register?
SET
LSL
ORR
AND
Explanation - ORR can be used to set bits; using ORR with a mask that has LSB set.
Correct answer is: ORR
Q.77 What does the 'ADC' peripheral typically use to sample an input voltage?
Capacitor and op-amp
Resistor ladder
Charge pump
All of the above
Explanation - The ADC input often uses a sample-and-hold capacitor and a comparator or op-amp.
Correct answer is: Capacitor and op-amp
Q.78 Which instruction in PIC assembly clears a bit in a register?
CLR
CPL
CLRF
CLRW
Explanation - CLRF clears all bits of the specified register to 0.
Correct answer is: CLRF
Q.79 What is the main function of the 'Reset' pin on a microcontroller?
To initialize the MCU to a known state
To power down the device
To provide clock signal
To enable debugging
Explanation - Reset forces the microcontroller to start from the beginning of the program.
Correct answer is: To initialize the MCU to a known state
Q.80 Which of the following describes the 'SPI' protocol?
Serial Peripheral Interface with one master and one or more slaves
Synchronous Parallel Interface
Serial Peripheral Interface with two masters
Synchronous Parallel Interface with one master
Explanation - SPI is a full-duplex, synchronous serial protocol using MOSI, MISO, SCK, and SS lines.
Correct answer is: Serial Peripheral Interface with one master and one or more slaves
Q.81 Which peripheral is typically used to generate PWM signals in an ATmega328P?
Timer0
ADC0
USART0
SPI0
Explanation - Timer0 can be configured as Fast PWM mode to output on OC0A/OC0B.
Correct answer is: Timer0
Q.82 In a PIC microcontroller, which bit in the STATUS register is used for the Carry flag?
C
Z
N
OV
Explanation - C indicates a carry-out from addition or borrow from subtraction.
Correct answer is: C
Q.83 Which instruction in AVR assembly increments the value in register R16?
INC R16
ADD R16, 1
MOV R16, R17
LDD R16, 1
Explanation - INC adds one to the register content.
Correct answer is: INC R16
Q.84 What is the purpose of the 'SPM' instruction in AVR microcontrollers?
Store Program Memory
Set Program Counter
Start Program Memory
Reset Program Counter
Explanation - SPM writes data from RAM to Flash program memory.
Correct answer is: Store Program Memory
Q.85 Which of the following is a common external sensor that uses I2C communication?
BMP280 pressure sensor
L298N motor driver
DS18B20 temperature sensor
HC-SR04 ultrasonic sensor
Explanation - BMP280 communicates over I2C; DS18B20 uses 1-Wire; others use PWM or analog.
Correct answer is: BMP280 pressure sensor
Q.86 What is the function of the 'SR' (Status Register) in a PIC microcontroller?
Store system flags like Carry, Zero, and Overflow
Store stack pointer
Store serial data
Store system reset value
Explanation - The SR register holds condition flags used for branching decisions.
Correct answer is: Store system flags like Carry, Zero, and Overflow
Q.87 Which of these is a typical application of an AVR microcontroller?
Motor control
Power supply design
Analog audio processing
High-frequency RF transmission
Explanation - AVRs are commonly used in hobby robotics and motor control projects.
Correct answer is: Motor control
Q.88 What does the 'INTCON' register in 8051 microcontroller control?
Interrupt enable and flags
Timer control
Serial communication
Port configuration
Explanation - INTCON holds bits for enabling/disabling interrupts and clearing flags.
Correct answer is: Interrupt enable and flags
Q.89 Which of these is a typical method to generate a PWM signal in an STM32 microcontroller?
Timer in PWM mode
UART in asynchronous mode
ADC in continuous mode
I2C in master mode
Explanation - Timers can be set to PWM mode to output duty-cycle-controlled signals.
Correct answer is: Timer in PWM mode
Q.90 What type of memory is used for 'Bootloader' code in STM32 microcontrollers?
SRAM
EEPROM
Flash
ROM
Explanation - Bootloader resides in non-volatile Flash memory so it persists across resets.
Correct answer is: Flash
Q.91 In a PIC microcontroller, what does the 'REFO' oscillator provide?
External oscillator input
Internal reference oscillator
Real-time clock output
Reset pulse source
Explanation - REFO is a low-power internal reference oscillator used for peripherals.
Correct answer is: Internal reference oscillator
Q.92 Which peripheral in AVR is used for I2C communication?
TWI
SPI
USART
ADC
Explanation - TWI (Two-Wire Interface) is the AVR's I2C implementation.
Correct answer is: TWI
Q.93 What is the typical clock frequency of a standard 8051 microcontroller?
12 MHz
16 MHz
24 MHz
48 MHz
Explanation - A standard 8051 runs at 12 MHz, though higher frequencies exist.
Correct answer is: 12 MHz
Q.94 Which of the following is a feature of 'Interrupt-Driven' programming in microcontrollers?
CPU spends most cycles polling peripherals
CPU executes tasks only when an interrupt occurs
Interrupts are ignored for speed
All peripheral actions are synchronous
Explanation - Interrupt-driven mode lets the CPU handle events asynchronously, improving efficiency.
Correct answer is: CPU executes tasks only when an interrupt occurs
Q.95 What does the 'X' flag in the AVR Status Register indicate?
Extended carry
External interrupt pending
XOR operation result
No such flag
Explanation - AVR's status register does not contain an 'X' flag; it's a trick question.
Correct answer is: No such flag
Q.96 Which of these is an example of a 'volatile' keyword usage in C for microcontroller programming?
volatile int counter;
int volatile counter;
volatile counter;
All of the above
Explanation - The volatile keyword tells the compiler not to optimize accesses to a variable that may change unexpectedly.
Correct answer is: volatile int counter;
Q.97 What is the purpose of the 'B' register in AVR microcontrollers?
Base address register
Bit test register
Buffer register
Bootloader control register
Explanation - The 'B' register holds the base address for data pointers.
Correct answer is: Base address register
Q.98 Which of the following is a common way to handle low power consumption in microcontrollers?
Run at maximum frequency all the time
Enable sleep mode and wake on interrupt
Disable all peripherals
Use high voltage supplies
Explanation - Sleep mode reduces power while preserving state, waking only on events.
Correct answer is: Enable sleep mode and wake on interrupt
Q.99 What does the 'S' in 'SFR' (Special Function Register) stand for?
Special
Standard
Serial
Signal
Explanation - SFR is the register that controls peripheral functions.
Correct answer is: Special
Q.100 In the AVR architecture, which instruction is used to jump to a subroutine?
CALL
JMP
RET
BR
Explanation - CALL saves the return address and jumps to the subroutine.
Correct answer is: CALL
Q.101 What is the default start address of the program counter in most 8051 microcontrollers?
0x0000
0x0002
0x0004
0x0006
Explanation - The PC starts at address 0x0000 to fetch the first instruction.
Correct answer is: 0x0000
Q.102 Which of the following is NOT a feature of the ARM Cortex-M4 microcontroller?
DSP instructions
Thumb-2 instruction set
Single-cycle multiply
Embedded FPU
Explanation - Cortex-M4 uses multiple cycles for multiplication; it has a DSP and FPU but not single-cycle multiply.
Correct answer is: Single-cycle multiply
Q.103 Which instruction in PIC assembly sets all bits in a register to zero?
CLR
CLRF
CLRW
CLRWDT
Explanation - CLRF clears the specified register.
Correct answer is: CLRF
Q.104 Which of the following statements correctly describes a 'Timer' in a microcontroller?
It counts external events only
It generates random numbers
It can be used to measure time or generate periodic events
It is used only for PWM
Explanation - Timers can count cycles or external events and can trigger interrupts.
Correct answer is: It can be used to measure time or generate periodic events
Q.105 In AVR assembly, which instruction performs a logical shift left on register R17?
LSL R17
ROL R17
SHL R17
SL R17
Explanation - LSL (Logical Shift Left) shifts bits left and fills with zero.
Correct answer is: LSL R17
Q.106 What does the 'ADC' peripheral use to perform a conversion?
Comparator only
Analog to Digital Converter
Digital to Analog Converter
Pulse Width Modulator
Explanation - ADC converts an analog voltage into a digital value.
Correct answer is: Analog to Digital Converter
Q.107 Which of these is a valid method to set the baud rate of a UART in an AVR microcontroller?
By writing to UBRR0H and UBRR0L
By setting the SPBRG register
By adjusting the oscillator frequency only
By changing the watchdog timer
Explanation - UBRR0 registers hold the division factor for UART baud rate.
Correct answer is: By writing to UBRR0H and UBRR0L
Q.108 What is the function of the 'RCON' register in PIC microcontrollers?
Reset control bits
Port configuration
Timer control
Interrupt priority
Explanation - RCON holds bits like BOR, POR, and WDT for reset sources.
Correct answer is: Reset control bits
Q.109 In AVR assembly, which instruction moves a byte from register R18 to R19?
MOV R19, R18
MOV R18, R19
LD R19, R18
ST R18, R19
Explanation - MOV copies the value of the source register to the destination register.
Correct answer is: MOV R19, R18
Q.110 Which peripheral module in STM32 can be used for reading analog temperature sensors?
ADC1
TIM2
UART1
I2C1
Explanation - ADC1 can read the internal temperature sensor output.
Correct answer is: ADC1
Q.111 What does 'C' flag in the AVR status register represent?
Carry or Borrow flag
Complement flag
Clock flag
No such flag
Explanation - C indicates a carry-out or borrow during arithmetic operations.
Correct answer is: Carry or Borrow flag
Q.112 Which instruction in PIC assembly clears the program counter?
RESET
RESTART
CLRP
NOP
Explanation - RESET forces a system reset, resetting the PC to the start address.
Correct answer is: RESET
Q.113 Which of the following is a typical function of the Watchdog Timer?
Generate periodic interrupts
Reset the microcontroller if it freezes
Provide a clock source
Store non-volatile data
Explanation - The Watchdog Timer forces a reset if the main program doesn't service it.
Correct answer is: Reset the microcontroller if it freezes
Q.114 What is the role of the 'T' bit in the AVR's Timer/Counter Control Register (TCCRnA)?
Toggle OCn pin on compare match
Set timer mode to normal
Enable timer overflow interrupt
No such bit
Explanation - The T bit toggles the output compare pin on match events.
Correct answer is: Toggle OCn pin on compare match
Q.115 Which instruction in 8051 assembly loads a constant into the accumulator?
MOV A, #0xFF
ADD A, #0xFF
LDA #0xFF
LD A, 0xFF
Explanation - MOV with a leading # loads an immediate value into the accumulator.
Correct answer is: MOV A, #0xFF
Q.116 Which peripheral in AVR provides hardware serial communication?
USART
SPI
TWI
ADC
Explanation - USART (Universal Synchronous/Asynchronous Receiver/Transmitter) handles serial data.
Correct answer is: USART
Q.117 What does the 'SR' register in a PIC microcontroller do?
Store status flags
Control serial port
Set stack pointer
Manage sleep mode
Explanation - SR holds bits like C, Z, N, and OV used for conditional branching.
Correct answer is: Store status flags
Q.118 Which of these is a correct way to configure a pin as input on an AVR ATmega328P?
Set the corresponding bit in DDRx to 0
Set the corresponding bit in DDRx to 1
Write 1 to the pin in PORTx
Write 0 to the pin in PORTx
Explanation - DDR bits set to 0 configure pins as inputs; 1 configures them as outputs.
Correct answer is: Set the corresponding bit in DDRx to 0
Q.119 In an STM32 microcontroller, which register holds the interrupt priority of the current interrupt?
IPR
ICSR
AIRCR
SCB_SHPR
Explanation - IPR registers store priority levels for each interrupt source.
Correct answer is: IPR
Q.120 Which peripheral in an AVR is used to generate a hardware timer interrupt?
Timer0
USART0
ADC0
SPI0
Explanation - Timer0 can be configured to generate an interrupt on overflow or compare match.
Correct answer is: Timer0
Q.121 What is the main advantage of using an 'Interrupt-driven' I/O handling approach?
Reduces CPU load
Increases power consumption
Requires constant polling
Simplifies code
Explanation - Interrupt-driven handling lets the CPU do other tasks while waiting for events.
Correct answer is: Reduces CPU load
Q.122 Which of the following is NOT a typical microcontroller peripheral?
UART
ADC
HDMI port
PWM
Explanation - HDMI is a high-speed video interface, not normally present in MCUs.
Correct answer is: HDMI port
Q.123 What does the 'S' bit in the 8051 'PSW' register stand for?
Sign bit
System flag
Stack pointer
Start bit
Explanation - The 'S' bit is the sign flag, indicating negative results in two's complement.
Correct answer is: Sign bit
Q.124 Which of these is a typical use of the 'I2C' peripheral in microcontrollers?
High-speed data transfer between devices
Low-speed, two-wire serial communication
Analog to digital conversion
PWM signal generation
Explanation - I2C uses a serial clock and data line for communication between devices.
Correct answer is: Low-speed, two-wire serial communication
Q.125 What does 'JMP' stand for in AVR assembly?
Jump immediate pointer
Jump to absolute address
Jump relative pointer
Jump to memory location
Explanation - JMP directs the program counter to a specified address.
Correct answer is: Jump to absolute address
Q.126 Which of the following is a feature of the ARM Cortex-M0+ processor?
Thumb-2 instruction set
Single-cycle multiply
DSP extensions
Floating-point unit
Explanation - Cortex-M0+ uses Thumb-2 but lacks DSP and FPU features.
Correct answer is: Thumb-2 instruction set
Q.127 In a PIC microcontroller, which register holds the status of the carry bit for addition?
STATUS
SR
PSW
TOS
Explanation - STATUS register contains the C (carry) bit.
Correct answer is: STATUS
Q.128 What is the effect of setting the 'T' bit in the AVR's TCCRnB register?
Enables Timer/Counter overflow interrupt
Selects the clock source for the timer
Sets the timer to toggle mode
No effect
Explanation - The 'T' bit (prescaler) determines which clock source drives the timer.
Correct answer is: Selects the clock source for the timer
Q.129 Which of the following is an example of a 'volatile' variable usage in an interrupt service routine (ISR) in C?
volatile int flag = 0;
int volatile flag = 0;
int flag volatile = 0;
volatile flag = 0;
Explanation - The keyword must precede the type declaration in C.
Correct answer is: volatile int flag = 0;
Q.130 What does the 'BR' instruction do in AVR assembly?
Branch relative on a condition
Branch to a subroutine
Reset the processor
Bit reset
Explanation - BR checks a status flag and jumps relative if true.
Correct answer is: Branch relative on a condition
Q.131 Which of these is a typical function of the 'Timer/Counter 1' module in an AVR?
Analog to digital conversion
PWM generation
Serial communication
I/O port control
Explanation - Timer1 can be set in PWM mode to output controlled duty cycles.
Correct answer is: PWM generation
Q.132 Which instruction in PIC assembly clears the program counter and resets the microcontroller?
RESET
RESTART
CLRP
NOP
Explanation - RESET triggers a full reset, reinitializing the program counter.
Correct answer is: RESET
Q.133 What is the primary use of the 'UART' peripheral in microcontrollers?
Digital I/O
Analog input
Serial communication
Power management
Explanation - UART is used for asynchronous serial data exchange.
Correct answer is: Serial communication
Q.134 In a 32-bit ARM Cortex-M microcontroller, which register holds the current stack pointer value?
SP
LR
PC
IPSR
Explanation - The SP (Stack Pointer) register points to the top of the current stack.
Correct answer is: SP
Q.135 Which instruction in AVR assembly sets the bit 2 of register R18?
SEB R18,2
SET R18,2
SBI R18,2
SETB R18,2
Explanation - SEB (Set Bit) sets the specified bit in the register.
Correct answer is: SEB R18,2
Q.136 What does the 'TRIS' register in PIC microcontrollers control?
Interrupt priority
Timer prescaler
Pin direction (input/output)
Port data latch
Explanation - TRIS bits determine whether each pin is an input (0) or output (1).
Correct answer is: Pin direction (input/output)
Q.137 Which of the following is a common method to generate a 1 kHz square wave using a timer in STM32?
Use Timer in PWM mode with 1 kHz frequency
Use UART in 1 kHz mode
Use ADC in continuous mode
Use I2C with 1 kHz frequency
Explanation - Timer configured for PWM can produce a 1 kHz square wave.
Correct answer is: Use Timer in PWM mode with 1 kHz frequency
Q.138 What is the main advantage of using a microcontroller with built-in ADC?
No need for external ADC modules
Higher speed processing
Increased memory capacity
Lower power consumption
Explanation - Built-in ADC eliminates the need for an external chip, saving board space and cost.
Correct answer is: No need for external ADC modules
Q.139 Which peripheral in PIC microcontrollers is used to generate PWM signals?
Timer0
PWM1
UART1
ADC1
Explanation - PWM modules like PWM1 can create pulse-width modulated outputs.
Correct answer is: PWM1
Q.140 In AVR architecture, what does the 'SREG' register do?
Store status flags for conditional branching
Set the system reset vector
Configure serial communication
Control the clock prescaler
Explanation - SREG contains flags like Carry, Zero, Sign, and Overflow.
Correct answer is: Store status flags for conditional branching
Q.141 Which instruction in 8051 assembly clears the accumulator?
CLR A
CLR ACC
CLR 0x00
CLR 0xFF
Explanation - CLR A zeroes the accumulator value.
Correct answer is: CLR A
Q.142 Which of these is a valid way to enable the global interrupt in AVR microcontroller?
SREG |= (1 << 7)
SREG |= (1 << 0)
SREG |= (1 << 8)
SREG |= (1 << 4)
Explanation - The I bit (bit 7) enables global interrupts when set.
Correct answer is: SREG |= (1 << 7)
Q.143 What type of memory is used to store program code in PIC microcontrollers?
Flash
EEPROM
SRAM
ROM
Explanation - PIC microcontrollers use non-volatile Flash memory for program storage.
Correct answer is: Flash
Q.144 Which of the following is a common method to calibrate the ADC in a microcontroller?
Use a reference voltage and known input
Set ADC to zero mode
Disable ADC
Use external clock
Explanation - By applying a known voltage, the ADC can be calibrated for accuracy.
Correct answer is: Use a reference voltage and known input
Q.145 What is the purpose of the 'PR' register in a 8051 microcontroller?
Programmable timer period
Peripheral register
Port data register
Program counter
Explanation - PR registers hold the compare value for timers.
Correct answer is: Programmable timer period
Q.146 In AVR assembly, which instruction performs a logical AND between register R22 and 0x0F?
AND R22, 0x0F
ANDI R22, 0x0F
AND R22, R15
ANDI R15, 0x0F
Explanation - ANDI is the AND immediate instruction.
Correct answer is: ANDI R22, 0x0F
Q.147 Which peripheral in a microcontroller can be used to generate a software reset?
Watchdog timer
Timer0
UART1
ADC
Explanation - The watchdog can be triggered to reset the MCU if not serviced.
Correct answer is: Watchdog timer
Q.148 What does the 'D' bit in the AVR status register indicate?
Double speed mode active
Decimal mode active
Data ready flag
No such bit
Explanation - The D bit enables the BCD mode for arithmetic operations.
Correct answer is: Decimal mode active
Q.149 Which of these is a common peripheral of the ATmega328P microcontroller?
I2C
SPI
ADC
All of the above
Explanation - ATmega328P supports I2C, SPI, and ADC peripherals.
Correct answer is: All of the above
Q.150 What is the function of the 'W' register in AVR microcontroller?
Working register for operations
Watchdog timer value
Voltage reference
Watchdog reset
Explanation - W is used as a working register for I/O operations and arithmetic.
Correct answer is: Working register for operations
Q.151 Which instruction in PIC assembly sets a bit in a register?
BSF
BTFSC
BCF
BTFSS
Explanation - BSF (Bit Set f) sets the specified bit to 1.
Correct answer is: BSF
Q.152 What is the typical operating voltage for a 3.3V microcontroller?
1.8 V
2.5 V
3.3 V
5 V
Explanation - Many modern MCUs operate at 3.3 V for low power consumption.
Correct answer is: 3.3 V
Q.153 Which of the following is an advantage of using an AVR microcontroller?
Low-cost development boards
Large community support
Easy programming in C
All of the above
Explanation - AVR MCUs are popular due to cost, community, and C language support.
Correct answer is: All of the above
Q.154 What does the 'T' bit in the AVR's TCCRnB register do?
Sets the timer to toggle mode
Selects the prescaler value
Enables overflow interrupt
No such bit
Explanation - The 'T' bit in TCCRnB configures the prescaler for the timer.
Correct answer is: Selects the prescaler value
Q.155 Which instruction in 8051 assembly performs a subroutine call?
CALL 0x0100
JMP 0x0100
RET
LJMP 0x0100
Explanation - CALL pushes return address to stack and jumps to the subroutine.
Correct answer is: CALL 0x0100
Q.156 In STM32, which register holds the base address for the peripheral registers?
RCC
GPIO
SCB
Peripheral base addresses
Explanation - Each peripheral has a fixed base address in the memory map.
Correct answer is: Peripheral base addresses
Q.157 Which peripheral in an AVR microcontroller provides a timer that can generate interrupts on overflow?
Timer0
ADC0
USART0
TWI0
Explanation - Timer0 can be set to generate an interrupt when it overflows.
Correct answer is: Timer0
Q.158 What does the 'PORT' register in an AVR microcontroller control?
I/O pin output values
I/O pin input values
Pin direction
Interrupt configuration
Explanation - Writing to PORT changes the output state of configured pins.
Correct answer is: I/O pin output values
Q.159 Which of the following is a common method to reduce power consumption in a microcontroller?
Increase clock speed
Disable unused peripherals
Run all tasks continuously
Use high-capacitance capacitors
Explanation - Turning off unused modules saves power.
Correct answer is: Disable unused peripherals
Q.160 Which instruction in AVR assembly clears the status register SREG?
CPI SREG, 0
CLR SREG
EOR SREG, SREG
SBI SREG, 0
Explanation - EOR of a register with itself clears all bits.
Correct answer is: EOR SREG, SREG
Q.161 What is the role of the 'G' bit in the PIC STATUS register?
Global Interrupt Enable
General purpose flag
Group mode
No such bit
Explanation - The G bit (I in some PICs) enables/disables global interrupts.
Correct answer is: Global Interrupt Enable
Q.162 Which peripheral in a microcontroller is used to convert a digital value back to an analog voltage?
DAC
ADC
PWM
UART
Explanation - DAC performs digital-to-analog conversion.
Correct answer is: DAC
Q.163 Which of these is a common method to implement a delay in AVR programming?
Using a busy-wait loop
Using the Timer peripheral
Using the Watchdog timer
Both A and B
Explanation - Delays can be achieved by loops or timer interrupts.
Correct answer is: Both A and B
Q.164 In a 16-bit PIC microcontroller, which instruction loads an immediate 16-bit value into W register?
MOVLW
MOVWF
CLRF
ANDLW
Explanation - MOVLW loads a literal value into W.
Correct answer is: MOVLW
Q.165 What does the 'PR' bit in a 8051 timer configuration represent?
Prescaler selection
Program reset
Periodic reload
Port reset
Explanation - PR selects the prescaler to scale the timer input clock.
Correct answer is: Prescaler selection
Q.166 Which peripheral in the ATmega328P can be used as a 10-bit ADC?
ADC0
ADC1
ADC2
All of the above
Explanation - ATmega328P has a 10-bit ADC with multiple channels.
Correct answer is: All of the above
Q.167 What is the primary difference between UART and SPI communication protocols?
UART is asynchronous, SPI is synchronous
UART uses two wires, SPI uses four
UART is full duplex, SPI is half duplex
UART requires a clock line, SPI does not
Explanation - UART doesn't use a clock line, while SPI does.
Correct answer is: UART is asynchronous, SPI is synchronous
Q.168 Which instruction in AVR assembly sets the bit 0 of register R20?
SEB R20,0
SET R20,0
SBI R20,0
SEB R20,1
Explanation - SEB sets a specific bit; bit 0 is the least significant bit.
Correct answer is: SEB R20,0
Q.169 In STM32, which register holds the priority of the PendSV exception?
SCB_SHPR3
SCB_SHPR2
SCB_SHPR1
SCB_SHPR0
Explanation - PendSV priority is set in SCB_SHPR3 for Cortex-M.
Correct answer is: SCB_SHPR3
Q.170 What is the purpose of the 'I' bit in the AVR status register?
Global interrupt enable
Input buffer enable
Increment counter
No such bit
Explanation - The I bit enables or disables global interrupts.
Correct answer is: Global interrupt enable
Q.171 Which of these is a typical application of a microcontroller?
Operating system kernel
Embedded device control
Desktop GUI
High-performance server
Explanation - Microcontrollers run in embedded devices like appliances and robots.
Correct answer is: Embedded device control
Q.172 In a PIC microcontroller, which register holds the program counter address?
PC
W
STATUS
TOS
Explanation - PC points to the next instruction to execute.
Correct answer is: PC
Q.173 What does the 'TRIG' bit in an ADC configuration typically represent?
Trigger source for conversion
Transfer enable
Transmit flag
Time reference
Explanation - TRIG selects the event that starts the ADC conversion.
Correct answer is: Trigger source for conversion
Q.174 Which of the following instructions sets the entire register R30 to zero in AVR assembly?
CLR R30
EOR R30, R30
LDS R30, 0
STS R30, 0
Explanation - EOR with itself clears all bits.
Correct answer is: EOR R30, R30
Q.175 Which peripheral in a microcontroller is used for analog-to-digital conversion?
ADC
DAC
PWM
UART
Explanation - ADC converts analog signals to digital values.
Correct answer is: ADC
Q.176 What is the default clock frequency of a typical 16-bit PIC microcontroller?
1 MHz
8 MHz
20 MHz
40 MHz
Explanation - Many PICs run at 8 MHz, but it can be increased with PLL.
Correct answer is: 8 MHz
Q.177 Which of these is an example of a 'volatile' keyword usage in an AVR ISR?
volatile int count;
int volatile count;
volatile count;
int count volatile;
Explanation - The keyword must precede the type in C.
Correct answer is: volatile int count;
Q.178 Which peripheral in AVR provides a hardware timer that can generate interrupts on overflow?
Timer0
ADC0
USART0
TWI0
Explanation - Timer0 can be set to generate an interrupt when it overflows.
Correct answer is: Timer0
Q.179 Which instruction in PIC assembly writes the contents of W to a file register?
MOVWF
CLRF
ANDLW
SUBWF
Explanation - MOVWF moves W contents to the specified file register.
Correct answer is: MOVWF
Q.180 In ARM Cortex-M microcontrollers, which bit controls the enabling of the SysTick timer?
STK_CTRL_ENABLE
SYST_CSR_ENABLE
SYST_CTRL_ENABLE
STK_CTRL_RUN
Explanation - The enable bit in the SysTick Control and Status Register activates the timer.
Correct answer is: SYST_CTRL_ENABLE
Q.181 Which of the following is a typical function of an I²C peripheral in microcontrollers?
Fast serial communication with multiple slaves
Low-speed, single master and multiple slave communication
Analog input
PWM generation
Explanation - I²C uses two lines and supports multiple devices on the bus.
Correct answer is: Low-speed, single master and multiple slave communication
Q.182 What is the function of the 'S' bit in the AVR status register?
Sign flag
Shift flag
Serial enable
No such bit
Explanation - S indicates the sign of the last arithmetic operation.
Correct answer is: Sign flag
Q.183 In a PIC microcontroller, which bit of the STATUS register indicates whether a program counter overflow has occurred?
OV
Z
N
C
Explanation - OV bit indicates overflow condition in arithmetic operations.
Correct answer is: OV
Q.184 Which of these is a typical use of a microcontroller's PWM peripheral?
LED dimming
Motor speed control
Signal generation
All of the above
Explanation - PWM can control LEDs, motors, and generate periodic signals.
Correct answer is: All of the above
Q.185 What is the purpose of a 'Bootloader' in a microcontroller?
To load and run the main program from non-volatile memory
To reset the microcontroller on power-up
To provide a user interface
To increase clock speed
Explanation - The bootloader manages the program execution starting from the correct memory address.
Correct answer is: To load and run the main program from non-volatile memory
Q.186 Which instruction in AVR assembly loads the value 0x55 into register R16?
LDD R16, 0x55
LDI R16, 0x55
MOV R16, 0x55
LDI R16, #0x55
Explanation - LDI loads an immediate value into a register.
Correct answer is: LDI R16, 0x55
Q.187 What does the 'C' flag in the AVR status register represent?
Carry flag for arithmetic operations
Clock source flag
Carry flag for bitwise operations
No such flag
Explanation - C is set when a carry or borrow occurs during arithmetic.
Correct answer is: Carry flag for arithmetic operations
Q.188 Which of the following peripherals in STM32 is used to read sensor data from analog inputs?
ADC1
USART2
TIM3
GPIOB
Explanation - ADC1 is the analog-to-digital converter module.
Correct answer is: ADC1
Q.189 Which instruction in 8051 assembly is used to write a byte to the accumulator from an internal RAM location pointed by DPTR?
MOV A, @DPTR
MOV A, DPTR
MOVDPTR, A
MOV A, DPTR+1
Explanation - The '@' notation indicates indirect addressing through DPTR.
Correct answer is: MOV A, @DPTR
Q.190 What is the primary purpose of a microcontroller's 'Watchdog Timer'?
To generate a periodic interrupt
To monitor system health and reset if it hangs
To count external pulses
To provide a clock source
Explanation - The watchdog timer resets the MCU if not serviced, ensuring reliability.
Correct answer is: To monitor system health and reset if it hangs
Q.191 Which peripheral in a PIC microcontroller is used to generate a PWM signal?
PWM1
UART1
ADC1
Timer1
Explanation - PWM1 can generate pulse-width modulated signals for motors or LEDs.
Correct answer is: PWM1
Q.192 In AVR assembly, which instruction writes the value 0x00 to register R17?
CLR R17
LDD R17, 0x00
LDM R17, 0x00
LDS R17, 0x00
Explanation - CLR clears the content of a register.
Correct answer is: CLR R17
