8051 Microcontroller Interview questions

 8051 Microcontroller Interview questions

Q1. What is 8051 Microcontroller ?

The Intel 8051 microcontroller is one of the most popular general-purpose microcontrollers in use today. It is an 8-bit family of microcontroller developed by Intel in the year 1981. This microcontroller was also referred to as “system on a chip” because it has 128 bytes of RAM, 4Kbytes of ROM, 2 Timers, 1 Serial port, and four ports on a single chip. 8051 microcontroller allows CPU to work on 8bits of data at a time.n case the data is larger than 8 bits then it has to be broken into parts so that the CPU can process conveniently.

Q2. What are registers in Microcontroller ?

Register provides a fast way to collect and store data using microcontrollers and processors.If we want to manipulate data with a controller or processor by performing tasks like addition, subtraction, and so on, we cannot do that directly in the memory, in order to perform these tasks we need registers to process and store the data. Microcontrollers contain several types of registers that can be classified according to their content or instructions that operate on them. 

The 8051 microcontroller contains mainly two types of registers: 

  • General purpose registers (Byte addressable registers)
  • Special function registers (Bit addressable registers)

The 8051 microcontroller consists of 256 bytes of RAM memory, which is divided into two ways, such as 128 bytes for general purpose and 128 bytes for special function registers (SFR) memory. The memory which is used for general purpose is called as RAM memory, and the memory used for SFR contains all the peripheral related registers like Accumulator, ‘B’ register, Timers or Counters, and interrupt related registers.

Q3. What is an interrupt? List various types of interrupts available in 8051 Microcontroller?

Interrupt: An interrupt is a signal to the processor emitted by hardware or software indicating an event that 

 needs immediate attention. An interrupt alerts the processor to a high-priority condition requiring the interruption of the current code the processor is executing.The processor responds by suspending its current activities, saving its state, and executing a function called an interrupt handler (or an interrupt service routine, ISR) to deal with the event. This interruption is temporary, and, after the interrupt handler finishes, the processor resumes normal activities.There are two types of interrupts: hardware interrupts and software interrupts.

Q4. List Interrupts available in 8051 Microcontroller

  • External interrupt 0 (IE0) has highest priority among interrupts.
  • Timer interrupt 0 (TF0)
  • External interrupt 1 (IE1)
  • Timer interrupt 1 (TF1) has lowest priority among other interrupts.
  • Serial port Interrupt 
  • Reset

Q5. What is stack pointer in 8051 Microcontroller?

In 8051 a stack pointer is 8 bits wide register to access stack.The stack is a section of RAM used by the CPU to store information temporarily information could be data or an address. Generally, 8051 used bank1 of internal RAM as the stack so the default stack pointer is 07H.The stack is used for PUSH, POP, CALL, RET instructions and work on the principle of last in first output (LIFO)

Q6. Explain architecture of 8051 Microcontroller?

8051 Microcontroller is based on Harvard Architecture and developed primarily for use in embedded systems technology.Its architecture consists of following units

  • Central Processor Unit (CPU)
  • Interrupts
  • Memory
  • BUS
  • Oscillator
  • Input/Output Port
  • Timers/Counters


Comments