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.
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.
Below are the some features of 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)
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
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.
The applications of 8051 Microcontroller is involved in 8051 based projects. Below are the list of 8051 projects .
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:
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.
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
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
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.
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.
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.
At location 0x00 for internal or external memory
128 bytes of RAM (from 0x00 to 0x7F) and can be used to store data.
64K data memory
Programmer uses this file to find the syntax errors and later fix them.
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.
The bit addressable memory in 8051 is compose from 210 bits: bit address space: 20H – 2FH bytes RAM = 00H – 7FH bits address, SFR registers.
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.
The memory addresses from 80H to 0FFH are called SFR. These are 128 bytes registers specially designed for interrupts and few other operations.
16-bit address bus
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.
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