Introduction
The Microcontroller is an integrated circuit containing a single core processor, minimal memory, and input/output peripherals. The first step in creating any computer's processors was this. Small operations like ADD, SUB, MUL, DIV, and others are made possible with a microcontroller and programming that supports assembly language.

The Microcontroller is the most crucial area of the Electronic and Communication Engineering branch. We have covered numerous significant microcontroller interview questions and their answers.
Microcontrollers are miniature computers housed on a single integrated circuit with several additional components.
27 Most Asked Microcontroller Interview Questions
1. What is the 8051 Microcontroller?
One of the most widely used general-purpose microcontrollers today is the Intel 8051. It is a family of 8-bit microcontrollers created by Intel in 1981. Because it features 128 bytes of RAM, 4Kbytes of ROM, 2 Timers, 1 Serial port, and four ports on a single chip, this Microcontroller is sometimes known as a "system on a chip." The 8051 microcontroller enables the CPU to process 8 bits of data simultaneously. If the data is larger than 8 bits, it must be divided into smaller chunks so that the CPU can handle it easily.
2. What are registers in the Microcontroller?
The register gives processors and microcontrollers a quick means to gather and store data. To conduct operations like addition, subtraction, and other data manipulation activities with a controller or processor, we need registers to process and store the data. We cannot perform these operations directly in memory. The various register types found in microcontrollers can be categorized according to their contents or the instructions that use them.
3. Why is 8051 Called 8 Bit Microcontroller?
Most possible operations on the Intel 8051 are 8-bit operations just because it is an 8-bit microcontroller.
4. What Is The Width Of the Address Bus?
The Width Of the Address Bus is 16 bits.
5. What Are The Types Of Interrupts In 8051?
Following are the types of interrupts in 8051:
- External interrupt 0 (IE0) has the highest priority among interrupts.
- Timer interrupt 0 (TF0)
- External interrupt 1 (IE1)
- Timer interrupt 1 (TF1) has the lowest priority among other interrupts.
- Serial port Interrupt
- Reset.
6. What Are The Four Distinct Types Of Memory In 8051?
The Four Distinct Types Of Memory In 8051 are:
- Internal RAM
- Special function registers
- Program memory
- External data memory

7. 8051 was developed using which technology?
The MCS-51 family from Intel was initially created using NMOS technology, but later iterations, denoted by a letter C in their designation (such as the 80C51), employed CMOS technology and used less power than their NMOS forebears. They become more appropriate for battery-powered devices as a result.
8. What is the difference between bit addressable and byte address in microcontroller 8051?
When data is stored in microcontroller registers and may be changed bit by bit, the register is said to be a bit addressable ( 0x20 to 2F). The other is called "byte-addressable," as it manipulates data bytes at a time (GPR register is a byte-addressable).
9. Explain what real-time embedded systems are?
Computer systems that monitor, react to, or control an external environment are known as real-time embedded systems. Actuators, sensors, and input-output interfaces link this environment to the computer system.
Also read - AMD vs Intel
10. Explain Harvard Architecture Microcontroller?
The Harvard architecture-based microcontroller has physically separate memory storage for programme code (instructions) and data, which are referred to as the programme memory and the data memory, respectively. As a result, they have separate bus lines and can be accessed at the same time. As a result, the Harvard architecture-based microcontroller can execute instructions in a single machine cycle.
The complexity of the microcontroller design and the development cost increase due to the two physically separate bus lines. They are most commonly found in modern microcontrollers and digital signal processing units.

11. What Is The Difference Between Harvard Architecture And Von Neumann Architecture?
The Harvard Mark is the source of the name Harvard Architecture. Harvard Architecture's physical separation of signals and storage for code and data memory is its glaring feature. Program memory and data memory can both be accessed simultaneously. Data memory is often read-write, but code (or program) memory is typically read-only. As a result, the program itself cannot alter the contents of the program.
John von Neumann, a mathematician and pioneer in the field of computing, is the name of the von Neumann architecture. Von Neumann machines communicate signals and have shared data and code memory. Since the program is kept in read-write memory, it may readily be changed by itself.
12. Which Bit Of The Flag Register Is Set When Output Overflows To The Sign Bit?
When output flows to the sign bit, the second bit of the flag register is set. The overflow flag is another name for this flag. In this case, the signed number operation's output is too big to fit 7 bits. The MSB is used for signed numbers to specify whether the number is positive or negative. It is solely applied to signed number operations mistake detection.
13. Explain Jnc.?
This instruction jumps if there isn't a carry following an arithmetic operation. If there is no carry, it is referred to as a leap (conditional jump instruction). In this case, a choice is made using the carry flag bit in the PSW register. The processor checks to see if the carry flag is raised or not.
14. Mention what the difference between a microprocessor and a microcontroller is?
The Microcontroller has integrated I/O, memory, etc., and was expressly created for control, whereas the microprocessor manages resources (I/O, memory) outside its architecture.
You can also see System Design Interview Questions here.
15. Explain what interrupt latency is? How can you reduce it?
The amount of time needed to return from the interrupt service procedure after addressing a particular interrupt is known as interrupt latency. It is possible to decrease interrupt latency by developing small ISR functions.
16. Why is an infinite loop necessary in embedded systems, please?
Infinite loops are necessary for embedded systems to continually process or check the program's status. A program state might, for instance, be checked constantly for any unusual mistakes that might only occur at run-time, such as memory outages or dividing by zero, etc.
17. Explain what it is semaphore?
In a concurrent system, such as a multiprogramming operating system, a semaphore is an abstract data type or variable used to manage access by numerous processes to a shared resource. There are typically two uses for semaphores.
- To share a common memory space.
- To share access to files.
18. What does DMA address will deal with?
Physical addresses are the focus of DMA addresses. During data transfer, it is a device that directly drives the data and address bus. Therefore, it is only a physical address.
You can also read 8051 Microcontroller Pin Diagram here.
19. What is an Interrupt service routine in a Microcontroller?
The ISR (Interrupt service routine) is called by the Microcontroller when it experiences a sudden interrupt. This procedure stores the address of the current memory address and transfers control to the new interrupt memory address. Following the interruption, the control will return to its original address.
Also see, Bank interview questions
20. What is a PIC microcontroller?
Programmable circuits with many functionalities are PIC microcontrollers (Programmable Interface Controllers Microcontrollers). The Pic microcontroller can be configured to do various functions, including controlling a production line and timing events. Programmable interface controllers are used in various electronic devices, including phones, alarm systems, and computer control systems. PIC controllers come in various forms, but those from the GENIE line are regarded as the best and most affordable.

21. What is a data pointer in 8051 Microcontrollers?
One of the storage registers of 8051 microcontrollers is called the data pointer. The accumulator, the stack pointer (SP), the R register, the B register, and the program counter are additional storage registers in an 8051 microprocessor (PC). The only 2-byte register a user can access in 8051 microcontrollers is the Data Pointer, abbreviated DPTR. The B register and accumulator are two other 1-byte registers. As its name suggests, this data pointer is used for data pointing. The 8051 may access memory from outside the system using it.
22. With a 12 MHz clock frequency, how many instructions (of 1 machine cycle and 2 machine cycle) can it execute per second?
In actuality, a cycle consists of 12 crystal pulses. In other words, if an instruction takes one machine cycle to complete, it will also be completed in 12 crystal pulses. Since one machine cycle is made up of 12 pulses and the crystal pulses 11,059,000 times each second, we can determine how many instruction cycles the 8051 can carry out in a second:
11,059,000 / 12 = 921,583
The 8051 is therefore capable of carrying out 921,583 single-cycle instructions per second. It is commonly believed that the 8051 can execute approximately 1 million instructions per second because a large majority of its instructions are single-cycle instructions. Still, in reality, it can only execute about 600,000 instructions per second on average, depending on the instructions being used.
23. What are data types used in microcontroller programming
Typical data types are a bit, sbit, sfr, float, signed char, unsigned char, enum, signed int, etc.
24. Mention what buses are used for communication in embedded systems?
I2C is one of the buses used for communication in embedded systems: It is utilized for inter-IC communication.
- CAN: It is utilized in vehicles with centralized networks.
- USB: It is used to communicate between the CPU and many devices, including the mouse.
- While PCs, computer network devices, etc., employ standard parallel communication buses like ISA, EISA, and PCI.
25. Explain DB.
In the assembler, DB is known as a defined byte and is used as a command. The 8-bit data can be defined in binary, hexadecimal, or decimal formats. The only directive that allows for the definition of ASCII strings with more than two characters in this one. Memory is also allocated in byte-sized blocks using DB. The numbers are permanently changed into hexadecimal by the assembler.
Click here to learn about oop interview questions here.
26. What are labels in assembly languages?
The start of a statement may include a label. The label serves as an instruction operand and receives the current value of the active location counter during assembly.
27. What is EQU?
The assembler directive EQU defines constants without taking up memory space. It links the data label to a constant value. The constant value is used in place of the label each time it appears in the program.