Understanding 8051 Microcontroller

January 25, 2018, hardwarebee

Also called the Intel MCS-51, the 8051 microcontroller is single chip microcontroller using a complex instruction set computer (CSIC) with a Harvard architecture. It was first developed in 1980 by Intel and it was originally used in embedded systems. It become popular quickly and the original versions of this microcontroller dominated the 1980s and early 1990s. Today, you will find the 8051 microcontroller in various derivatives.


The origins of the 8051 microcontroller go back to its previous version, the MCS-48 that was developed with N-type metal oxide for semiconductor technology (NMOS). The same is true for the MCS-51, but they are more advanced and use less power. Because of their lower power consumption, they are more suited for devices that operate on batteries.



The 8051 microcontroller’s versatility, being able to work in random access memory (RAM), input/output (I/O) interrupt logic, read-only memory (ROM) in addition to a central processing unit (CPU) makes it quite popular. It offers many features, including the following:


  • Compare, multiply, and divide instructions
  • Fast interrupt w/optional register bank switching
  • Dual 16-bit address bus
  • Boolean processor that includes up to 17 instructions
  • 8-bit arithmetic logic and accumulator
  • 8-bit registers, data bus, and 2×16 bit address bus, data pointer, and program counter
  • 128 bytes of on-chip RAM, 4 KiB of on-chip ROM
  • UART serial point, power saving mode, and 2 16-big counter or timers


One feature that separates the 8051 microcontroller from its predecessors is the addition of a Boolean processing engine. This allows for Boolean logic operations to be sent directly on internal ports and registers, along with selected locations of RAM. It was this feature that helped make this microcontroller popular mostly because it helped reduce the size of the code needed by almost a third.


There are four bank selectable working register sets that make an interrupt service routine go much faster. Plus, with a single instruction it can switch to register banks that saves time compared to transferring the registers to designated RAM locations or into a stack.





The 8051 microcontroller has four different types of memory within its Harvard architecture.


  • Program memory
  • Internal RAM
  • External data memory
  • Special function registers


Because of its architecture, it can only used its program memory to execute codes and lacks the instructions to write the program memory per say. This feature is found in almost all versions, so it cannot download new data and use that as part of its program. However, this does mean that the microcontroller is virtually immune to most types of malware, save for those that use the already existing code in the program.


The 8051 microcontroller is still used as discrete parts, although you can mostly find them in the cores of silicon intellectual properties. Some versions have high-level language source code in which the core itself is integrated in established systems. Although restrictive in some ways, the MCS-51 is still popular and has earned its place thanks to its functionality and durability.