A microcontroller at-least should consist of: A. CPU, ROM, I/O ports and timers. 10 Microcontroller interview questions and answers. This page describes Microcontroller questionnaire written by specialists in Microcontroller embedded domain. This top 10 Microcontroller interview questions and answers will help interviewee pass the job interview for Microcontroller Handware or programming job position with ease. The particular 8051 Microcontroller is really a Microcontroller created by Intel with introduction,8051 microcontroller interview questions and answers,8051. You will be You will be glad to know that right now 8051 microcontroller multiple choice questions answers PDF is available on our online library. To prepare for entry level position/academic interview. Read online or Download The 8051 Microcontroller And Embedded Systems Basic Question NEW Post quick questions and get answers from multiple tutors. This set of 8051 Micro-controller Multiple Choice Questions & Answers (MCQs) focuses on “I/O Port Programming and Addressing Modes”. Timer/Counter register: 8051 microcontroller has 2-16 bit Timer/counter registers called Timer-reg-T0 And Timer/counter Reg-T1.Each register is 16 bit register divide into lower and higher byte register as shown below: These register are used to hold initial no.
Top 8051 Microcontroller Interview questions and answers asked in interviews
Download 8051 Microcontroller Interview Questions PDF
Below are the list of Best 8051 Microcontroller Interview Questions and Answers
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.
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.
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
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)
Below are the some features of 8051 Microcontroller.
64K bytes on-chip program memory (ROM)
128 bytes on-chip data memory (RAM)
Four register banks
128 user defined software flags
8-bit bidirectional data bus
16-bit unidirectional address bus
32 general purpose registers each of 8-bit
16 bit Timers (usually 2, but may have more or less)
Three internal and two external Interrupts
Four 8-bit ports,(short model have two 8-bit ports)
16-bit program counter and data pointer
Download Free : 8051 Microcontroller Interview Questions PDF
When Microcontroller is under sudden interrupt, it will call ISR (Interrupt service routine) that will store the address of current memory address and takes the control to new interrupt memory address. After the interrupt, the control will transfer back to its previous address.
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.(source: https://en.wikipedia.org/wiki/Interrupt)
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
Address Bus: Address Bus is used for address memory locations and to transfer the address from CPU to Memory of the microcontroller.Microcontroller 8051 has a 16 bit address bus for transferring the data.8051 have four addressing modes they are
Immediate addressing modes.
Bank address (or) Register addressing mode.
Direct Addressing mode.
Register indirect addressing mode.
Data Bus:Data Bus is used to transfer data within Microprocessor and Memory/Input or Output devices. It is bi-directional as Microprocessor requires to send or receive data. The data bus also works as address bus when multiplexed with lower order address bus. 8051 has 8 bits of the data bus, which is used to carry data of particular applications
Control Bus:Control bus manages the information flow between components indicating whether the operation is a read or a write and ensuring that the operation happens at the right time.
Trap interrupt has the highest priority.A trap is an abnormal condition detected by the CPU, which indicates an unknown I/O device is accessed, etc
The applications of 8051 Microcontroller is involved in 8051 based projects. Below are the list of 8051 projects .
Arduino Managed High Sensitive based Power Saver for Street Light Control System
The Temperature Humidity Monitoring System of Soil Based on Wireless Sensor Networks using Arduino
RFID based Electronic Passport System for Easy Governance using Arduino
Arduino based RFID Sensed Device Access
Arduino based DC Motor Speed Control
Arduino Based Line Following Robot
Zigbee based Automatic Meter Reading System
GSM based Electricity Energy Meter Billing with Onsite Display
PC Mouse operated Electrical Load Control Using VB Application
Solar Highway Lighting System with Auto Turn Off in Daytime
8051 Microcontroller based Wireless Energy Meter
Farmer Friendly Solar Based Electric Fence for Deterring Cattles
Vehicle Movement Sensed Streetlight with Daytime auto off Features
The constant growth in information technology has provided many benefits of making use of a microcontroller, integrated circuits, embedded chips, microprocessors, etc. With these technologies, work is done faster and complexity is reduced. The 88051 microcontrollers are used in electronic and electrical circuits. You can also find its application in robotics and artificial intelligence.
Microprocessor differs from microcontrollers in different areas. Based on external peripheral, storage locations like ROM (Read-only memory), RAM (Random access memory) and EEPROM are embedded in microcontroller while external circuits are used in the microprocessor. Every peripheral is on one chip but they are bulky in the microprocessor. The microcontroller is less expensive than microprocessors and devices manufactured with microprocessors are cheaper too because of the metal oxide semiconductor technology used. Microprocessors are faster than microcontrollers.
PIC microcontrollers (Programmable Interface Controllers Microcontrollers) are programmable circuits that perform many functions. Pic microcontroller can be programmed to function as a timer, production line controller and other tasks. You can see programmable interface controllers in applications such as computer control systems, electronic phones, alarm systems, and every other electronic device. PIC controllers exist in different types though ones found in the GENIE range are considered as the best and they are cheap to buy.
There are different uses of the programmable interface controller. Some of the applications are video games, peripherals, audio accessories and many more. Since this circuit is programmable, it can be used for many functions like timer and to control the production line.
The ARM microcontroller is considered by many as the most popular microcontroller existing in the world of the digital embedded system. Many industries prefer to make use of ARM microcontrollers because of the many exciting features. With ARM microcontroller, such industries can easily implement high performing products. The ARM microcontroller is cost-sensitive and its applications range to sensors, wireless networking, automotive body system, and others.
Arm processors or chips are used in different electronic applications or devices. Devices, where the ARM chips are used, include tablets, multimedia players, smartphones, wearables, and other mobile devices. Arm chips need little transistors because of their instruction set. The use of ARM chips to the devices mentioned above and those not mentioned will keep on increasing because of the small size, little consumable power, and reduced complexity.
There are 5 major sources of interrupt an 8051 microcontroller passes through. An interrupt is when the microprocessor stops its operation on a present task to look for signals from another task. It performs its operation on the new task before going back to the first task. The 8051 microcontroller interrupts are:
TF0 which stands for Timer 0 overflow interrupt
TFI which stands for Timer 1 overflow interrupt
INT0 or External hardware interrupt
Int1 or External hardware interrupt
Serial communication interrupt- RI/TI
There are many examples of the microcontroller. Some of the examples are Altera, Atmel, Espressif system, ELAN microelectronics Corp., Maxim Integrated, Cypress Semiconductor, Analog Devices, Intel, Holtek, National Semiconductor, NEC, Freescale Semiconductor, Fujitsu, Panasonic, Microchip technology, Hyperstone, Infineon, Parallax, Nuvoton technology, Sony, Toshiba, Spansion, Rockwell, XMOS, Rabbit semiconductor, Silicon Motion, Redpine signals, Ubicom, Sortable table and many more.
Data pointer in the 8051 microcontrollers is one of the storage registers. Other storage registers in an 8051 microcontroller are the accumulator, the stack pointer (SP), R register, B register and the program counter (PC). The Data Pointer in 8051 microcontrollers in short form DPTR is the only 2-byte register a user can access. Other registers like the B register and accumulator are 1-byte register. This data pointer just like the name implies is for data pointing. With it, the 8051 can access memory outside the system.
A microcontroller is an integrated circuit that governs one particular task in an embedded system. Every typical microcontroller has a memory, a processor and input and output peripheral all on a single chip. In some cases, it is called an embedded controller and it is used in vending machines, vehicles, medical devices, home appliances, robots, and mobile radio transceivers. They are small personal computers used for controlling small features of a bigger component.
A microcontroller has many components. Some of the major components of a microcontroller are Central processing unit(CPU), Input and output ports, Digital analog converters, Random Access Memory)(RAM), Serial interfacing ports, Read-Only Memory(ROM), Oscillatory circuits, interrupt controls, Timers and Counters and Analog to digital converters. Every microcontroller has one or more of the components mentioned above.
There are different types of microcontrollers. They include:
PIC Microcontroller: PIC microcontroller stands for a programmable interface controller used for developing computer robotics, electronics, and similar devices. The PIC controller is made up of data bus, dedicated processor and built-in data memory that plays a role in preparing input and output methods
ARM Microcontroller: It is more popular than other microcontrollers. The ARM means Advanced RISC Machine and widely used by industries because of its unique features. Sensor and wireless networks are some of the devices produced with ARM microcontrollers.
8051 Microcontroller: This is another type of microcontroller develops by Intel in the year 1981. It has 40 pins and four programmable parallel 8-bit ports.
AVR Microcontroller: AVR microcontroller is an advanced Harvard architecture machine. The AVR in full form is Alf and Vegard's RISC Processor.
MSP Microcontroller: The mixed-signal processor is another type of microcontroller from the Texas instruments family. It is cost-effective and gives a good performance in the denser programming code.
About 8051 Microcontroller
8051 microcontroller is developed by Intel. It is an 8-bit microcontroller built on 40 pins DIP (dual inline package), offering 4kb of ROM storage and 128 bytes of RAM storage along with 16-bit timers. 8051 Microcontroller comprised of four parallel 8-bit ports. These ports are programmable and can be configured as per the requirement. An on-chip crystal oscillator is put together in the microcontroller having crystal frequency of 12 MHz. In the following diagram, the system bus attached to all support devices to the CPU. The system bus contains an 8-bit data bus, a 16-bit address bus and bus control signals. All other devices such as interrupt control, timers, program memory, ports, data memory, serial interface, and the CPU are all interfaced together through the system bus.
8051 Microcontroller Interview Questions And Answers
1. 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 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.
2. List some features of 8051 Microcontroller.
Below are the some features of 8051 Microcontroller.
64K bytes on-chip program memory (ROM)
128 bytes on-chip data memory (RAM)
Four register banks
128 user defined software flags
8-bit bidirectional data bus
16-bit unidirectional address bus
32 general purpose registers each of 8-bit
16 bit Timers (usually 2, but may have more or less)
Three internal and two external Interrupts
Four 8-bit ports,(short model have two 8-bit ports)
16-bit program counter and data pointer
3. 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)
4. Which interrupt has highest priority in Microcontroller ?
Trap interrupt has the highest priority.A trap is an abnormal condition detected by the CPU, which indicates an unknown I/O device is accessed, etc
5. What is an Interrupt service routine in Microcontroller?
When Microcontroller is under sudden interrupt, it will call ISR (Interrupt service routine) that will store the address of current memory address and takes the control to new interrupt memory address. After the interrupt, the control will transfer back to its previous address.
8051 Microcontroller Textbook Pdf
6. List some 8051 Microcontroller applications in embedded systems ?
The applications of 8051 Microcontroller is involved in 8051 based projects. Below are the list of 8051 projects .
Arduino Managed High Sensitive based Power Saver for Street Light Control System
The Temperature Humidity Monitoring System of Soil Based on Wireless Sensor Networks using Arduino
RFID based Electronic Passport System for Easy Governance using Arduino
Arduino based RFID Sensed Device Access
Arduino based DC Motor Speed Control
Arduino Based Line Following Robot
Zigbee based Automatic Meter Reading System
GSM based Electricity Energy Meter Billing with Onsite Display
PC Mouse operated Electrical Load Control Using VB Application
Solar Highway Lighting System with Auto Turn Off in Daytime
8051 Microcontroller based Wireless Energy Meter
Farmer Friendly Solar Based Electric Fence for Deterring Cattles
Vehicle Movement Sensed Streetlight with Daytime auto off Features
7. 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.
8. 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.(source: https://en.wikipedia.org/wiki/Interrupt)
9. 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
10. What is Address Bus, Data Bus and Control Bus in Microprocessor 8051 ?
Address Bus: Address Bus is used for address memory locations and to transfer the address from CPU to Memory of the microcontroller. Microcontroller 8051 has a 16 bit address bus for transferring the data.8051 have four addressing modes they are
Immediate addressing modes.
Bank address (or) Register addressing mode.
Direct Addressing mode.
Register indirect addressing mode.
Data Bus: Data Bus is used to transfer data within Microprocessor and Memory/Input or Output devices. It is bi-directional as Microprocessor requires to send or receive data. The data bus also works as address bus when multiplexed with lower order address bus. 8051 has 8 bits of the data bus, which is used to carry data of particular applications
Control Bus: Control bus manages the information flow between components indicating whether the operation is a read or a write and ensuring that the operation happens at the right time.
11. What Is The Difference Between Harvard Architecture And Von Neumann Architecture?
The name Harvard Architecture comes from the Harvard Mark. The most obvious characteristic of the Harvard Architecture is that it has physically separate signals and storage for code and data memory. It is possible to access program memory and data memory simultaneously. Typically, code (or program) memory is read-only and data memory is read-write. Therefore, it is impossible for program contents to be modified by the program itself.
The von Neumann Architecture is named after the mathematician and early computer scientist John von Neumann. Von Neumann machines have shared signals and memory for code and data. Thus, the program can be easily modified by itself since it is stored in read-write memory.
12. 8051 Was Developed Using Which Technology?
Intel’s original MCS-51 family was developed using NMOS technology, but later versions, identified by a letter C in their name (e.g., 80C51) used CMOS technology and consume less power than their NMOS predecessors. This made them more suitable for battery-powered devices.
13. What Location Code Memory Space And Data Memory Space Begins?
14. How Much On Chip Ram Is Available?
8051 Microcontroller And Embedded Systems Pdf
128 bytes of RAM (from 0x00 to 0x7F) and can be used to store data.
15. List Out Addressing Modes In Mcs-51?
Direct Addressing
Register Addressing
Register Indirect Addressing
Implicit Addressing
Immediate Addressing
Index Addressing
16. How Much Total External Data Memory That Can Be Interfaced To The 8051?
17. What Are The Types Of Interrupts In 8051?
8051 Microcontroller Pdf
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.
18. What Is Lst File?
This file is also called as list file.
It lists the opcodes, addresses and errors detected by the assembler.
List file is produced only when indicated by the user.
It can be accessed by an editor and displayed on monitor screen or printed.
Programmer uses this file to find the syntax errors and later fix them.
19. Explain Db.?
DB is called as define byte used as a directive in the assembler.
It is used to define the 8 bit data in binary, hexadecimal or decimal formats.
It is the only directive that can be used to define ASCII strings larger than two characters.
DB is also used to allocate memory in byte sized chunks.
The assembler always converts the numbers into hexadecimal.
20. What Is Equ?
EQU is the equate assembler directive used to define a constant without occupying a memory location.
It associates a constant value with data label.
Whenever the label appears in the program, constant value is substituted for label.
Advantage: The constant value occurring at various positions in a program can be changed at once using this directive.
Syntax: label EQU constant value
21. With 12 MHz clock frequency how many instructions (of 1 machine cycle and 2 machine cycle) it can execute per second?
A cycle is, in reality, 12 pulses of the crystal. That is to say, if an instruction takes one machine cycle to execute, it will take 12 pulses of the crystal to execute. Since we know the crystal is pulsing 11,059,000 times per second and that one machine cycle is 12 pulses, we can calculate how many instruction cycles the 8051 can execute per second:
11,059,000 / 12 = 921,583
This means that the 8051 can execute 921,583 single-cycle instructions per second. Since a large number of 8051 instructions are single-cycle instructions it is often considered that the 8051 can execute roughly 1 million instructions per second, although in reality it is less–and, depending on the instructions being used, an estimate of about 600,000 instructions per second is more realistic.
22. Tell The Addresses Which Are Bit Addressable?
The bit addressable memory in 8051 is compose from 210 bits: bit address space: 20H – 2FH bytes RAM = 00H – 7FH bits address, SFR registers.
23. Explain Jnc.?
It is a command used to jump if no carry occurs after an arithmetic operation. It is called as jump if no carry (conditional jump instruction). Here the carry flag bit in PSW register is used to make decision. The processor looks at the carry flag to see if it is raised or not.
If carry flag is 0, CPU fetches instructions from the address of the label.
24. Other Than Setb, Clr Are There Any Single Bit Instructions?
There are in total 6 single-bit instructions.
CPL bit: complement the bit (bit= NOT bit).
JB bit, target: Jump to target if bit equal to 1.
JNB bit, target: Jump to target if bit is equal to 0.
JCB bit, target: Jump to target if bit is equal to 1 and then clear bit.
25. Which 2 Ports Combine To Form The 16 Bit Address For External Memory Access?
Port0 and port2 together form the 16 bit address for external memory.
Port0 uses pins 32 to 39 of 8051 to give the lower address bits(AD0-AD7)
Port2 uses pins 21 to 28 of 8051 to give the higher address bits(A8-A15)
This 16 bit address is used to access external memory if attached.
When connected to external memory they cannot be used as input output ports.
26. What Are Issues Related To Stack And Bank 1.?
Bank 1 uses the same RAM space as the stack.
Stack pointer is incremented or decremented according to the push or pop instruction.
If the stack pointer is decremented it uses locations 7, 6, 5… which belong to register bank 0.
If a given program uses R1 then stack is provided new memory location.
The push instruction may also take stack to location 0 i.e.it will run out of space.
27. How Are Labels Named In Assembly Language?
Label name should be unique and must contain alphabetic letters in both uppercase and lowercase.
1st letter should always be an alphabetic letter.
It can also use digits and special characters?,.,@,_,$.
Label should not be one of the reserved words in assembly language.
These labels make the program much easier to read and maintain.
28. What Are The Four Distinct Types Of Memory In 8051?
Internal RAM
Special function registers
Program memory
External data memory
8051 Microcontroller Programming Pdf
29. What Is Special Function Registers (sfr)?
The memory addresses from 80H to 0FFH are called SFR. These are 128 bytes registers specially designed for interrupts and few other operations.
30. What Is The Width Of Address Bus?
Career scopes and salary scale
The average job crisis rate is likely to hoist in the job marketplace, however, the obligation of 8051 Microcontroller developers, 8051 Microcontroller programmers, and 8051 Microcontroller engineers are at the upper side. Applicants with in-depth acquaintance and skill-based experience in 8051 Microcontroller technology are expected to take the full improvement of technological expansion. Besides, 8051 Microcontroller has occupied the highest place in the arena of programming languages as it offers a range of features to the developers. An 8051 Microcontroller programmer is expected to take pleasure in minimum salary of 48, 000 dollars per annum. However, the salary of an experienced 8051 Microcontroller developer can rise to double the figure mentioned before. The salaries are very dependent upon the location, business, and the company’s requirements.
Conclusion
The article ‘8051 Microcontroller interview questions’ has answered each advanced 8051 Microcontroller interview questions. In addition, the considerate structured of the 8051 Microcontroller interview questions for experienced is being intended by our experts, which might have assisted candidates in getting answers to all their doubts and not clear ideas. Even then, if learners are still stressed with their confusions and doubts, they may drop in a message about 8051 Microcontroller query or to our experts regarding 8051 Microcontroller interview questions for experienced professionals. Our trainers would be happy to assist and resolve all your 8051 Microcontroller programming issues of the students.Join 8051 Microcontroller Training in Noida, 8051 Microcontroller Training in Delhi, 8051 Microcontroller Training in Gurgaon