Microcontroller MCQ (Multiple Choice Questions)

Here are 1000 MCQs on Microcontroller (chapterwise).

1. Which of the following should a microcontroller at-least should consist of?
a) CPU, ROM, I/O ports, and timers
b) RAM, ROM, I/O ports, and timers
c) CPU, RAM, I/O ports, and timers
d) CPU, RAM, ROM, I/O ports, and timers
View Answer

Answer: d
Explanation: A microcontroller at least consists of a processor as its CPU with RAM, ROM, I/O ports and timers. It may contain some additional peripherals like ADC, PWM, etc.

2. Which of the following buses are present in a microcontroller for transferring data from one place to another?
a) data bus only
b) data bus, address bus
c) address bus only
d) address bus, data bus, control bus
View Answer

Answer: d
Explanation: There are 3 buses present in a microcontroller they are data bus (for carrying data from one place to another), address bus (for carrying the address to which the data will flow) and the control bus (which tells the controller to execute which type of work at that address may be it read or write operation).

3. Which of the following file extension that is loaded in a microcontroller for executing any instruction?
a) .c
b) .txt
c) .hex
d) .doc
View Answer

Answer: c
Explanation: Microcontrollers are loaded with .hex extension as they understand the language of 0’s and 1’s only.

4. Which of the following architecture is followed by general-purpose microprocessors?
a) Von Neumann architecture
b) Harvard architecture
c) None of the mentioned
d) All of the mentioned
View Answer

Answer: a
Explanation: General purpose microprocessors make use of Von Neumann architecture as here a simpler design is offered.

5. Which of the following microcontroller doesn’t match with its architecture below?
a) ARM7 – Von Neumann
b) Microchip PIC – Harvard
c) ARM9 – Harvard
d) MSP430 – Harvard
View Answer

Answer: d
Explanation: MSP430 supports Von Neumann architecture.
advertisement
advertisement

6. When the microcontroller executes some arithmetic operations, then the flag bits of which of the following register are affected?
a) DPTR
b) PSW
c) PC
d) SP
View Answer

Answer: b
Explanation: It stands for program status word. It consists of carry, auxiliary carry, overflow, parity, register bank select bits etc which are affected during such operations.

7. Which of the following steps have to be followed for interfacing a sensor to a microcontroller 8051?
a) interface sensor with ADC and ADC with 8051
b) interface sensor with the MAX232, send now to microcontroller, analyse the results
c) make the appropriate connections with the controller, ADC conversion, analyse the results
d) none of the mentioned
View Answer

Answer: a
Explanation: For interfacing a sensor with an 8051 microcontroller, we need ADC in between because output of sensor is analog and microcontroller works on digital signals only. So whatever signal generated by the sensor is converted into its digital equivalent using ADC and equivalent digital signal is given to the microcontroller for processing.

8. Which of the following devices are specifically being used for converting serial to parallel and from parallel to serial respectively?
a) microcontroller
b) timers
c) counters
d) registers
View Answer

Answer: d
Explanation: Some registers like the parallel in serial out and serial in parallel out are used to convert serial data into parallel and vice versa respectively.

9. Which of the following pins of a microcontroller are directly connected with 8255?
a) WR
b) D0-D7
c) RD
d) All of the mentioned
View Answer

Answer: d
Explanation: RD, WR, D0-D7 all are directly connected to the 8051 for telling the chip about the control signals and also for transferring the data.

10. Why are solid-state relays advantageous over electromechanical relays?
a) they need less voltage to be energised
b) they need zero voltage circuit
c) they need less current to be energised
d) none of the mentioned
View Answer

Answer: c
Explanation: Solid-state relays are advantageous over electromechanical relays because their switching response time is much faster than electromechanical relays as solid-state relays are made-up of semiconductor materials. Also, solid-state relays required low input current for operation and small packaging make them ideal for microcontrollers.

11. The total space for the data memory available in the AVR-based microcontroller is?
a) FFFH
b) FH
c) FFFFH
d) FFFFFFFH
View Answer

Answer: c
Explanation: The maximum value that can be loaded in the code memory of an AVR based microcontroller is FFFFH.

12. Which of the following is correct about BRNE instruction in avr microcontrollers?
a) it is used to jump to the given mentioned label when the zero flag accounts to 0
b) it is used to check the zero flag
c) it is used to compare two registers
d) it is used to compare two values
View Answer

Answer: a
Explanation: BRNE label instruction is used to jump to that particular address denoted by label if condition (Z=0) is true or satisfied. If the condition is not satisfied then it will execute the next immediate instruction.

13. In AVR, which of the following registers are there for the I/O programming of ports?
a) PIN
b) DDR
c) PORT
d) All of the mentioned
View Answer

Answer: d
Explanation: For I/O programming of the ports in AVR microcontrollers, there are basically three main registers. They are PORT, PIN, DDR, so all of the mentioned is the right option.

14. What will happen in that condition, if an interrupt occurs while the microcontroller is serving any other interrupt?
a) the interrupt that is more priority in the interrupt vector table will be served first
b) both the interrupts will be handled simultaneously
c) the interrupt having low priority in the interrupt vector table will be served first
d) the interrupt which is being done first will be served first
View Answer

Answer: a
Explanation: If two or more interrupts occur simultaneously then the interrupt that is having more priority in the interrupt vector table will be served first.
advertisement

15. Which of the following bits are used for setting the data frame size?
a) MPCM
b) DOR
c) U2X
d) UCSZ0
View Answer

Answer: d
Explanation: UCSZ0 and UCSZ1 bits of the UCSRB register and the UCSZ2 bit of the UCSRC register are used for setting the data frame size in AVR based microcontrollers.

16. What is the internal Vref of an Atmega32 series?
a) 3.3V
b) 2.56V
c) 5V
d) all of the mentioned
View Answer

Answer: b
Explanation: 2.56V is the internal Vref selected for an Atmega32 series based microcontrollers.

17. The 8255 is a ______ chip.
a) Digital to analog
b) Input/Output
c) Analog to Digital
d) None of the mentioned
View Answer

Answer: b
Explanation: The 8255 is Input/Output (I/O) chip. It has three separate accessible ports. The 8255 chip is used to expand the I/O ports of microcontrollers.

18. Which of the following pins of a microcontroller are directly connected with 8255?
a) WR
b) D0-D7
c) RD
d) All of the mentioned
View Answer

Answer: d
Explanation: RD, WR, D0-D7 all are directly connected to the 8051 for telling the chip about the control signals and also for transferring the data.

19. Does 8255 have handshaking capability?
a) depends on the conditions
b) cant be said
c) yes
d) no
View Answer

Answer: c
Explanation: 8255 is a device that with the help of its handshaking property gets interfaced with any microcontroller.
advertisement

20. Why are ULN2803 normally used between the microcontrollers and the relays?
a) for increasing the voltage capability required by a relay
b) for switching purposes
c) for increasing the current capability required by a relay
d) all of the mentioned
View Answer

Answer: c
Explanation: More current is desired for driving a motor with the help of a relay, so a ULN2803 is used for increasing the current as per the requirement of the relay.

21. Why are optoisolators normally used between the microcontrollers and the ULN2803?
a) to reduce the back emf
b) to increase the current
c) to increase the voltage
d) to optimize the current
View Answer

Answer: a
Explanation: Opto isolators are used between the microcontrollers and the ULN2803 chips in order to decrease the back emf from the ULN2803 and to save the microcontrollers for a long time.

22. Which of the following bit/s of the status register that allows the microcontroller to operate in its low power mode?
a) CPU off
b) Z
c) N
d) Reserved
View Answer

Answer a
Explanation: The CPU off bit, OSC off bit, SCG0 bit, SCG1 bit of the status register are used to allow the microcontroller to operate in its low power mode.

23. To improve the efficiency of an MSP430 based microcontroller, for one register
a) there are two values for each addressing mode
b) there is only one value for all addressing modes
c) there are 4 values for four addressing modes
d) there are 2 values for four addressing modes
View Answer

Answer: c
Explanation: In MSP430, there are namely 4 addressing modes. So the main advantage of this controller( which basically increases its efficiency )is that for one register their exists 4 different values for 4 different addressing modes of the controller.

24. Which of the following is the basic functions of a timer?
a) it can control the compare, capture mode
b) it provided a time delay
c) it can act as a counter
d) all of the mentioned
View Answer

Answer: d
Explanation: Timers are used to provide a time delay, they can even act as a counter and control the compare capture mode of a microcontroller.

25. Which of the following is correct about WDTCTL?
a) it is guided against accidental writes that require a password
b) a reset will occur if a value with an incorrect password is written to WDTCTL
c) it is a 16 bit register
d) all of the mentioned
View Answer

Answer: d
Explanation: WDTCTL is a 16 bit register that is used for protecting the microcontroller. It actually resets the value when an incorrect password is written to WDTCTL.

26. What is the function of this instruction “WDTCTL = WDTPW | WDTCONFIG”, where **#define WDTCONFIG (WDTCNTCL|WDTSSEL)**
a) it configures and sets the watchdog timer
b) it stops the watchdog timer
c) it sets the watchdog timer
d) it configures and clears the watchdog timer
View Answer

Answer: d
Explanation: WDTCTL = WDTPW | WDTCONFIG instruction is used to clear and configure the watchdog timer of a microcontroller.


Chapterwise Multiple Choice Questions on Microcontroller

Microcontroller MCQ - Multiple Choice Questions and Answers

Our 1000+ MCQs focus on all topics of the Microcontroller subject, covering 100+ topics. This will help you to prepare for exams, contests, online tests, quizzes, viva-voce, interviews, and certifications. You can practice these MCQs chapter by chapter starting from the 1st chapter or you can jump to any chapter of your choice.
  1. Microcontroller Basics
  2. 8051 Microcontroller
  3. AVR Microcontroller
  4. MSP430 Microcontroller

1. MCQ on Microcontroller Basics

The section contains Microcontroller multiple choice questions and answers on microcontroller basics, von neumann and harward architectures.

  • Introduction to Microcontroller
  • Von Neumann and Harward Architectures
  • 2. 8051 Microcontroller Multiple Choice Questions

    The section contains Microcontroller questions and answers on 8051 architecture, I/O programming, loop and call instructions, arithmetic and logic instructions, timer and interrupt programming, serial port communication, lcd, adc, dac and keyboard interfacing, 8255 and sensor interfacing, rtc and motors interfacing.

  • Architecture
  • Jump, Loop and Call Instructions
  • I/O Port Programming and Addressing Modes
  • Arithmetic and Logic Instructions
  • Timer Programming
  • Serial Port Communication
  • Interrupt Programming
  • LCD Interfacing
  • Keyboard Interfacing
  • ADC, DAC Interfacing
  • Sensor Interfacing
  • Interfacing with 8255
  • Interfacing with RTC
  • Interfacing with Motors
  • 3. AVR Microcontroller MCQ

    The section contains Microcontroller MCQs on avr microcontroller architecture, I/O programming, loop and call instructions, arithmetic and logic instructions, timer and interrupt programming, serial port communication, lcd, adc, dac and keyboard interfacing, 8255 and sensor interfacing, rtc and motors interfacing, spi and i2c protocol.

  • Architecture
  • Jump, Loop and Call Instructions
  • I/O Port Programming and Addressing Modes
  • Arithmetic and Logic Instructions
  • Timer Programming
  • Interrupt Programming
  • Serial Port Communication
  • LCD Interfacing
  • Keyboard Interfacing
  • ADC, DAC Interfacing
  • Sensor Interfacing
  • Interfacing with 8255
  • Interfacing with RTC
  • Interfacing with Motors
  • SPI Protocol
  • I2C Protocol
  • 4. MSP430 Microcontroller Multiple Choice Questions

    The section contains Microcontroller multiple choice questions and answers on msp430 architecture, addressing modes, functions and subroutines, interrupts, low power modes, digital inputs and outputs, timers, watchdog timer, timer a and b, mixed signal systems, comparator, successive approximation adc, sigma delta adc, communication, spi, i2c and asynchronous serial communication.

  • Architecture
  • Addressing Modes
  • Functions and Subroutine
  • Interrupts
  • Low Power Modes
  • Digital Inputs, Outputs and Delays
  • Timers
  • Watchdog Timer
  • TIMER1
  • TIMER_A
  • TIMER_B
  • Mixed-Signal Systems: Analog Input and Output
  • Comparator
  • Successive Approximation ADC
  • Sigma Delta ADC
  • Communication
  • SPI
  • I2C
  • Asynchronous Serial Communication
  • If you would like to learn "Microcontroller" thoroughly, you should attempt to work on the complete set of 1000+ MCQs - multiple choice questions and answers mentioned above. It will immensely help anyone trying to crack an exam or an interview.

    Wish you the best in your endeavor to learn and master Microcontroller!

    advertisement
    Manish Bhojasia - Founder & CTO at Sanfoundry
    Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

    Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.