introduction to 8051 microcontroller, intro to 8051, basic circuit of 8051 microcontroller, applications of 8051 microcontroller, 8051 microcontroller architecture

Hello Friends! Hope you are doing great. I am back to give you a daily dose of valuable information so you can excel and grow in your relevant field and keep coming back for what we have to offer. Today, I am going to unlock the details on the Introduction to 8051 Microcontroller. This is an 8-bit Microcontroller developed by Intel in the 1980s. It is considered as a small system on an integrated chip that comes with CPU, I/O ports, timers, counters, RAM and ROM. The Microcontroller is a one step forward to a microprocessor.

Both Microcontrollers and microprocessor work in a similar way with some exceptions. Microcottler comes with everything required to run an embedded system like CPU, I/O ports and inbuilt peripherals like timers, counters, and interrupts. While processor comes with the processing unit and in order to make it work like a microcontroller, separate peripherals are required to connect with the microprocessor. Other examples of microcontrollers are PIC Microcontroller, Atmel & Arduino etc.

The 8051 is the most common used microcontroller nowadays. If you are a newbie and trying to get your hands on very first time with a microcontroller you will be advised to start with 8051. It is the most commonly used Microcontroller in Embedded Systems.

Technology is evolving and becoming more advanced day by day. Gone are days, when you required separate systems or chips to perform a specific task. Now, most of the chips and electronic systems are developed with the purpose of performing multiple tasks using a single system that comes with a number of integrated circuits incorporated in it that sets you free from the hassle of spending lot of money on the individual system, making our project highly economical in nature.

I’ll try to discuss each and everything related to 8051, so you get a clear idea of what it does, its main features, working, applications and everything you need to know. You should also have a look at these 8051 Microcontrollers Projects. So, let’s get started with Introduction to 8051 Microcontroller:

Introduction to 8051 Microcontroller

  • The 8051 Microcontroller is a 40-Pin integrated chip that comes with CPU and other peripherals like I/O, timers, counters, RAM and ROM.
  • It is widely used in an embedded system, consumer electronics, automotive systems, robotics and security cameras.
  • The 8051 microcontrollers have made a renowned place in the market in terms of their availability, low cost, and operational flexibility.
  • Before the inception of microcontroller, everything that required automatic action was designed with the processor. That made overall project more costly that would cover more space.
  • The 8051 was developed using Intel 8051 MSC-51 architecture.

introduction to 8051 microcontroller, intro to 8051, basic circuit of 8051 microcontroller, applications of 8051 microcontroller, 8051 microcontroller architecture


  • Older versions of 8051 used assembly programming language, however, recent editions can be programmed using more advanced language like C, Python or JavaScript.
  • Microcontrollers have revitalized the robotics and removed the need for extra devices to make them function like an automatic system.
  • Earlier, microcontrollers were produced using N-MOS technology that came with more power consumption and less efficiency. However, recent CMOS technology introduced in the development of the microcontrollers requires less power as compared to its predecessor.
  • 8051 comes in a variety of packages but the most common package is a DIP (dual inline package). However, it is also available in other surface mount packaging like 44 – Lead TQFP (Thin Quad Flat Package) and 44 – Lead PLCC (Plastic Leaded Chip Carrier).

8051 Architecture

Following features of the microcontroller define the overall architecture of the controller.

  • CPU. The central processing unit is considered as the main part of the controller that is capable of performing different tasks based on the instructions given by the user.
  • It is a like a brain of the device that reads instructions from data memory (ROM). However, a user has no direct control over the internal function of CPU except code with a number of instructions embedded into the unit through the compiler.
  • Storage Memory. CPU is used to call and execute the set of instructions. A memory is required to store those number of instruction. There are two sets of memory locations present in the device called ROM and RAM.
  • The ROM comes with 4k bytes memory while RAM comes with 128 bytes. The information stored in the ROM memory is known as code or program memory. This memory is non-volatile where information sustains over a long period of time and doesn’t require a constant source of power supply to hold information in it.
  • While RAM memory is volatile in nature and stores information for short period of time and requires a constant source of power supply to retain information in it. As you remove the power supply the RAM memory removes from the memory location.
  • Interrupts. Interrupts are very useful in case of emergency. They are used to put the main program on hold when a specific function is required to perform over the main function.
  • The system switches to the main program after the interrupt is called and executed properly. There are five interrupts present in the architecture of 8051 known as INT0, TF0, INT1, TF1, R1/T1
  • All these interrupts are used to pause the main program. TF0 and TF1 are timer interrupts while INT0 and INT1 are external interrupts. R1/T1 is a serial port interrupt.
  • All external interrupts are low level triggered where flags are cleared when the processor is connected to the interrupt service routine.

introduction to 8051 microcontroller, intro to 8051, basic circuit of 8051 microcontroller, applications of 8051 microcontroller, 8051 microcontroller architecture

  • Serial Port. The 8051 comes with UART (Universal Asynchronous Receiver/Transmitter) which is used for serial communication in 8051. The serial port is duplex i.e. it can transfer or receive data. Serial port comes with three pins called Tx, Rx and ground.
  • Buses. Buses are the valuable addition in the development of the microcontroller that are used for the data transmission. Mainly two buses are used for the communication called Data Bus and Address Bus and are 8 bit and 16 bit respectively.
  • The size of the address bus predicts the amount of memory a system can address. The 16-bit address bus determines it can address memory up to 2 (64k).
  • Address bus comes with four addressing modes called immediate addressing mode, direct addressing modes, register addressing mode, register indirect addressing mode.
  • The Data Bus is used for the transfer of data for a particular application within microprocessor and memory I/O devices. It is bi-directional and used for sending and receiving data.
  • The CPU’s circuitry determines the width of the data bus.
  • I/O Ports. Microcontroller comes with four I/O ports called P0, P1, P2, and P3. These ports are used to interface controller with other devices. Each port comes with 8 pins, making it an 8-bit port. Once these ports are reset, they are used as an output port. However, we need to program them in order to use them as an input port.
  • Timers/Counters. 8051 microcontroller comes with two 16 bit timers and counters. Timers are used to count the internal signal of a particular function of the controller while counters are used to count the external signals of the peripherals connected to the controller. These timers are further divided into an 8-bit register.
  • Oscillator. It is added in the controlled for generating clock pulses. It works as a clock source for CPU of the controller. The oscillator works over a certain frequency when a certain voltage is applied.

8051 Basic Circuit

Following figure shows the pin diagram of 8051 microcontroller.

introduction to 8051 microcontroller, intro to 8051, basic circuit of 8051 microcontroller, applications of 8051 microcontroller, 8051 microcontroller architecture

As figure shown above, 8051 comes with 40 – Pin Dip that contains 20 pins on each side. It has four ports and 8 pins are associated with each port. Let’s describe the function of each port one by one.

Port 0. Pin number from 32 to 39 belong to Port0. These pins are bidirectional and come with internal pull-up resistors. Port0 is multiplexed with data and address bus.

Port 1. Pin from 1 to 8 falls under Port 1 that is the 8-bit port where each pin is bidirectional. This port comes with internal pull-up resistors.

Port 2. Pin from 21 to 28 falls under Port 2. All the port 2 pins are bi-directional like port 1 and are used as I/O pins. Port 2 pins behave like a higher order address/data bus when external memory is accessed.

Port 3. Port 3 contains pins from 10 to 17 number. All pins of the port 3 come with special functions. Following are the main functions associated with each pin.

introduction to 8051 microcontroller, intro to 8051, basic circuit of 8051 microcontroller, applications of 8051 microcontroller, 8051 microcontroller architecture

RST. Pin 9 represents the reset pin. The controller will be reset by holding RST HIGH for at least two machine cycles.

GND and Vcc. Pin 20 represents the ground pin that represents 0V and connected to the negative terminal of the power source, while Pin 40 represents the power source pin that requires 5 V.

PSEN. Pin 29 is PSEN (Program Stored Enable Pin) which is used for reading external program memory.

ALE. Pin 30 is ALE ( Address Latch Enable) that is mainly used for separation of external address from data.

VPP. Pin 31 is external access enable pin used for external program memory. If this pin is set LOW, it can fetch the code from external program memory.


The 8051 comes with a wide range of applications, but it is mainly used for the embedded system. Following are some applications it is used for.

  • Industrial automation
  • Process control devices
  • Home Applications (Camcorder, Music InstrumentsTVs, VCR, Video Games, Oven)
  • Safety devices and automotive applications
  • Temperature sensing and safety devices
  • Parking indication system
  • Fire detection and defense applications
  • Defense and medical equipment
  • Arduino DC motor speed control
  • GSM based electricity meter billing
  • Voice controlled system
  • Communication Systems (Intercoms, Answering Machines, Mobile Phones, Paging Devices)
  • Aeronautical and Space systems
  • Robotics and Automation

So, that was all for today. I hope you have enjoyed today’s tutorial about 8051 Microcontroller. Will meet you guys in the next tutorial. Take care and have fun !!! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.