Interview Questions.

Top 100+ 8051 Microcontroller Interview Questions And Answers

fluid

Top 100+ 8051 Microcontroller Interview Questions And Answers

Question 1. Introduction Of 8051 Microcontroller Architecture?

Answer :

In 1981, Intel Corporation added an 8-bit microcontroller called the 8051. The 8051 have become extensively famous after Intel allowed other producers to make and marketplace any flavors of the 8051. They please with the circumstance that they continue to be code-well suited with the 8051. This has brought about many, versions of the 8051 with different speeds and amounts of on-chip ROM marketed by way of more than half of a dozen manufacturers. It is vital to notice that even though there are special flavors of the 8051 in terms of speed and quantity of on-chip ROM, they may be all well matched with the authentic 8051 as a ways as the instructions are concerned. This method that in case you write your application for one, it'll run on any of them regardless of the manufacturer.

Question 2. Intel 8051 Follows Which Architecture?

Answer :

Intel 8051 is Harvard Architecture.

PLC/Microcontrollers/Microprocessors Interview Questions
Question three. What Is The Difference Between Harvard Architecture And Von Neumann Architecture?

Answer :

The call Harvard Architecture comes from the Harvard Mark. The maximum apparent characteristic of the Harvard Architecture is that it has bodily separate signals and storage for code and statistics reminiscence. It is viable to access application memory and statistics memory concurrently. Typically, code (or application) memory is study-most effective and facts memory is examine-write. Therefore, it is not possible for program contents to be changed by means of this system itself.

The von Neumann Architecture is known as after the mathematician and early computer scientist John von Neumann. Von Neumann machines have shared alerts and reminiscence for code and information. Thus, the program may be without problems changed with the aid of itself due to the fact that it's miles saved in examine-write reminiscence.

Question 4. 8051 Was Developed Using Which Technology?

Answer :

Intel’s original MCS-51 own family was developed using NMOS generation, however later variations, diagnosed via a letter C of their name (e.G., 80C51) used CMOS era and eat much less electricity than their NMOS predecessors. This made them greater appropriate for battery-powered devices.

Assembly Programming Tutorial
Question 5. Why 8051 Is Called 8 Bit Microcontroller?

Answer :

The Intel 8051 is an 8-bit microcontroller which means that that maximum to be had operations are limited to 8 bits.

Assembly Programming Interview Questions
Question 6. What Is The Width Of Data Bus?

Answer :

8-bit information bus

Question 7. What Is The Width Of Address Bus?

Answer :

sixteen-bit address bus

Digital Logic Design Interview Questions
Question 8. List Out The Features Of 8051 Microcontroller?

Answer :

40 Pin IC.
128 bytes of RAM.
4K ROM.
2 Timers (Timer zero and Timer 1).
32 Input/ Output pins.
1 serial port.
6 Interrupts (Including Reset). 
Question nine. What Location Code Memory Space And Data Memory Space Begins?

Answer :

At vicinity 0x00 for inner or outside memory

Question 10. How Much On Chip Ram Is Available?

Answer :

128 bytes of RAM (from 0x00 to 0x7F) and can be used to keep statistics.

Question 11. List Out Addressing Modes In Mcs-fifty one?

Answer :

Direct Addressing
Register Addressing
Register Indirect Addressing
Implicit Addressing
Immediate Addressing
Index Addressing
 

Question 12. How Much Total External Data Memory That Can Be Interfaced To The 8051?

Answer :

64K data reminiscence

PLC/Microcontrollers/Microprocessors Interview Questions
Question thirteen. What Is Special Function Registers (sfr)?

Answer :

The reminiscence addresses from 80H to 0FFH are called SFR. These are 128 bytes registers particularly designed for interrupts and few other operations.

Question 14. Give Example Of Bit Address And Byte Address?

Answer :

Example: bit cope with 87h –> byte cope with 80h, bit #7

Question 15. What Are The Types Of Interrupts In 8051?

Answer :

External interrupt zero (IE0) has highest precedence among interrupts.
Timer interrupt 0 (TF0)
External interrupt 1 (IE1)
Timer interrupt 1 (TF1) has lowest precedence amongst different interrupts.
Serial port Interrupt
Reset.
Question sixteen. What Are The Four Distinct Types Of Memory In 8051?

Answer :

Internal RAM
Special characteristic registers
Program memory
External facts reminiscence
 

Question 17. Tell The Addresses Which Are Bit Addressable?

Answer :

The bit addressable reminiscence in 8051 is compose from 210 bits: bit cope with area: 20H – 2FH bytes RAM = 00H – 7FH bits cope with, SFR registers.

Question 18. What Is Lst File?

Answer :

This document is likewise referred to as as listing report.
It lists the opcodes, addresses and errors detected by the assembler.
List file is produced simplest when indicated with the aid of the consumer.
It can be accessed by using an editor and displayed on monitor display or printed.
Programmer uses this document to find the syntax errors and later restoration them.

Assembly Programming Interview Questions
Question 19. Explain Db.?

Answer :

DB is referred to as as outline byte used as a directive within the assembler.
It is used to define the eight bit data in binary, hexadecimal or decimal formats.
It is the handiest directive that may be used to outline ASCII strings larger than  characters.
DB is also used to allocate reminiscence in byte sized chunks.
The assembler constantly converts the numbers into hexadecimal.
Question 20. What Is Equ?

Answer :

EQU is the equate assembler directive used to outline a regular with out occupying a reminiscence vicinity.
It pals a constant cost with data label.
Whenever the label seems within the application, consistent cost is substituted for label.
Advantage: The constant value taking place at numerous positions in a program can be changed straight away the usage of this directive.
Syntax: label EQU steady fee
Question 21. How Are Labels Named In Assembly Language?

Answer :

Label name should be specific and have to incorporate alphabetic letters in each uppercase and lowercase.
1st letter should usually be an alphabetic letter.
It can also use digits and unique characters?,.,@,_,$.
Label ought to not be one of the reserved phrases in assembly language.
These labels make this system much simpler to examine and hold.
Question 22. Are All The Bits Of Flag Register Used In 8051?

Answer :

The flag sign in additionally known as as the software popularity phrase uses best 6 bits.
The  unused bits are consumer definable flags.
Carry, auxiliary convey, parity and overflow flags are the conditional flags used in it.
1 is a user definable bit and PSW.Five can be used as preferred cause bit.
Rest all flags indicate some or the alternative circumstance of an mathematics operation.
 

Question 23. Which Bit Of The Flag Register Is Set When Output Overflows To The Sign Bit?

Answer :

The second little bit of the flag check in is ready when output flows to the signal bit. This flag is also referred to as because the overflow flag. Here the output of the signed number operation is simply too big to be accommodated in 7 bits. For signed numbers the MSB is used to suggest the whether the number is high-quality or terrible. It is best used to come across mistakes in signed wide variety operations.

Question 24. What Are Issues Related To Stack And Bank 1.?

Answer :

Bank 1 uses the equal RAM space because the stack.
Stack pointer is incremented or decremented according to the rush or pop instruction.
If the stack pointer is decremented it makes use of places 7, 6, five… which belong to check in financial institution zero.
If a given program makes use of R1 then stack is furnished new memory location.
The push training may take stack to area zero i.E.It'll run out of space.
Digital Logic Design Interview Questions
Question 25. Explain Jnc.?

Answer :

It is a command used to jump if no carry happens after an arithmetic operation. It is referred to as as bounce if no carry (conditional soar training). Here the carry flag bit in PSW sign up is used to make selection. The processor appears at the deliver flag to see if it's miles raised or now not.
If carry flag is zero, CPU fetches commands from the address of the label.

Question 26. Can Port zero Be Used As Input Output Port?

Answer :

Yes, port 0 can be used as enter output port. Port 0 is an open drain unlike ports 2, three, four. To use it as enter or output the 10k ohm pull-up resisters are related to it externally. To make port zero as enter port it have to be programmed by writing 1 to all bits.

Example:

MOV  A,#0FFH
MOV  P0,A
Question 27. Which 2 Ports Combine To Form The sixteen Bit Address For External Memory Access?

Answer :

Port0 and port2 together shape the 16 bit deal with for external reminiscence.
Port0 makes use of pins 32 to 39 of 8051 to present the lower deal with bits(AD0-AD7)
Port2 uses pins 21 to 28 of 8051 to provide the higher address bits(A8-A15)
This 16 bit address is used to get admission to external reminiscence if attached.
When linked to outside memory they can not be used as enter output ports.
Question 28. Can Single Bit Of A Port Be Accessed In 8051?

Answer :

Yes, 8051 has the capability of getting access to most effective single little bit of a port.
Here only single bit is accessed and rest is unaltered.
SYNTAX: “SETB X. Y”.
Here X is the port number and y is the preferred bit.
Example: SETB P1.2
 Here the second bit of port 1 is about to at least one.

Question 29. Other Than Setb, Clr Are There Any Single Bit Instructions?

Answer :

There are in total 6 single-bit instructions.
CPL bit: supplement the bit (bit= NOT bit).
JB bit, goal: Jump to target if bit identical to at least one.
JNB bit, goal: Jump to goal if bit is equal to zero.
JCB bit, goal: Jump to target if bit is identical to one and then clean bit.




CFG