You are on page 1of 19

EngineersGarage

Top of Form

Search

Bottom of Form
• Home
• EG Labs
○ Microcontroller
 AVR
 8051
○ Electronic Circuits
○ Components
○ Tutorials
• Articles
• Invention Stories
• Forum
• Creativity Shed
• Training
• About Us
• Contact Us
About Guides FAQs
CHANGE SCREEN

• Fluid

• Wide

• Narrow

• Default
Apply Reset
CPANEL

8051 and 8051 Microcontroller


A microcontroller is an economical computer-on-a-chip built for dealing with specific tasks, such as
displaying or receiving information through LEDs or remote controlled devices. The most commonly used
set of microcontrollers belong to 8051Family. 8051 Microcontrollers continue to remain a preferred
choice for a vast community of hobbyists and professionals. Through 8051, the world became witness to
the most revolutionary set of microcontrollers.
8051 Family

Comparison of 8051 Family Members


Various 8051 Microcontrollers

Features of 8051

Memory Architecture

History & Key developments

Applications

Programming environment & programmer

8051 Family
Intel fabricated the original 8051 which is known as MCS-51. The other two members of the 8051 family
are:
i. 8052 – This microcontroller has 256 bytes of RAM and 3 timers. In addition to the standard features
of 8051, this microcontroller has an added 128 bytes of RAM and timer. It has 8K bytes of on chip
program ROM. The programs written for projects using 8051 microcontroller can be used to run on the
projects using 8052 microcontroller as 8051 is a subset of 8052.

ii. 8031 – This microcontroller has all the features of 8051 except for it to be ROM-less. An external
ROM that can be as large as 64 K bytes should be programmed and added to this chip for execution. The
disadvantage of adding external ROM is that 2 ports (out of the 4 ports) are used. Hence, only 2 ports are
left for I/O operations which can also be added externally if required for execution.
Top
Comparison of 8051 family members:

Features 8051 8052 8031


RAM(bytes) 128 256 128
ROM 4K 8K 0K
Timers 2 3 2
Serial port 1 1 1
I/O pins 32 32 32
Interrupt sources 6 8 6
Table – 1.1 Comparison of 8051 family members

Various 8051 microcontrollers


8051 microcontrollers use two different kinds of memory such as UV- EPROM, Flash and NV-RAM.
Hence 8051 will not be seen in the part number even though it is the most popular member of the 8051
family.
i. 8751 – This microcontroller is the UV-EPROM version of 8051. This chip has only 4K bytes of
UV-EPROM. It is required to have access to the PROM burner and the UV-EPROM eraser to erase the
contents inside the chip before it is programmed again. The disadvantage of using this memory is the
waiting time of around 20 minutes to erase the contents in order to program it again. Due to this limitation,
manufacturers fabricated flash and NV-RAM versions of 8051.

ii. AT89C51 from Atmel Corporation – Atmel fabricated the flash ROM version of 8051 which is
popularly known as AT89C51 (‘C’ in the part number indicates CMOS). The flash memory can erase the
contents within seconds which is best for fast growth. Therefore, 8751 is replaced by AT89C51 to
eradicate the waiting time required to erase the contents and hence expedite the development time. To
build up a microcontroller based system using AT89C51, it is essential to have ROM burner that supports
flash memory. Note that in Flash memory, entire contents must be erased to program it again. The
contents are erased by the ROM burner. Atmel is working on a newer version of AT89C51 that can be
programmed using the serial COM port of IBM PC in order to get rid of the ROM burner.

Part Number ROM RAM I/O pins Timer Interrupt Vcc Packaging
AT89C51 4K 128 32 2 6 5V 40
AT89C52 8K 128 32 3 8 5V 40
AT89C1051 1K 64 15 1 3 3V 20
AT89C2051 2K 128 32 3 8 3V 20
AT89LV51 4K 128 32 2 6 3V 40
AT89LV52 8K 128 32 3 8 3V 40
Table 1.2 – Versions of 8951 from Atmel (All ROM Flash)

There are different versions of packaging and various speed of the products mentioned in the above
table.

Part Number Speed Pins Packaging Use


AT89C51- 12MHz 40 DIP Plastic Commercial
12PC
AT89C51- 16MHz 40 DIP Plastic Commercial
16PC
AT89C51- 20MHz 40 DIP Plastic Commercial
20PC
Table 1.3 – Various Speeds of 8051 from Atmel

Note: The part number AT89C51-16PC where AT – Atmel, C - CMOS (consumes


less power), 12 - Speed as 12 MHz, P – Plastic DIP packaging, C - Commercial use.
AT89C51-12PC is favourably used by students for their projects.

iii. DS5000 from Dallas Semiconductor – Dallas Semiconductor fabricated the NV-RAM version of the
8051 which is known as DS5000. The PC serial port is utilized to load the program onto the in-built
ROM. The advantage of NV-RAM memory is the facility to erase the contents one byte at a time.
v.

Part RAM ROM Timers I/O pins Interrupts Vcc Packaging


Number
DS5000-8 128 8K 2 32 6 5V 40
DS5000- 128 32K 2 32 6 5V 40
32
DS5000T 128 8K 2 32 6 5V 40
-8
DS5000T 128 32K 2 32 6 5V 40
-8
Table 1.4 – Versions of 8051 from Dallas Semiconductor

Note: ‘T’ signifies the real time clock (RTC) which is different from the timer. Even though the
power is turned off, the real – time clock generates and displays the date and the time of day.

The variety range of speed and packaging versions of DS5000 which is shown in the Table 1.5

Part Number NV-RAM Speed


DS5000-8-8 8K 8MHz
DS5000-8-12 8K 12MHz
DS5000-32-8 32K 8MHz
DS5000-32-12 32K 12MHz
DS5000T-8-12 8K 12MHz
DS5000T-32-8 32K 8MHz
Table 1.5 – Versions of 8051 Dallas Semiconductor

The part number DS5000-8-8 where 8 - 8K NV-RAM, 8 – Speed of 8MHz.


Note:
DS5000-8-12 is favourably used by students for their projects.

iv. One - Time - Programmable (OTP) versions of the 8051 – This version of microcontroller is
cheaper and available from various manufacturers. The manufacturers use OTP microcontroller for mass
production because the price per unit is very cheap.
Top
Features of 8051
The main features of 8051 microcontroller are:
i. RAM – 128 Bytes (Data memory)
ii. ROM – 4Kbytes (ROM signify the on – chip program space)
iii. Serial Port – Using UART makes it simpler to interface for serial communication.
iv. Two 16 bit Timer/ Counter
v. Input/output Pins – 4 Ports of 8 bits each on a single chip.
vi. 6 Interrupt Sources
vii. 8 – bit ALU (Arithmetic Logic Unit)
viii. Harvard Memory Architecture – It has 16 bit Address bus (each of RAM and ROM) and 8 bit Data
Bus.
ix. 8051 can execute 1 million one-cycle instructions per second with a clock frequency of 12MHz.
This microcontroller is also called as “System on a chip” because it has all the features on a single
chip. The Block Diagram of 8051 Microcontroller is as shown in Figure 1.1
Figure 1.1 Block Diagram of 8051 Microcontroller
Top

Memory Architecture
The 4 discrete types of memory in 8051 are:
i. Internal RAM – This memory is located from address 0 to 0xff. The memory locations from 0x00
to 0x7F are accessed directly. The bytes from 0x20 to 0x2F are bit-addressable. Loading R0 and R1 the
memory location from 0x80 to 0xFF can easily accessed.
ii. Special Function Registers (SFR) – Located from address 0x80 to 0xFF of the memory
location. The same instructions used for lower half of Internal RAM can be used to access SFR’s. The
SFR’s are bit addressable too.
iii. Program Memory – This is read only memory which is located at address 0. With the help of 16
bit Special Function Register DPTR, this memory can also save the tables of constants.
iv. External Data Memory – Located at address 0. The Instruction MOVX (Move External) should
be used to access the external data memory.
Top
History of 8051 and Key Developments
Intel Corporation fabricated the 8 – bit microcontroller which was referred as MCS-51 in 1981. This
microcontroller was also referred as “system on a chip” because it has 128 bytes of RAM, 4Kbytes of
ROM, 2 Timers, 1 Serial port, and four ports on a single chip. The CPU can work for only 8bits of data at
a time because 8051 is an 8-bit processor. In case the data is larger than 8 bits then it has to be broken
into parts so that the CPU can process conveniently. Most manufacturers have put 4Kbytes of ROM even
though the quantity of ROM can be exceeded up to 64 K bytes.

Intel permitted other manufacturers to fabricate different versions of 8051 but with the limitation that code
compatibility should be maintained. This has added advantage that if the program is written then it can be
used for any version of 8051 despite of manufacturer.

As years passed by, the quality of technology surpassed the expectation of the greatest minds, with
gadgets becoming smaller, sleeker and more efficient. Microcontrollers were seen as the answer to the
requirements raised in advanced electronics. This is the reason why manufacturers have now focused
their production around the following main developmental aspects:
i. Ease-of-use
ii. Market availability
iii. Less power usage
iv. Smaller processing power
v. More integrated features like RF and USB
vi. Smaller form factors
Top
Applications
The 8051 has been in use in a wide number of devices, mainly because it is easy to integrate into a
project or build a device around. The following are the main areas of focus:
i. Energy Management:Efficient metering systems help in controlling energy usage in homes and
industrial applications. These metering systems are made capable by incorporating microcontrollers.

ii. Touch screens:A high number of microcontroller providers incorporate touch-sensing capabilities in their
designs. Portable electronics such as cell phones, media players and gaming devices are examples of
microcontroller-based touch screens.
iii. Automobiles: The 8051 finds wide acceptance in providing automobile solutions. They are widely used
in hybrid vehicles to manage engine variants. Additionally, functions such as cruise control and anti-brake
system have been made more efficient with the use of microcontrollers.

iv. Medical Devices:Portable medical devices such as blood pressure and glucose monitors use
microcontrollers will to display data, thus providing higher reliability in providing medical results.
Top
Programming environment and programmer
Formerly, programmers used machine language for coding. A machine language is a program that
consists of 0s and 1s which was very dreary for the humans
to
program any computer. In due course of time, assembly language was developed in order to speed up
the programming and make it error-free. Assembly language is a low level language which uses an
assembler to translate the program into machine code. The high level programming languages such as
BASIC, Pascal, Forth, C, C++, and Java are available to code the program for 8051. These high level
languages make use of a Compiler to translate into machine code. For example, when a program is
written in C, the program needs to be translated into machine language using C compiler. Usually,
Assembly and C language is widely used for 8051 programs as compared to the other high level
languages.

The 8051 provides a total of four ports for I/O operations. 8051 has 40 pins, of which 32 pins are set aside
for the four ports. PO, P1, P2, and P3 each have 8 pins and can be used for either input or output. The
remaining pins are designated as Vrt, GND, XTAL1, XTAL2, RST, EA, ALE/PROG and PSEN.

8051 allows you to manipulate one or all of the bits of a port, thus providing programmers with a unique
and powerful feature. 8051 provides the programmer with the ability to read, write and modify each port to
customize applications as much as possible.
Top

• 1Nice
• 0Cool
• 2Superb
• Login or register to post comments
• 21466 reads

Comments (38)
so amazing
Submitted by THUMBI PAUL on Wed, 22/09/2010 - 19:40.

so amazing

• 0Nice
• 0Cool
• 0Superb
• Login or register to post comments

I really love to read


Submitted by ggrpedqjx on Fri, 04/02/2011 - 09:00.
I really love to read articles that have good information and ideas to share to each reader. I hope to
read more from you guys and continue that good work that is really inspiring to us.%0D%0A%0D
%0ARegards,%0D%0AFelton%0D%0Aonline surveys for money
• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments
It's very good fundamental
Submitted by NIKUNJ HINSU on Wed, 29/09/2010 - 16:23.

It's very good fundamental about microcontroller..


• 0Nice
• 0Cool
• 0Superb
• Login or register to post comments

REALY VERY NICE


Submitted by jyoti on Thu, 30/09/2010 - 13:28.

REALY VERY NICE INFORMATION....

AMAZING

THANK YOU

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

thanks for giving a complete


Submitted by nidhi dahiya on Thu, 30/09/2010 - 18:57.

thanks for giving a complete knowledge of 8051


• 0Nice
• 0Cool
• 0Superb
• Login or register to post comments

excellent site i wud like to


Submitted by anjumali on Fri, 08/10/2010 - 15:39.

excellent site i wud like to contribute i do have few codes

• 0Nice
• 0Cool
• 0Superb
• Login or register to post comments

i wont to know about at89s52


Submitted by gyanesh on Sun, 10/10/2010 - 15:33.
i wont to know about at89s52
• 0Nice
• 2Cool
• 0Superb
• Login or register to post comments

it is advanced controller it
Submitted by sandeep jadhav on Wed, 17/11/2010 - 11:20.

it is advanced controller it has 3 intrupt. and progaram burning is easy in thise just download ace.isp
softwear and se dia. in it

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

Nice info, though i would


Submitted by rahul joshi on Tue, 12/10/2010 - 23:00.

Nice info, though i would like to know where are interrupts used in the applications.

I have just read about it but haven't seen them in action in any of the books or applications.

Can you give some info on that? It'll be great help.

• 0Nice
• 0Cool
• 0Superb
• Login or register to post comments

thankyou for for useful


Submitted by usamahafeez on Wed, 13/10/2010 - 00:16.

thankyou for for useful information

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

what software can I use for


Submitted by sayanmudi on Wed, 13/10/2010 - 22:19.

what software can I use for programming the 8051?

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

RIDE
Submitted by ABIN ABRAHAM on Fri, 15/10/2010 - 20:04.

RIDE

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments
KEIL
Submitted by kartheek.kc on Wed, 27/10/2010 - 16:28.

KEIL

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

keil uv3 or uv4


Submitted by sandeep jadhav on Wed, 17/11/2010 - 11:22.

keil uv3 or uv4

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

Maraming salamat
Submitted by jovas on Tue, 19/10/2010 - 16:51.

Maraming salamat po.(Tagalog)

It means "thank you so much."

It fills me with great joy, it really be of great help for our project.

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

Thank you so much for nice


Submitted by BHATT BIPIN .T. on Mon, 25/10/2010 - 14:37.

Thank you so much for nice information.

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

Thank you so much for nice


Submitted by BHATT BIPIN .T. on Mon, 25/10/2010 - 14:37.

Thank you so much for nice information.


• 0Nice
• 1Cool
• 0Superb
• Login or register to post comments

NICE ! THANKS
Submitted by lequocbao on Mon, 01/11/2010 - 10:37.

NICE ! THANKS

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

very usefull,explained
Submitted by nileshvraut on Mon, 01/11/2010 - 22:42.

very usefull,explained briefly thanks

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

Thanks to Engineers Garage


Submitted by francodigits on Wed, 03/11/2010 - 16:00.

Thanks to Engineers Garage for giving students ample opportunity to learn from this website, indeed it
is empowering the people with knowledge, i sincerely appreciate your good work.

Thanks and keep doing the good work

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

The information is very


Submitted by tnshesh on Wed, 10/11/2010 - 06:15.
The information is very useful. Please provide more info on C programming 89C51 microcontroller
focussing on headers , initialization , i/p and o/p configuring methods, interupt initialization,...etc. This
will greatly help in starting a project.
• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

nice
Submitted by Muthuramalingam u.k on Thu, 11/11/2010 - 14:34.

nice
• 0Nice
• 1Cool
• 0Superb
• Login or register to post comments

best site! thnx!


Submitted by shashank2104 on Fri, 12/11/2010 - 15:20.

best site!

thnx!

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

hi very member of the


Submitted by Luckenson on Mon, 15/11/2010 - 07:51.

hi very member of the excelent page.

I want somes examples simples about all interrupt please.

thank for read me.

• 0Nice
• 1Cool
• 0Superb
• Login or register to post comments

Thanks so much for this! This


Submitted by abbner on Thu, 18/11/2010 - 21:10.

Thanks so much for this! This is exactly what I was looking for.

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

Existance this summery in


Submitted by VISHVESH on Sun, 28/11/2010 - 09:01.

Existance this summery in front page allowes programmer newer to this 8051 MC, program without
use of any other information.

Really awesome

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

After reading these


Submitted by shailesh on Wed, 01/12/2010 - 05:51.

After reading these information one must say really awesome !!!!!!!

• 0Nice
• 1Cool
• 1Superb
• Login or register to post comments

Than a Lot man


Submitted by friendchooser on Mon, 13/12/2010 - 18:44.

Than a Lot man

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

I like this site...its very


Submitted by giga abhi on Fri, 24/12/2010 - 12:03.

I like this site...its very useful to make new projects! :)

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

this is the good site for the


Submitted by Ashok kumar reddy on Tue, 28/12/2010 - 11:07.

this is the good site for the engeneers

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

super
Submitted by M.LEKSHMANAN on Wed, 05/01/2011 - 23:46.

super

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

super website i got many


Submitted by M.LEKSHMANAN on Wed, 05/01/2011 - 23:47.

super website i got many details from this.

• 0Nice
• 0Cool
• 1Superb
• Login or register to post comments

Hello, i'm new to this site,


Submitted by davidmifx on Tue, 11/01/2011 - 01:56.

Hello, i'm new to this site, i've found it when i was searching in Google, Thanks for your post

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

Thank you sir...it is great


Submitted by dave.mit27 on Sat, 22/01/2011 - 23:07.

Thank you sir...it is great job! am enjoying it...LONG LIVE SIR....

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

amazing site......... thanks


Submitted by sachin b. jagtap on Thu, 03/02/2011 - 18:12.
amazing site......... thanks for such very useful info.
• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

Nice Information... pls


Submitted by kanna.kannanbe on Tue, 15/02/2011 - 09:01.

Nice Information...

pls provide (how to program a 8051 chip with the help of C language)......

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

Hi ! I am working as Embedded
Submitted by unimatics on Tue, 15/02/2011 - 10:57.

Hi !

I am working as Embedded Developer. I really find all the articles and tutorials very useful for the
reference.

Thanks for your efforts for providing such valuable information.

I hope you will try to make this website more effective in future.

All the very best!!!

• 1Nice
• 0Cool
• 0Superb
• Login or register to post comments

XLLENT WEBSITE. THANK 2 U


Submitted by rjvvsn on Sun, 20/02/2011 - 12:45.

XLLENT WEBSITE.

THANK 2 U

• 1Nice
• 0Cool
• 1Superb
• Login or register to post comments
INFO
Get involved in the most heated discussion @ Creativity Shed !

Register for the Waitlisted category in Training Camp !


USER LOGIN
Top of Form

Username: *

Password: *
Log in

• Create new account


• Request new password
Bottom of Form
YOU ARE HERE
Home

• Top
Copyright © 2011 EngineersGarage. All rights reserved. Privacy Policy

You might also like