8051
MICROCONTROLLER
By:- ATUL KUMAR
ELECTRICAL & ELECTRONICS
1614321020
INTRODUCTION TO EMBEDDED SYSTEMS
DEFINITION
A combination of hardware and software which together form
a component of a larger machine.
An example of an embedded system is a microprocessor that
controls an automobile engine.
An embedded system is designed to run on its own without
human intervention, and may be required to respond to
events in real time.
CHARACTERISTICS
• Embedded systems are designed to do some specific task, rather
than be a general-purpose computer for multiple tasks.
• Embedded systems are not always standalone devices.
• The program instructions written for embedded systems are
referred to as firmware, and are stored in read-only memory or
Flash memory chips. They run with limited computer hardware
resources.
What is a Microcontroller?
A microcontroller (sometimes abbreviated µC or MCU) is a
small computer on a single IC containing a processor core,
memory, and programmable input/output peripherals.
It is a decision making device used widely in embedded
systems and all intelligent devices.
Basic Block Diagram of Microcontroller
Difference between Microcontroller and
Microprocessor
Microcontroller has I/O ports, Memory, timers etc all
integrated on chip itself.
In Microprocessors, I/O ports, memory, timer etc are to be
connected externally.
Block Diagram to show the difference
Types of Microcontroller
8051 (1981, Intel)
PIC (Microchip Technologies in the year 1993)
AVR (1996 by Atmel)
ARM (1983, ARM Holdings)
Harvard and Von Neumann Architecture
Harvard Architecture
Harvard architecture has separate data and instruction
buses.
This allows transfers to be performed simultaneously on
both buses.
Von Neumann Architecture
A Von Neumann architecture has only one bus which is used
for both data transfers and instruction fetch
Data transfers and instruction fetches must be scheduled as
they cannot be performed at the same time
TYPES OF PACKAGES
40-lead PDIP (Plastic Dual In-line Package)
44-lead TQFP (Thin Quad film Package)
Introduction about 8051 Microcontroller
In 1981, Intel Corporation introduced an 8-bit microcontroller called the
8051.
It was referred as system on a chip because it had 128 bytes of RAM, 4K byte
of on-chip ROM, two timers, one serial port, and 4 ports (8-bit wide), all on a
single chip. When it became widely popular, Intel allowed other
manufacturers to make and market different flavors of 8051 with its code
compatible with 8051.
The 8051 microcontroller is a small computer based on an architecture with
support for embedded applications.
8051 Flavors / Members
8052 microcontroller − 8052 has all the standard features of the 8051
microcontroller as well as an extra 128 bytes of RAM and an extra timer. It
also has 8K bytes of on-chip program ROM instead of 4K bytes.
8031 microcontroller − It is another member of the 8051 family. This chip is
often referred to as a ROM-less 8051, since it has 0K byte of on-chip ROM. We
must add external ROM to it in order to use it, which contains the program to
be fetched and executed. This program can be as large as 64K bytes. But in
the process of adding external ROM to the 8031, it lost 2 ports out of 4 ports.
Comparison between 8051 Family Members
Feature 8051 8052 8031
ROM(bytes) 4K 8K 0K
RAM(bytes) 128 256 128
Timers 2 3 2
I/O pins 32 32 32
Serial port 1 1 1
Interrupt sources 6 8 6
8051 Architecture
Features of 8051 Microcontroller
64K bytes on-chip program memory (ROM)
128 bytes on-chip data memory (RAM)
Four register banks
128 user defined software flags
8-bit bidirectional data bus
16-bit unidirectional address bus
32 general purpose registers each of 8-bit
16 bit Timers (usually 2, but may have more or less)
Three internal and two external Interrupts
Four 8-bit ports,(short model have two 8-bit ports)
16-bit program counter and data pointer
8051 may also have a number of special features such as UARTs, ADC, Op-amp,
etc.
Memory Architecture
The 4 discrete types of memory in 8051 are:
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.
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.
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.
External Data Memory – Located at address 0. The Instruction MOVX (Move
External) should be used to access the external data memory.
Various 8051 microcontrollers
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.
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 Packagin
ROM RAM I/O pins Timer Interrupt Vcc
Number g
AT89C51 4K 128 32 2 6 5V 40
AT89C52 8K 256 32 3 8 5V 40
AT89C105
1K 64 15 1 3 3V 20
1
AT89C205
2K 128 32 3 8 3V 20
1
AT89LV51 4K 128 32 2 6 3V 40
AT89LV52 8K 128 32 3 8 3V 40
APPLICATION AREAS
• TV
• Stereo
• Remote control
• Phone / mobile phone
• Refrigerator
• Microwave
• Washing machine
• Oven / rice or bread cooker
• Watch
• Alarm clock
• Electronic musical instruments
• Electronic toys (stuffed animals, handheld toys, pinball
etc.)
• Medical home equipment (e.g. blood pressure,
thermometer)
Thank You