8051 Microcontroller Architecture with Applications

The 8051 Microcontroller was designed in the 1980s by Intel. Its foundation was on Harvard Architecture and was developed principally for bringing into play Embedded Systems. At first, it was created using NMOS technology but as NMOS technology needs more power to function therefore Intel re-intended Microcontroller 8051 employing CMOS technology and a new edition came into existence with a letter ‘C’ in the title name, for illustration: 80C51. These most modern Microcontrollers need a fewer amount of power to function in comparison to their forerunners. There are many applications with an 8051 microcontroller. So, 8051 Microcontroller Projects have great significance in Engineering final year. This article discusses an overview of 8051 microcontroller architecture and its working.


What is an 8051 Microcontroller?

The microcontroller like 8051 was designed in the year 1981 by Intel. The microcontroller is one kind of integrated circuit that includes 40-pins with dual inline package or DIP, RAM-128 bytes, ROM-4kb & 16-bit timers–2. Based on the requirement, it includes addressable & programmable 4 – parallel 8-bit ports. In the 8051 microcontroller architecture, the system bus plays a key role to connect all the devices to the central processing unit. This bus includes a data bus- an 8-bit, an address bus-16-bit & bus control signals. Other devices can also be interfaced throughout the system bus like ports, memory, interrupt control, serial interface, the CPU, timers.

There are two buses in 8051 Microcontroller one for the program and another for data. As a result, it has two storage rooms for both programs and data of 64K by 8 sizes. The microcontroller comprises of 8-bit accumulator & an 8-bit processing unit. It also consists of 8 bit B register as majorly functioning blocks and 8051 microcontroller programming is done with embedded C language using Keil software. It also has several other 8 bit and 16-bit registers.


For internal functioning & processing Microcontroller, 8051 comes with integrated built-in RAM. This is prime memory and is employed for storing temporary data. It is an unpredictable memory i.e. its data can get be lost when the power supply to the Microcontroller switched OFF.  This microcontroller is very simple to use, affordable less computing power, simple architecture & instruction set.

Features

The main features of the 8051 microcontroller architecture include the following.

  • 8-bit CPU through two Registers A & B.
  • 8K Bytes – Internal ROM and it is a flash memory that supports while programming the system.
  • 256 Bytes – Internal RAM where the first RAM with 128 Bytes from 00H to 7FH is once more separated into four banks through 8 registers in every bank, addressable registers -16 bit & general-purpose registers – 80.
  • The remaining 128 bytes of the RAM from 80H to FFH include Special Function Registers (SFRs). These registers control various peripherals such as Serial Port, Timers, all I/O Ports, etc.
  • Interrupts like External-2 & Internal-3
  • Oscillator & CLK Circuit.
  • Control Registers like PCON, SCON, TMOD, TCON, IE, and IP.
  • 16-bit Timers or Counters -2 like T0 & T1.
  • Program Counter – 16 bit & DPRT (Data Pointer).
  • I/O Pins – 32 which are arranged like four ports such as P0, P1, P2 & P3.
  • Stack Pointer (SP) – 8bit & PSW (Processor Status Word).
  • Serial Data Tx & Rx for Full-Duplex Operation

8051 Microcontroller Architecture

The 8051 microcontroller architecture is shown below. Let’s have a closer look at the features of the 8051 microcontroller design:


Block Diagram of 8051 Microcontroller
Block Diagram of 8051 Microcontroller

CPU (Central Processor Unit):

As you may be familiar that the Central Processor Unit or CPU is the mind of any processing machine. It scrutinizes and manages all processes that are carried out in the Microcontroller. The user has no power over the functioning of the CPU. It interprets the program printed in storage space (ROM) and carries out all of them and does the projected duty. CPU manages different types of registers in the 8051 microcontrollers.

Interrupts:

As the heading put forward, Interrupt is a subroutine call that reads the Microcontroller’s key function or job and helps it to perform some other program which is extra important then. The characteristic of 8051 Interrupt is extremely constructive as it aids in emergency cases. Interrupts provide us a method to postpone or delay the current process, carry out a sub-routine task and then all over again restart standard program implementation.

The Micro-controller 8051 can be assembled in such a manner that it momentarily stops or break the core program at the happening of the interrupt. When the sub-routine task is finished then the implementation of the core program initiates automatically as usual. There are 5 interrupt supplies in the 8051 Microcontroller, two out of five are peripheral interrupts, two are timer interrupts and one is serial port interrupt.

Memory:

The micro-controller needs a program that is a set of commands. This program enlightens the Microcontroller to perform precise tasks. These programs need a storage space on which they can be accumulated and interpret by the Microcontroller to act upon any specific process. The memory which is brought into play to accumulate the program of the Microcontroller is recognized as Program memory or code memory. In common language, it’s also known as Read-Only Memory or ROM.

The microcontroller also needs memory to amass data or operands for the short term. The storage space which is employed to momentarily data storage for functioning is acknowledged as Data Memory and we employ Random Access Memory or RAM for this principle reason. Microcontroller 8051 contains code memory or program memory 4K so which has 4KB Rom and it also comprises data memory (RAM) of 128 bytes.

Bus

Fundamentally Bus is a group of wires which function as a communication canal or means for the transfer of Data. These buses comprise 8, 16, or more cables. As a result, a bus can bear 8 bits, 16 bits altogether. There are two types of buses:

  1. Address Bus: Microcontroller 8051 consists of a 16-bit address bus. It is brought into play to address memory positions. It is also utilized to transmit the address from the Central Processing Unit to Memory.
  2. Data Bus: Microcontroller 8051 comprise of 8 bits data bus. It is employed to cart data.

Oscillator

As we all make out the Microcontroller is a digital circuit piece of equipment, thus it needs a timer for its function. For this function, Microcontroller 8051 consists of an on-chip oscillator that toils as a time source for the CPU (Central Processing Unit). As the productivity thumps of the oscillator are steady as a result, it facilitates harmonized employment of all pieces of the 8051 Microcontroller. Input/Output Port: As we are acquainted with that Microcontroller is employed in embedded systems to manage the functions of devices.

Thus to gather it to other machinery, gadgets or peripherals we need I/O (input/output) interfacing ports in Micro-controller. For this function Micro-controller 8051 consists of 4 input/output ports to unite it to other peripherals.Timers/Counters: Micro-controller 8051 is incorporated with two 16 bit counters & timers. The counters are separated into 8-bit registers. The timers are utilized for measuring the intervals, to find out pulse width, etc.

Types of Interrupts

The interrupts of the 8051 microcontrollers have the following sources

  • TF0 (Timer 0 Overflow Interrupt)
  • TF1 (Timer 1 Overflow Interrupt)
  • INT0 (External Hardware Interrupt)
  • INT1 (External Hardware Interrupt)
  • RI/TI (Serial Communication Interrupt)

Memory

The memories of the 8051 microcontroller architecture include a program memory and data memory.

  • The instructions of the CPU are stored in the Program Memory. It is usually implemented as Read-Only Memory or ROM, where the Program written into it will be retained even when the power is down or the system is reset.
  • Data Memory in a Microcontroller is responsible for storing values of variables, temporary data, intermediate results, and other data for the proper operation of the program.

Timer and Control Unit

The main function of a timer is to make a delay otherwise time gap among two events. This microcontroller includes two timers where each timer is 16-bit where the system can generate two delays concurrently to produce the suitable delay. Generally, every microcontroller uses hardware delays where a physical device can be used through the processor to generate the particular delay which is called a timer.

The delay can be generated through the timer based on the requirement of the processor & transmits the signal to the processor whenever the particular delay gets generated.

By using this processor, we can also produce a delay based on the requirement of the system. However, this will guide to remain the processor active all the time because it will not perform any other task in that specific period. As a result, the existence of a timer within the microcontroller permits the processor to be free for performing other operations.

The microcontroller also includes a program counter, data pointer, stack & stack pointer, instruction registers including latches, temporary registers & buffers for the I/O ports.

Registers

Registers in microcontrollers are mainly used to store data and short-term instructions which are mainly used to process addresses to fetch data. This microcontroller includes 8-bit registers which have 8-bit start from D0 to D7. Here, D0 to D7 is LSB (least significant bit) and D7 is the most significant bit (MSB).

To make the data process better than 8-bit, then it must be separated into eight different bit parts. It includes several registers however general-purpose type registers are frequently available to programmers. There are classified into two types like General purpose & Special purpose. So, most of the general-purpose registers are listed below.

  • An accumulator is mainly used to execute arithmetic & logic instructions.
  • Registers like B, R0 toR7 are used for storing instruction addresses & data.
  • Data Pointers or DPTR is used to allow & process data in dissimilar addressing modes. This register includes DPH (high byte) & a DPL (low byte) which is mainly used to hold a 16-bit address. So, it can be used as a base register within not direct jumps, lookup table instructions & external data transfer.
  • Program counter or PC is a 16-bit register used to store the next instruction’s address to be performed
  • These registers are 8-bits other than program counter & data pointer registers.

Data Types

This microcontroller includes simply one 8 bit data type where the size of each register is 8-bit. If the data is better than 8-bit, then is the programmer accountable to separate data into 8-bit parts before processing. For assemblers, the most widely used data directive is the DB directive in assembly language.

PSW Register

The term PSW stands for Program status word and it is one kind of register in the microcontroller. It is also called a flag register, used to demonstrate the position of arithmetic logic instructions such as zero carry bit, carry bit, etc. PSW or flag register is an 8-bit register where 6-bits are used. This register includes 8-flags where these flags are known as conditional flags. These flags will perform instruction simply if the condition is satisfied.

These conditional flags are overflow, parity, auxiliary carry & carry. The Program status word registers bit numbers like 3 & 4 are used to alter the bank registers whereas 1 & 5 are not used but they can be used by the programmer for executing a specific task.

Register Banks

For stacks & register banks, Ram with 32 Bytes is used and these are separated in four types of banks. So, every back includes 8-registers which range from R0 to R7. Here, R0 & R7 denotes the locations of RAM like zero location and seventh location. The second bank register begins from location 8 & ends 05H. The third bank register begins from 10H & completed at the 17H location. The final bank can be placed among the 18H-1FH.

Stack

The part of RAM like Stack is mainly used through the processor for data storage otherwise address momentarily. In a microprocessor, it is a very significant part because there are extremely restricted numbers of registers for storing addresses and data.

In the 8051 microcontrollers, the stack is 8-bit wide and it can hold data from 00 – FFH. The stack pointer can be used through the CPU to allow the stack. This microcontroller includes an 8-bit stack pointer that means it can allow values from 00H to FFH. Once it is activated, then the stack pointer includes the 07 value.

Organization of Memory

The microcontroller has complex memory organization and it includes a separate address bus that is used for program memory, external RAM & data memory. It depends on Harvard architecture that is developed through Harvard in the year 1944.

Addressing Modes

Microprocessor gets data in different methods. Generally, the data stored within memory, register & can be used from instant value. So, these different methods for accessing data are known as addressing modes. Different types of microcontrollers include different addressing modes which depend on the plan of manufacturers. The addressing modes of this microcontroller include the following.

  • Register
  • Register indirect
  • Immediate
  • Indexed
  • Direct

Applications of 8051 Microcontroller Architecture

The microcontroller 8051 applications include a large number of machines, principally because it is simple to incorporate in a project or to assemble a machine around it. The following are the key spots of the spotlight:

Applications of 8051 microcontroller
Applications of 8051 microcontroller
  1. Energy Management: Competent measuring device systems aid in calculating energy consumption in domestic and industrialized applications. These meter systems are prepared competent by integrating microcontrollers.
  2. Touch screens: A high degree of microcontroller suppliers integrate touch sensing abilities in their designs. Transportable devices such as media players, gaming devices & cell phones are some illustrations of micro-controller integrated with touch sensing screens.
  3. Automobiles: The microcontroller 8051 discovers broad recognition in supplying automobile solutions. They are extensively utilized in hybrid motor vehicles to control engine variations. Also, works such as cruise power and anti-brake mechanism have created it more capable with the amalgamation of micro-controllers.
  4. Medical Devices: Handy medicinal gadgets such as glucose & blood pressure monitors bring into play micro-controllers, to put on view the measurements, as a result, offering higher dependability in giving correct medical results.
  5. Medical Devices: Handy medicinal gadgets such as glucose & blood pressure monitors bring into play micro-controllers, to put on view the measurements, as a result, offering higher dependability in giving correct medical results.

Thus, this is all about an overview of 8051 microcontroller architecture, working, and its applications. Here is a question for you, what are the different families available in the 8051 microcontrollers?

Photo Credits:

14 Comments

  1. technologyinsider says:

    VERY NICE ARTICAL

  2. manimaran.n says:

    if really suber up

    1. Tarun Agarwal says:

      Hi Manimaran.n
      Thank you so much

  3. keerthanaa says:

    sir, a very useful info…i’ve got all da required info… 🙂
    i need info on MY RIO 1900…wat r its applications, specifications, how to use it…?, wer all v can use it…?, and most importantly how are we supported to connect a couple of sensors to MYRIO 1900…i would b very glad if u could plz provide me sum useful info on MY RIO 1900…

    1. Tarun Agarwal says:

      Hi Keerthanaa,
      Please send your specifications and queries to our official mail id: team@elprocus.com

  4. Keerthana says:

    Its realy superb info

  5. fathimabevi.ms says:

    sir i need projects related to electronics
    this projects r particularly related to medical department

  6. fathimabevi says:

    sir u r projects r awesome thank u sir, for helping us
    i need electronics or communication projects related to medical department
    pls reply me sir i am waiting for u r information

  7. We need bulk projects including Documentation, ppts, related H/W etc. Please respond with full details of each project. We urgently need the following projects.

    1. Voice paging for Blind people.(B.Tech., Embedded).
    2. Sequence Hopping Cell search for OFDM based cellular systems(M.Tech., Matlab simulation).
    3. DEVELOPMENT AND VLSI IMPLEMENTATION OF EFFICIENT DISCRETE WAVELET TRANSFORM ARCHITECTURE. (matlab simulation).
    4. Simulation of Furnace Cascade PID Control System Based on Matlab / Simulink (M.Tech Matlab / Simulink).
    5.The Fuzzy PID Control System for Superheated Steam Temperature of Boiler (M.Tech Matlab / Simulink ).

    Please send the details of the projects as early as possible.

    Shankar.

    1. team elprocus says:

      Hi, Thanks for your interest towards our projects. Our team will contact you soon and will send all those details to you very soon.

Add Comment