100% found this document useful (1 vote)
368 views10 pages

8051 Microcontroller - Block Diagram and Components

text book
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
368 views10 pages

8051 Microcontroller - Block Diagram and Components

text book
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

(http://www.techulator.com)

Login (/account/Login.aspx?
ReturnUrl=%2fresources%2fViewResourceDetails.aspx%3fresourceId%3d11036)
Register (/account/Register.aspx)

Resources (/resources/)
/ General Articles (/resources/Category5008-General-Articles.aspx)
/ Others (/resources/Category53-Others.aspx) /

8051 Microcontroller: block diagram


and components
Posted Date: 23 Aug 2013 | Updated: 23-Aug-2013 | Category: Others (/resources/Category53Others.aspx) | Author: M.AKSHAY (/member/AKSHAY88.aspx) | Member Level: Gold
(/general/MembershipLevels.aspx) | Points: 70 (/general/ContentRating.aspx?
EntityType=1&EntityId=11036) |

The 8051 microcontroller architecture is described in this resource. The 8051


microcontroller block diagram, components along with their functions are
explained.

Introduction: What is a microcontroller?


A complete computer system manufactured on a single chip is called a microcontroller.
The features of a microcontroller are similar to that of a microprocessor like registers, ALU,
program counter, ags, stack pointer, etc. Along with these common features, a microcontroller
has some additional features such as a clock circuit, internal RAM, ROM, serial and parallel I/O
counter.
http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

1/10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

Using a microcontroller provides a great advantage that a program is stored in ROM that has an
important role in managing the system's operations and functions. Since the program written
into ROM is xed that is, it cannot be altered or changed; as a result the operation of the system
remains constant (unchanged) regardless of the instructions given to it. Hence, a
microcontroller can be thought of a device containing on-chip program memory. A
microcontroller can also be referred as a 'microcomputer'.
Now let us see the architecture and block diagram of 8051 microcontroller

Major components of Intel 8051


microcontroller
The 8051 microcontroller is an 8-bit microcontroller (/articles/Electronics.aspx). Let us see the
major components of 8051 microcontroller and their functions.
An 8051 microcontroller has the following 12 major components:
1. ALU (Arithmetic and Logic Unit)
2. PC (Program Counter)
3. Registers
4. Timers and counters
5. Internal RAM and ROM
6. Four general purpose parallel input/output ports
7. Interrupt control logic with ve sources of interrupt
8. Serial date communication
9. PSW (Program Status Word)
10. Data Pointer (DPTR)
11. Stack Pointer (SP)
12. Data and Address bus.

http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

2/10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

Now let us see the functions of each of these components

1. ALU
All arithmetic and logical functions are carried out by the ALU.
Addition, subtraction with carry, and multiplication come under arithmetic operations.
Logical AND, OR and exclusive OR (XOR) come under logical operations.

2. Program Counter (PC)


http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

3/10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

A program counter is a 16-bit register and it has no internal address. The basic function of
program counter is to fetch from memory the address of the next instruction to be executed.
The PC holds the address of the next instruction residing in memory and when a command is
encountered, it produces that instruction. This way the PC increments automatically, holding
the address of the next instruction.

3. Registers
Registers are usually known as data storage devices. 8051 microcontroller has 2 registers,
namely Register A and Register B. Register A serves as an accumulator while Register B
functions as a general purpose register. These registers are used to store the output of
mathematical and logical instructions.
The operations of addition, subtraction, multiplication and division are carried out by Register A.
Register B is usually unused and comes into picture only when multiplication and division
functions are carried out by Register A. Register A also involved in data transfers between the
microcontroller and external memory.
8051 microcontroller also has 7 Special Function Registers (SFRs). They are:
1. Serial Port Data Buffer (SBUF)
2. Timer/Counter Control (TCON)
3. Timer/Counter Mode Control (TMOD)
4. Serial Port Control (SCON)
5. Power Control (PCON)
6. Interrupt Priority (IP)
7. Interrupt Enable Control (IE)

4. Timers and Counters


Synchronization among internal operations can be achieved with the help of clock circuits which
are responsible for generating clock pulses. During each clock pulse a particular operation will
be carried out, thereby, assuring synchronization among operations. For the formation of an
oscillator, we are provided with two pins XTAL1 and XTAL2 which are used for connecting a
resonant network in 8051 microcontroller device. In addition to this, circuit also consists of four
more pins. They are,
Internal operations can be synchronized using clock circuits which produce clock pulses. With
each clock pulse, a particular function will be accomplished and hence synchronization is
achieved. There are two pins XTAL1 and XTAL2 which form an oscillator circuit which connect
to a resonant network in the microcontroller. The circuit also has 4 additional pins 1. EA: External enable
2. ALE: Address latch enable
http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

4/10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

3. PSEN: Program store enable and


4. RST: Reset.
Quartz crystal is used to generate periodic clock pulses.

5. Internal RAM (/articles/Virtual-Memory.aspx) and ROM


ROM
A code of 4K memory is incorporated as on-chip ROM in 8051. The 8051 ROM is a non-volatile
memory meaning that its contents cannot be altered and hence has a similar range of data and
program memory, i.e, they can address program memory as well as a 64K separate block of data
memory.

RAM
The 8051 microcontroller is composed of 128 bytes of internal RAM. This is a volatile memory
since its contents will be lost if power is switched off. These 128 bytes of internal RAM are
divided into 32 working registers which in turn constitute 4 register banks (Bank 0-Bank 3) with
each bank consisting of 8 registers (R0 - R7). There are 128 addressable bits in the internal
RAM.

6. Four General Purpose Parallel Input/Output Ports


The 8051 microcontroller has four 8-bit input/output ports. These are:
PORT P0: When there is no external memory present, this port acts as a general purpose
input/output port. In the presence of external memory, it functions as a multiplexed address and
http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

5/10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

data bus. It performs a dual role.


PORT P1: This port is used for various interfacing activities. This 8-bit port is a normal I/O port
i.e. it does not perform dual functions.
PORT P2: Similar to PORT P0, this port can be used as a general purpose port when there is no
external memory but when external memory is present it works in conjunction with PORT PO as
an address bus. This is an 8-bit port and performs dual functions.
PORT P3: PORT P3 behaves as a dedicated I/O port

7. Interrupt Control
An event which is used to suspend or halt the normal program execution for a temporary period
of time in order to serve the request of another program or hardware (/articles/ComputerHardware.aspx) device is called an interrupt. An interrupt can either be an internal or external
event which suspends the microcontroller for a while and thereby obstructs the sequential ow
of a program.
There are two ways of giving interrupts to a microcontroller one is by sending software
instructions and the other is by sending hardware signals. The interrupt mechanism keeps the
normal program execution in a "put on hold" mode and executes a subroutine program and after
the subroutine is executed, it gets back to its normal program execution. This subroutine
program is also called an interrupt handler. A subroutine is executed when a certain event
occurs.
In 8051, 5 sources of interrupts are provided. They are:
a) 2 external interrupt sources connected through INT0 and INT1
b) 3 external interrupt sources- serial port interrupt, Timer Flag 0 and Timer Flag 1.
The pins connected are as follows:
1. ALE (Address Latch Enable) - Latches the address signals on Port P0
2. EA (External Address) - Holds the 4K bytes of program memory
3. PSEN (Program Store Enable) - Reads external program memory
4. RST (Reset) - Reset the ports and internal registers upon start up

8. Serial Data Communication


A method of establishing communication among computers is by transmitting and receiving data
bits is a serial connection network. In 8051, the SBUF (Serial Port Data Buffer) register holds the
data; the SCON (Serial Control) register manages the data communication and the PCON
(Power Control) register manages the data transfer rates. Further, two pins - RXD and TXD,
http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

6/10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

establish the serial network.


The SBUF register has 2 parts one for storing the data to be transmitted and another for
receiving data from outer sources. The rst function is done using TXD pin and the second
function is done using RXD pin.
There are 4 programmable modes in serial data communication. They are:
1. Serial Data mode 0 (shift register mode)
2. Serial Data mode 1 (standard UART)
3. Serial Data mode 2 (multiprocessor mode)
4. Serial Data mode 3

9. PSW (Program Status Word)


Program Status Word or PSW is a hardware register which is a memory location which holds a
program's information and also monitors the status of the program this is currently being
executed. PSW also has a pointer which points towards the address of the next instruction to be
executed. PSW register has 3 elds namely are instruction address eld, condition code eld and
error status eld. We can say that PSW is an internal register that keeps track of the computer
at every instant.
Generally, the instruction of the result of a program is stored in a single bit register called a ' ag'.
The are7 ags in the PSW of 8051. Among these 7 ags, 4 are math ags and 3 are general
purpose or user ags.
The 4 Math ags are:
Carry (c)
Auxiliary carry (AC)
Over ow (OV)
Parity (P)
The 3 General purpose ags or User ags are:
FO
GFO
GF 1

10. Data Pointer (DPTR)


The data pointer or DPTR is a 16-bit register. It is made up of two 8-bit registers called DPH and
DPL. Separate addresses are assigned to each of DPH and DPL. These 8-bit registers are used
for the storing the memory addresses that can be used to access internal and external
http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

7/10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

data/code.

11. Stack Pointer (SP)


The stack pointer (SP) in 8051 is an 8-bit register. The main purpose of SP is to access the stack.
As it has 8-bits it can take values in the range 00 H to FF H. Stack is a special area of data in
memory. The SP acts as a pointer for an address that points to the top of the stack.

12. Data and Address Bus


A bus is group of wires using which data transfer takes place from one location to another within
a system. Buses reduce the number of paths or cables needed to set up connection between
components.
There are mainly two kinds of buses - Data Bus and Address Bus
Data Bus: The purpose of data bus is to transfer data. It acts as an electronic channel using which
data travels. Wider the width of the bus, greater will be the transmission of data.
Address Bus: The purpose of address bus is to transfer information but not data. The
information tells from where within the components, the data should be sent to or received
from. The capacity or memory of the address bus depends on the number of wires that transmit
a single address bit.
Read Minimum hardware requirements for Windows 10 (/resources/13418-Minimumhardware-requirements-for-Windows-10.aspx)

(https://www.youtube.com/user/techulatormedia?sub_con rmation=1)

Comments
Guest Author: devanath reddy 20 May 2014
Informative, but needs explanation regarding connections between blocks.
Guest Author: gurpreet singh 21 Dec 2014
Very simple and knowledgeable explanation.
Guest Author: Kaustubh Thakare 14 Apr 2015
Great work! Extremely informative and helpful article on the 8051 microcontroller.Thanks!
http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

8/10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

Guest Author: Bilal 13 Jun 2015


This is great work - keep it up. Your article really helped me a lot in my exams preparation. Thank you.
Guest Author: bmp 30 Aug 2015
I had found a better explanation at http://microcontrollergarden.blogspot.com/2013/08/block-diagramand-pin-diagram-of-8051.html - it is easy to understand.
Guest Author: tajo 21 Dec 2015
I would like to know: what are the functions of blocks program address register and RAM address register?
How is the structure of the above registers?

Post a comment

Notify me by email when others post comments to this article.


Do not include your name, "with regards" etc in the comment. Write detailed comment,
relevant to the topic.
No HTML formatting and links to other web sites are allowed.
This is a strictly moderated site. Absolutely no spam allowed.
Name:

Email:

Spam check
I'm not a robot
reCAPTCHA
Privacy - Terms

Submit Response
Submit Article (PostResource.aspx)
Return to Article Index (index.aspx)
Sign up for our Newsletter! (http://eepurl.com/wWZsj)
Subscribe to RSS Feeds by Email (http://feedburner.google.com/fb/a/mailverify?
uri=techulator/articles&loc=en_US)

http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

9/10

8/8/2016

8051Microcontroller:blockdiagramandcomponents

Techulator
LikePage

10Klikes

Bethefirstofyourfriendstolikethis

Top Contributors
Today
Aman (/member/aman0001.aspx) (30)
Timmappa Kamat (/member/timkamat.aspx) (13)
Mahesh (/member/skysnap.aspx) (4)
Last 7 Days
Timmappa Kamat (/member/timkamat.aspx) (291)
Mahesh (/member/skysnap.aspx) (251)
Ankit (/member/ankitharrytom.aspx) (183)
more...

(/members/TopPerformers.aspx)

About Us (/general/AboutUs.aspx)
Copyright (/general/Copyrights.aspx)

Contact Us (/general/ContactUs.aspx)
Privacy Policy (/general/PrivacyPolicy.aspx)

Terms Of Use (/general/TermsOfUse.aspx)


Trademark Disclaimer (/pages/trademarks.aspx)

http://www.techulator.com/resources/11036Microcontrollerblockdiagramcomponents.aspx

Advertise (/pages/Advertise.aspx)

10/10

You might also like