MCQ Questions
MCQ Questions
MCQ Questions
2. What does the term "RISC" stand for, and what is its primary advantage?
A) Reduced Instruction Set Computer; simplifies hardware design
B) Reduced Interrupt Service Call; improves real-time processing
C) Regular Instruction Sequence Code; ensures code uniformity
D) Random Instruction Set Controller; allows flexible instruction execution
Answer: A) Reduced Instruction Set Computer; simplifies hardware design
2. Which level simulates the algorithms that are used within the
embedded systems?
a) algorithmic level
b) switch level
c) gate level
d) circuit level
Answer:- a
2) Which ARM processor version is known for being used in high-performance applications?
A) ARM7
B) ARM9
C) ARM11
D) ARM Cortex-M
Answer: C) ARM11
4) Which type of microcontroller core focuses on a small set of instructions for efficiency?
A) CISC
B) RISC
C) ARM
D) DSP
Answer: B) RISC
5) What type of embedded system is used in critical applications where timing is crucial?
A) Standalone
B) Networked
C) Real-time
D) Mobile
Answer: C) Real-time
1.What is the primary purpose of the Bank Select Register (BSR) in the PIC18FXXX
microcontroller?
2.Which of the following is true about the Program Memory in the PIC18FXXX
microcontroller?
3.What happens when the Watchdog Timer (WDT) in the PIC18FXXX microcontroller is
not cleared within the designated time?
D) An interrupt is triggered.
A) STATUS register
B) TRIS register
C) CONFIG register
D) PORT register
1. Which of the following bits in the T1CON register is used to select the clock
source for Timer1 in the PIC18F microcontroller?
A) `TMR1CS`
B) `TMR1ON`
C) `T1CKPS`
D) `T1OSCEN`
Answer: A) `TMR1CS`
2. In the PIC18F microcontroller, which CCP mode allows capturing the value of
the timer when an event occurs on the CCP pin?
A) PWM Mode
B) Capture Mode
C) Compare Mode
D) Timer Mode
3. Which register is responsible for configuring the analog channels and voltage
reference for the ADC module in the PIC18F microcontroller?
A) `ADCON1`
B) `ADRES`
C) `PORTA`
D) `TRISA`
Answer: A) `ADCON1`
4. What is the function of the PIR1 register in the context of interrupts in the
PIC18F microcontroller?
5. In DC motor speed control using CCP in PWM mode, what parameter of the
PWM signal directly affects the speed of the motor?
Unit: 4
1.What is the primary purpose of Timer 0 and Timer 1 in PIC18F microcontrollers?
● A) INTCON
● B) PIR1
● C) IPR1
● D) SFR
● Answer: A) INTCON
3.In the context of CCP modes in PIC18F, what does PWM stand for?
● A) Pulse Width Modulation
● B) Phase Width Modulation
● C) Pulse Wave Modulation
● D) Phase Wave Modulation
● Answer: A) Pulse Width Modulation
5.Which of the following is a key feature of the in-built ADC in PIC18F microcontrollers?
a) Level 0
b) Level 1
c) Level 2
d) Level 3
5.A PID controller can be implemented using a microcontroller to improve the performance of a
DC motor speed control system by:
Question 1: Which of the following peripherals is NOT commonly supported by the PIC
18FXXXX series microcontrollers?
A) Timers
B) ADC (Analog-to-Digital Converter)
C) DAC (Digital-to-Analog Converter)
D) UART (Universal Asynchronous Receiver/Transmitter)
Answer: C) DAC (Digital-to-Analog Converter)
Question 5: When interfacing a temperature sensor with the PIC18F microcontroller using the
ADC, which control register is used to select the analog input channel?
A) ADCON0
B) ADCON1
C) ADCON2
D) ADRESL
Answer: A) ADCON0
Question 6: In the PIC18F microcontroller, which of the following registers is primarily
responsible for configuring the mode of Timer0?
A) T0CON
B) T1CON
C) INTCON
D) PR2
Answer: A. T0CON
Question 7: When configuring a Capture mode in the CCP (Capture/Compare/PWM) module of
the PIC18F, what edge is captured when the CCPxM3 bits in the CCPxCON register are
configured as '0101'?
A) Rising Edge
B) Falling Edge
C) Every Rising and Falling Edge
D) Every 4th Rising Edge
Answer: B. Falling Edge
Question 4: In PWM generation using the CCP module of PIC18F, the duty cycle can be
adjusted by modifying which of the following registers?
A) PR2 and TMR2
B) CCPxCON and T2CON
C) CCPRxL and CCPxCON
D) TMR1 and CCPxL
Answer: C) CCPRxL and CCPxCON
Question 5: The in-built ADC of the PIC18F microcontroller features an ADCON1 register that
is primarily responsible for:
A) Selecting the clock source for the ADC module.
B) Configuring the reference voltage and input channels.
C) Enabling the ADC module.
D) Reading the conversion result from the ADC module.
Answer: B. Configuring the reference voltage and input channels.
1. Which mode of operation is selected when the TMR0 module is configured as a 16-bit timer
in PIC18F?
A) Mode 0
B) Mode 1
C) Mode 2
D) Mode 3
Answer: B) Mode 1
2. What does the RBIF bit in the INTCON register of PIC18F signify?
A) TMR0 Overflow Interrupt Flag
B) PORTB Change Interrupt Flag
C) External Interrupt Flag
D) ADC Interrupt Flag
Answer: B) PORTB Change Interrupt Flag
3. In CCP mode for PWM generation, what is the main role of the PR2 register?
A) Sets the duty cycle
B) Determines the PWM frequency
C) Configures the CCP mode
D) Controls the ADC sampling rate
Answer: B) Determines the PWM frequency
5. Which control register is primarily responsible for starting the Analog-to-Digital Conversion
(ADC) in PIC18F?
A) ADCON0
B) ADCON1
C) PIR1
D) INTCON
Answer: A) ADCON0
Question 1: Which of the following is true about Timer0 in PIC18FXXXX when operating in
Mode 0?
a) It functions as an 8-bit timer/counter.
b) It functions as a 16-bit timer/counter.
c) It functions as a 32-bit timer/counter.
d) It is used exclusively for PWM generation.
Answer: a) It functions as an 8-bit timer/counter.
Question 2: Which register is primarily responsible for enabling or disabling global interrupts in
PIC18FXXXX?
a)INTCON
b) TMR1
c) PIR1
d) TRISB
Answer: a) INTCON
Question 4: What happens when a Timer1 overflow occurs while interrupts are enabled in
PIC18FXXXX?
a) The timer stops counting.
b) The TMR1IF flag is set and an interrupt is generated if enabled.
c) The timer automatically resets and continues counting.
d) The program counter resets to the beginning of the code.
Answer: b) The TMR1IF flag is set and an interrupt is generated if enabled.
Question 5: In the PWM mode of the CCP module in PIC18FXXXX, which register controls the
duty cycle?
a) CCP1CON
b) PR2
c) CCPR1L
d) T2CON
Answer: c) CCPR1L
3. Which register is used to select the ADC channel in the PIC18F microcontroller?
a) ADCON0
b) ADCON1
c) ADCON2
d) ADRES
Answer: a) ADCON0
4. What type of sensor is typically interfaced with the ADC of a PIC18F microcontroller?
a) Digital sensor
b) Analog sensor
c) Binary sensor
d) Boolean sensor
Answer: b) Analog sensor
5. Which of the following can be a common application of interfacing a temperature sensor with a
PIC18F microcontroller?
2. Which sensor can be used to detect motion when interfacing with a PIC18FXXXX
microcontroller?
a. LDR sensor
b. PIR sensor
c. Ultrasonic sensor
d. Temperature sensor
Answer: b) PIR sensor
3. Which type of programming language is used to develop embedded applications for the
PIC18FXXXX microcontroller?
a. Assembly language
b. Python
c. Embedded C
d. JavaScript
Answer: c) Embedded C
4. Which communication protocol is commonly used for interfacing external EEPROM with
the PIC18FXXXX microcontroller?
a. UART
b. SPI
c. I2C
d. PWM
Answer: c) I2C
5. Which component is necessary for controlling multiple LEDs with fewer GPIO pins on a
PIC18FXXXX microcontroller?
a. Shift register
b. Diode
c. Capacitor
d. Transistor
Answer: a) Shift register
6. Which of the following is a common interface method used to connect sensors to a PIC 18F
microcontroller?
a. I2C
b. UART
c. SPI
d. All of the above
7. When interfacing a digital sensor with a PIC 18F microcontroller, which type of pin
configuration is generally used?
a. Analog input
b. Digital input
c. PWM output
d. Comparator input
8. For interfacing an LCD display with a PIC 18F microcontroller, which protocol is commonly
employed?
a. SPI
b. I2C
c. Parallel
d. Both B and C
9. What is the purpose of using a voltage divider when interfacing an analog sensor with a PIC 18F
microcontroller?
a. To increase the sensor's signal range
b. To convert the analog signal to a digital one
c. To scale down the sensor's output voltage to match the ADC input range
d. To amplify the signal
Answer: C) To scale down the sensor's output voltage to match the ADC input range
10. In a PIC 18F microcontroller, what is the primary function of the ADC (Analog-to-Digital
Converter)?
a. To generate PWM signals
b. To read digital input signals
c. To convert analog signals into digital values
d. To interface with external memory
13. Which pin configuration is commonly used to interface an LCD with a microcontroller?
a) I2C
b) UART
c) Parallel
d) SPI
Ans: c) Parallel
15. Which type of sensor is typically used for motion detection in embedded systems?
a) Temperature sensor
b) Light sensor
c) PIR (Passive Infrared) sensor
d) Humidity sensor
Ans: c) PIR (Passive Infrared) sensor
a) Data processing
b) Memory allocation
c) Input and output operations
d) Power management
2. Which sensor can be used to detect motion when interfacing with a PIC18FXXXX
microcontroller?
a) LDR sensor
b) PIR sensor
c) Ultrasonic sensor
d) Temperature sensor
Answer: b) PIR sensor
3. Which type of programming language is used to develop embedded applications for the
PIC18FXXXX microcontroller?
a) Assembly language
b) Python
c) Embedded C
d) JavaScript
Answer: c) Embedded C
4. Which communication protocol is commonly used for interfacing external EEPROM
with the PIC18FXXXX microcontroller?
a) UART
b) SPI
c) I2C
d) PWM
Answer: c) I2C
5. Which component is necessary for controlling multiple LEDs with fewer GPIO pins on a
PIC18FXXXX microcontroller?
a) Shift register
b) Diode
c) Capacitor
d) Transistor
Answer: a) Shift register
1)Which register is used to configure the edge trigger for the RB0/INT pin?
a) INTCON
b) OPTION_REG
c) TMR0
d) T1CON
Answer: b) OPTION_REG
2)Which timer is typically used with the CCP module in PWM mode?
a) Timer2
b) Timer0
c) Timer1
d) Timer3
Answer: a) Timer2
5)In Compare mode, what occurs when the TMR1 register value matches the
CCPR1 value?
a) An interrupt is generated
b) The CCP pin changes state
c) Both a and b
d) The timer resets
Answer: c) Both a and b
3. Which of the following tools is commonly used for debugging embedded C code on a
PIC microcontroller?
A) MPLAB X IDE
B) Keil uVision
C) Arduino IDE
D) Visual Studio Code
Answer: A) MPLAB X IDE
5. What is the primary purpose of using a test board in embedded system design?
A) To integrate multiple microcontrollers
B) To provide a stable environment for testing and debugging code
C) To reduce the cost of development
D) To increase the speed of the microcontroller
Answer: B) To provide a stable environment for testing and debugging code
A) PORTA
B) PORTB
C) PORTC
D) PORTD
A) led_write()
B) digitalWrite()
C) gpio_toggle()
D) set_led()
A) Infrared (IR)
B) Ultrasonic
D) Visible Light
5. When interfacing a 4x4 keypad with a microcontroller, how many pins are
required to read the input from the keypad?
A) 4 pins
B) 8 pins
C) 16 pins
D) 12 pins
1. What does the term "interrupt" refer to in the context of PIC18FXXXX microcontrollers?
b) A software subroutine
2. Which register pair in the PIC18FXXXX microcontroller is used to control the PWM duty cycle?
a) UART
b) SPI
c) I2C
d) CAN
4. Which of the following sensors would typically require the use of the ADC module for interfacing with
a PIC18FXXXX microcontroller?
a) Digital accelerometer
d) RFID reader
5. When interfacing an LED with a PIC18FXXXX microcontroller, what is the purpose of the
current-limiting resistor?
A) Capture
B) Compare
C) PWM
2)In CCP PWM mode, the duty cycle of the PWM signal is determined by the ratio of the CCPx value to
the:
A) TMR0
B) TMR1
C) CCPRx
D) PR2
3)How can you interface a temperature sensor (e.g., LM35) to the ADC of the PIC18FXX
microcontroller?
A) 8-bit
B) 10-bit
C) 12-bit
D) 16-bit
5)How can you use CCP PWM to control the speed of a DC motor?
- A) LCD_Init(8);
- B) lcd_cmd(0x38);
- C) LCD_Command(8);
- D) lcd_config(0x38);
Answer: B) lcd_cmd(0x38);
2. How many data pins are required to interface a character LCD in 4-bit mode?e?
- A) 8
- B) 6
- C) 4
- D) 2
Answer:C) 4
- A) lcd_cmd(cmd);
- B) lcd_write(cmd);
- C) LCD_Send(cmd);
- D) LCD_Command(cmd);
Answer:A) lcd_cmd(cmd);
- A) lcd_print(char);
- B) LCD_Display(char);
- C) lcd_write(char);
- D) LCD_Send(char);
Answer: C) lcd_write(char);
1. What does the term "interrupt" refer to in the context of PIC18FXXXX microcontrollers?
b) A software subroutine
2. Which register pair in the PIC18FXXXX microcontroller is used to control the PWM duty cycle?
a) UART
b) SPI
c) I2C
d) CAN
4. Which of the following sensors would typically require the use of the ADC module for interfacing with
a PIC18FXXXX microcontroller?
a) Digital accelerometer
d) RFID reader
5. When interfacing an LED with a PIC18FXXXX microcontroller, what is the purpose of the
current-limiting resistor?
Answer: B) To stabilize the input voltage by filtering out noise and voltage spikes
3)Which of the following types of motion detectors is commonly used for detecting the presence
of a person by sensing body heat?
A) Ultrasonic sensor
B) Passive Infrared (PIR) sensor
C) Microwave sensor
D) Laser sensor
4)When interfacing a 16x2 LCD with a microcontroller, what is the purpose of the RS (Register
Select) pin?
Answer: B) To select between sending data to the data register or sending commands to the
instruction register
5)When interfacing an LED with a microcontroller, why is a current-limiting resistor typically
used in series with the LED?
1. Which Special Function Register (SFR) in the PIC18F microcontroller is responsible for
managing global and peripheral interrupts, including enabling or disabling all unmasked
interrupts?
A) PORTB
B) INTCON
C) PIR1
D) TMR0
Answer:
B) INTCON
2. Which register in the PIC18F microcontroller controls the selection of the analog input
channel for the ADC module?
A) ADCON0
B) ADRESL
C) ADCON1
D) ADCON2
Answer:
A) ADCON0
3. In the PIC18F microcontroller's ADC module, where is the result of the analog -to-digital
conversion stored?
A) ADCON0 & ADCON1
B) PORTB & PORTC
C) ADRESL & ADRESH
D) TMR0L & TMR0H
Answer:
C) ADRESL & ADRESH
4. In Pulse Width Modulation (PWM), what does the duty cycle represent?
A) The number of pulses per second
B) The duration of one complete cycle
C) The percentage of time the signal is high during one period
D) The amplitude of the pulse signal
Answer:
C) The percentage of time the signal is high during one period
5. Which of the following is a common application of Pulse Width Modulation (PWM)?
A) Generating high-frequency audio signals
B) Regulating motor speed
C) Amplifying analog signals
D) Measuring temperature
Answer:
B) Regulating motor speed
2. Interfacing of LED
Q3: What is the typical current required to light an LED connected to a
microcontroller?
a) 1 mA
b) 10 mA
c) 20 mA
d) 50 mA
Ans: c) 20mA
3. Motion Detectors
Q4: Which type of sensor is commonly used for motion detection in
embedded systems?
a) LDR (Light Dependent Resistor)
b) PIR (Passive Infrared Sensor)
c) Thermistor
d) Piezoelectric Sensor
Ans: b) PIR (Passive Infrared Sensor)
4.Design of PIC Test Board and Debugging
Q5: What is the primary purpose of a PIC test board?
a) To permanently program a microcontroller.
b) To test and debug the functionality of a PIC microcontroller.
c) To provide additional memory for a microcontroller.
d) To control the power supply to a microcontroller.
Ans: b) To test and debug the functionality of a PIC microcontroller.
1. Which register would you configure to enable internal pull-up resistors for a PORTB
pin in a PIC microcontroller?
- A) TRISB
- B) PORTB
- C) LATB
- D) INTCON2
- Answer: D) INTCON2
2. What is the typical sequence to clear the display of an LCD using embedded C?
- A) lcd_cmd(0x01);
- B) lcd_clear();
- C) lcd_write(0x00);
- D) LCD_Reset();
- Answer: A) lcd_cmd(0x01);
3. Which method is most efficient for detecting a key press in a matrix keypad?
- A) Continuously scanning all rows and columns
- B) Interrupt-driven row scanning
- C) Polling each column in sequence
- D) Using a timer to periodically scan the keypad
- Answer: B) Interrupt-driven row scanning
4. In an embedded home security system, how would you prevent false triggers from a
PIR sensor?
- A) Increase the sensitivity of the PIR sensor
- B) Implement a software filter to require consistent detection over a period
- C) Reduce the power supply voltage to the sensor
- D) Disable the sensor at regular intervals
- Answer: B) Implement a software filter to require consistent detection over a period
Which of the following is the correct method to turn an LED on using a microcontroller GPIO pin?
B) Connect the anode of the LED to the GPIO pin and the cathode to ground through a resistor
C) Connect the cathode of the LED to the GPIO pin and the anode to ground through a resistor
Answer: B) Connect the anode of the LED to the GPIO pin and the cathode to ground through a resistor
When interfacing a 4x4 matrix keyboard with a microcontroller, how does the microcontroller detect
which key is pressed?
B) By continuously scanning rows and columns to detect the shorted pair corresponding to the pressed
key
Answer: B) By continuously scanning rows and columns to detect the shorted pair corresponding to the
pressed key
In a typical motion detector system, how does an ultrasonic sensor detect motion?
C) By emitting sound waves and measuring the time it takes for the echoes to return
Answer: C) By emitting sound waves and measuring the time it takes for the echoes to return
During the debugging process of a PIC microcontroller, which tool is commonly used to step through the
program code and examine the values of registers in real-time?
A) Logic analyzer
B) Oscilloscope
D) Multimeter
In a DAC-based waveform generator, what determines the frequency of the output waveform?
C) The rate at which the digital values are updated (sampling rate)
Answer: C) The rate at which the digital values are updated (sampling rate)
A) SPI
B) UART
C) I2C
D) PWM
Correct Answer: C) I2C
d) To handle interrupts
a) Capture mode
b) Compare mode
c) PWM mode
1. What is the purpose of the PORTB change interrupt in PIC 18FXXXX microcontrollers?
1. Which register is used to control the ADC (Analog-to-Digital Converter) module in PIC 18FXXXX
microcontrollers?
a) ADCON0
b) ADCON1
c) ADCON2
d) ADCON3
Answer: a) ADCON0
1. What is the primary function of the CCP module in DC motor speed control?
2. In PIC18F microcontrollers, which special function register (SFR) is used to enable the global
interrupt?
a) INTCON
b) PIR1
c) PIE1
d) TMR0
Answer: a) INTCON
Question 1: Which mode of the Timer in PIC 18FXXXX is used for generating a square wave output?
A) Mode 0
B) Mode 1
C) Mode 2
D) Mode 3
Answer: B) Mode 1
Question 2: What is the primary function of the CCP (Capture/Compare/PWM) module in PIC
18FXXXX?
A) To generate random numbers
D) To store data
Question 3: Which CCP mode is used to measure the pulse width of an incoming signal?
A) Capture mode
B) Compare mode
C) PWM mode
Question 4: How can the speed of a DC motor be controlled using the CCP module?
A) By adjusting the pulse width of the PWM signal
Question 5: What is the primary function of the ADC (Analog-to-Digital Converter) in PIC 18FXXXX?
A) To convert digital signals into analog signals