8051 Microcontroller part-1
1 Answer


Microcontroller:A microcontroller is a highly integrated chip, which includes on single chip, all or most of the parts needed for a controller. The microcontroller typically includes: CPU, RAM, EPROM/PROM/ROM (Erasable Programmable Read Only nT I/O (input/output) — serial and parallel, timers, interrupt controller. For example, Intel 8051 is 8-bit microcontroller and Intel 8096 is 16-bit microcontroller. The purpose of this chapter is to introduce the concept of the microcontrollers and discuss current trends.

Microprocessors:A CPU built into a single VLSI chip is called microprocessor. Microprocessor is general-purpose digital computer central processing unit (CPU).Although popularly known as "computer on a chip" .The prime use if microprocessor is to read data,performs extensive calculations on that data and store those calculations in amass storage device or display the results for human use .The program used by the microprocessors are stored in the mass storage device and loaded into RAM as the directions.

enter image description here

The 8051 Microcontroller:

A Brief History of 8051: In 1981 Intel corporation have introduced an 8 bit microcontroller called the 8051.The 8051 microcontroller became widely popular after Intel allowed other manufacturers to make and market any type of 8051 with the condition that they remain code compatible with 8051.It is noted that there are different variety of 8051 in terms of speed and amount of chip ROM.They are all compatible with the original 8051 As far as the instructions are concerned. These means ,if programmer can write program for one ,it will run on any of them regardless of the manufacturer.

A microcontroller is a highly integrated chip, which includes on single chip, all or most of the parts needed for a controller. The microcontroller typically includes: CPU (Central Processing Unit), RAM (Random Access Memory), EPROM/PROM/ROM (Erasable Programmable Read Only nT I/O (input/output) — serial and parallel, timers, interrupt controller. For example, Intel 8051 is 8-bit microcontroller and Intel 8096 is 16-bit microcontroller.

Microcontrollers and Microprocessors

A controller is used to control some process. At one time, controllers were built exclusively from logic components, and were usually large, heavy boxes. Later on, microprocessors were used and the entire controller could fit on a small circuit board. This is still common- one emt find many controllers powered by one of the many common microprocessors (including Zilog Z80, Intel 8088, Motorola 6809, and others). As the process of miniaturization continued, all of the components needed for a controller were built right onto one chip. A one chip on a computer, or microcontroller was born.

By only including the features specific to the task (control), cost is relatively low. A typical microcontroller has bit manipulation instructions, easy and direct access to /O (input/output), and quick and efficient interrupt processing. Figure 1.3 shows the block diagram of a typical microcontroller.

A CPU built into a single VLSI chip is called microprocessor. It contains arithmetic and logic unit (ALU), Instruction decodes and control unit, Instruction register, Program counter (PC), clock circuit (internal or external), reset circuit (internal or external) and registers. For example, Intel 8085 is 8-bit microprocessor and Intel 8086/8088 is 16-bit microprocessor. Microprocessor is general-purpose digital computer central processing unit (CPU).The microprocessor is general- Microprocessor is general-purnose digital computer central processing unit (CPU).

enter image description here

Central Processing Unit (CPU)

CPU is the brain of the computer system. It performs all operations on data. It continuously performs two operations: fetching and executing the instructions. It understands and executes the instructions based on a set of binary codes called the instruction set. The microprocessor is general-purpose device and additional external circuitry is added to make it microcomputer. Another simple definition for CPU is it Executes information stored in memory

I/O (Input/output) devices » Provide a means of communicating with CPU


RAM (Random Access Memory) - Temporary storage of programs that computer is running and the data is lost when computer is off

ROM (Read Only Memory) - contains programs and information essential to Operation of the computer and the information cannot be changed by use, and is not lost when power is off It is called nonvolatile memory

enter image description here

Data bus

EEPROM (also written $E^2PROM$ and pronounced "e-e-prom," "double-e prom," "e-squared," or simply "e-prom") stands for Electrically Erasable Programmable Read-Only

Memory and is a type of non-volatile memory used in computers and other electronic devices to store small amounts of data that must be saved when power is removed, Example 1)Calibration tables 2)Device configuration

When larger amounts of static data are to be stored (such as in USB flash drives) a specific type of EEPROM such as flash memory is more economical than traditional EEPROM devices. EEPROMs are realized as arrays of floating-gate transistors.

EEPROM is user-modifiable read-only memory (ROM) that can be erased and reprogrammed (written to) repeatedly through the application of higher than normal electrical voltage generated externally or internally in the case of modern EEPROMs

Bus Unit

The CPU is connected to memory and I/O through strips of wire called a bus Carries information from place to place 1) Address bus 2)Data bus 3)Control bus

enter image description here

Address bus

For a‘ device (memory or I/O) to be recognized by the CPU, it must be assigned an address

1)The address assigned to a given device must be unique

2)The CPU puts the address on the address bus, and the decoding circuitry finds the device

3)The address bus is unidirectional.

Data bus 1)The CPU either gets data from the device or sends data to it 2)Data buses are bidirectional

Control bus

1)Provides read or write signals to the device to indicate if the CPU is asking for information or sending it information

2)For the CPU to process information, the data must be stored in RAM or ROM, which are referred to as primary memory

3)ROM provides information that is fixed and permanent

  • Tables or initialization program

4)RAM stores information that is not permanent and can change with time

  • Various versions of OS and application packages

  • CPU gets information to be processed

1)first form RAM (or ROM)

2) if it 7 : x ‘ : i it 1s not there, then seeks it from a mass storage device, called secondary memory, and transfers the information to RAM


The CPU uses registers to store information temporarily

  • Values to be processed

  • Address of value to be fetched from memory

In general, the more and bigger the registers, the better the CPU

  • Registers can be 8-, 16-, 32-or 64-bit

enter image description here

ALU (arithmetic/logic unit)

Performs arithmetic functions such as add, subtract, multiply, and divide, and logic Functions such as AND, OR, and NOT

Program counter

Points to the address of the next instruction is to be fetched

  • As each instruction is executed, the program counter is incremented to point to the address of the next instruction is to fetched. One more important register in the 8051 is the program counter(PC).The program counter points to the address of the next instruction to be fetched.As the CPU fetches the opcode from program ROM ,the program counter is incremented by one to point to the next instruction .The PC in the 8051 is 16 bit register .This means that the 8051 can access program addresses 0000H toFFFFH ,a total of 64 k bytes of code.

Instruction decoder

Interprets the instruction fetched into the CPU

  • A CPU capable of understanding more instructions requires more transistors to design

Types of Microcontrollers:Microcontrollers can be classified on the basis of internal bus width,architecture,memory and instruction set.

enter image description here

Microcontroller Architectural Features

There are mainly two categories of processors, namely, Von-Neuman (or) Princeton architecture and Harvard Architecture. These two architectures differ in the way data and programs are stored and accessed.

Von-Neuman Architecture

Microcontrollers based on the Von-Neuman architecture have a single data bus that is used to fetch both instructions and data. Program instructions and data are stored in a common main memory. When such a controller addresses main memory, it first fetches an instruction, and then it fetches the data to support the instruction. The two separate fetches slows up the controller’s operation. The Von-Neuman architecture’s main advantage is that it simplifies the microcontroller design because only one memory is accessed. In microcontrollers, the contents of RAM can be used for data storage and program instruction storage. Example: Motorola 68HC11 microcontroller

Harvard Architecture:

Microcontrollers based on the Harvard architecture have a separate data bus and an instruction bus .This allows the execution to occur in parallel.As a instruction is being pre fetched ,the current instruction is executing on data bus .Once the current instruction is complete ,the next instruction is ready to go .This pre fetch theoretically allows for much faster execution than Von-Neuman architecture ,on the expense of complexity .The Harvard architecture executes the instructions in fewer instruction cycles than the Von-Neuman architecture. Eg:Intel MCS-51 family(8051),PIC microcontroler.

Microcontroller based on sets can be divided in two types:-



CISC (Complex Instruction Set Computer) Architecture

Almost today’s all microcontrollers are based on the CISC (Complex Instruction Set Computer) concept. When a microcontroller has an instruction set that supports many addressing modes for the arithmetic and logical instructions, data transfer and memory accesses instructions, the microcontroller is said to be of CISC architecture.

The typical CISC microcontroller has well over 80 instructions, many of them very powerful and very specialized for specific control tasks. It is quite common for the instructions to all behave quite differently. Some might only operate on certain address spaces or registers, and others might only recognize certain addressing modes. The advantages of the CISC architecture are that many of the instructions are macro like allowing the programmer to use one instruction in place of many simpler instructions Eg: Intel 8096 and 8051 family

RISC (Reduced Instruction Set Computer) Architecture

The industry trend for microprocessor design is for Reduced Instruction Set Computers (RISC) designs. When a microcontroller has an instruction set that supports fewer addressing modes for the arithmetic and logical instructions and for data transfer instructions, the microcontroller is said to be of RISC architecture. The benefits of RISC design simplicity are a smaller chip, smaller pin count, and very low power consumption. Some of the typical features of RISC processor- Harvard architecture are

  1. Allows simultaneous access of program and data.

  2. Overlapping of some operations for increased processing performance.

  3. Instruction pipelining increases execution speed. ; i re

  4. Orthogonal (symmetrical) instruction set for programming simplicity.

  5. Allows each instruction to operate on any register or use any addressing mode.

Applications :

  • Home monitoring System

  • Automotive Appliances

1)Microwave Oven

2) Refrigerators

3) Television

4). VCRs


  • Automobiles

1) Engine Control

2) Diagnostics

3)Climate Control

  • Environmental Control

1)Green House

2) Factory

3) Home -



6) Data logging (from Sensors like Temperature, Humidity etc...)

Please log in to add an answer.