0% found this document useful (0 votes)
9 views19 pages

Crypto Notes3

The document provides an overview of the 8051 microcontroller, detailing its architecture, features, and applications in embedded systems. It distinguishes between microcontrollers and microprocessors, categorizes microcontrollers based on various configurations, and elaborates on the specific functionalities of the 8051, including its memory, timers, and serial communication capabilities. Additionally, it includes a pin diagram and explains the role of each pin in the microcontroller's operation.

Uploaded by

get4rounik
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
0% found this document useful (0 votes)
9 views19 pages

Crypto Notes3

The document provides an overview of the 8051 microcontroller, detailing its architecture, features, and applications in embedded systems. It distinguishes between microcontrollers and microprocessors, categorizes microcontrollers based on various configurations, and elaborates on the specific functionalities of the 8051, including its memory, timers, and serial communication capabilities. Additionally, it includes a pin diagram and explains the role of each pin in the microcontroller's operation.

Uploaded by

get4rounik
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/ 19

School of Computer Science and Engineering

BCSE305L – Embedded Systems


Module ~ I – Introduction
Microcontroller Architecture - 8051
Presentation by
Dr.K.Ragavan
Assistant Professor Senior Grade I
Department of IOT
School of Computer Science and Engineering
VIT University, Vellore
Dr.K.Ragavan, SCOPE, VIT 2
Microprocessor Based System
• CPU
• External RAM, ROM, I/O
(No internal RAM, ROM, I/O ports in the CPU)

Dr.K.Ragavan, SCOPE, VIT 3


Microcontroller
• A microcontroller is a small and low-cost microcomputer, which
is designed to perform the specific tasks of embedded systems
like displaying microwave’s information, receiving remote
signals, etc.
• The general microcontroller consists of the
• processor,
• the memory (RAM, ROM, EPROM),
• Serial ports,
• peripherals (timers, counters), etc.

A smaller computer on a CHIP

Dr.K.Ragavan, SCOPE, VIT 4


Difference between Microprocessor and Microcontroller
The following table highlights the differences between a
microprocessor and a microcontroller −
Microcontroller Microprocessor
Microcontrollers are used to
Microprocessors are used for big
execute a single task within an
applications.
application.
Its designing and hardware cost is Its designing and hardware cost is
low. high.
Easy to replace. Not so easy to replace.
It is built with CMOS technology, Its power consumption is high
which requires less power to because it has to control the entire
operate. system.
It doesn’t consist of RAM, ROM, I/O
It consists of CPU, RAM, ROM,
ports. It uses its pins to interface to
I/O ports.
Dr.K.Ragavan,peripheral
SCOPE, VIT devices. 5
Types of Microcontrollers
• Microcontrollers are divided into various categories based on
memory, architecture, bits and instruction sets.
Based on Bit configuration,
• 8-bit microcontroller − This type of microcontroller is used to
execute arithmetic and logical operations like addition,
subtraction, multiplication division, etc. For example, Intel 8031
and 8051 are 8 bits microcontroller.
• 16-bit microcontroller − This type of microcontroller is used to
perform arithmetic and logical operations where higher accuracy
and performance is required. For example, Intel 8096 is a 16-bit
microcontroller.
• 32-bit microcontroller − This type of microcontroller is
generally used in automatically controlled appliances like
automatic operational machines, medical appliances, etc.
Dr.K.Ragavan, SCOPE, VIT 6
Based on the memory configuration,
• External memory microcontroller − This type of microcontroller is
designed in such a way that they do not have a program memory on the
chip. Hence, it is named as external memory microcontroller. For
example: Intel 8031 microcontroller.
• Embedded memory microcontroller − This type of microcontroller is
designed in such a way that the microcontroller has all programs and
data memory, counters and timers, interrupts, I/O ports are embedded
on the chip. For example: Intel 8051 microcontroller.
Based on the instruction set configuration,
• CISC − CISC stands for complex instruction set computer. It allows the
user to insert a single instruction as an alternative to many simple
instructions.
• RISC − RISC stands for Reduced Instruction Set Computers. It reduces
the operational time by shortening the clock cycle per instruction.

Dr.K.Ragavan, SCOPE, VIT 7


Applications of Microcontrollers
Microcontrollers are widely used in various different devices such as
• Light sensing and controlling devices like LED.

• Temperature sensing and controlling devices like microwave


oven, chimneys.

• Fire detection and safety devices like Fire alarm.

• Measuring devices like Volt Meter.

• Microcontrollers are widely used in many domestic (washing


machines, VCD players, microwave oven, robotics, etc.) as well
as industrial and automobile areas.

Dr.K.Ragavan, SCOPE, VIT 8


8051 Microcontroller
• 8051 microcontroller is designed by Intel in 1981.
• It is an 8-bit microcontroller.
• It is built with 40 pins DIP (dual inline package), 4kb of ROM
storage and 128 bytes of RAM storage, 2 16-bit timers.
• It consists of are four parallel 8-bit ports, which are
programmable as well as addressable as per the requirement.
• An on-chip crystal oscillator is integrated in the microcontroller
having crystal frequency of 12 MHz.

Dr.K.Ragavan, SCOPE, VIT 9


Features of 8051
• 8 bit Processor
• 4KB Internal ROM
• 128 Bytes Internal RAM
• Four 8 BIT I/O PORTS (32 I/O LINES)
• Two 16 Bit Timers/Counters
• On Chip Full Duplex UART for Serial Communication
• 5 Vector Interrupts ( 2 External, 3 Internal - Timer0,Timer1,Serial)
• On Chip Clock Oscillator
• 16 bit Address bus
• 64k External Code Memory
• 64k External Data Memory
• 16-bit program counter to access external Code Memory and
• 16 bit Data Pointer to access external Data Memory
• 128 user defined flags
• 32 General Purpose Registers each of 8 bits
Dr.K.Ragavan, SCOPE, VIT 10
Block Diagram of 8051

Dr.K.Ragavan, SCOPE, VIT 11


In the 8051 block diagram,
• the system bus connects all the support devices to the CPU.
• The system bus consists of
– an 8-bit data bus,
– a 16-bit address bus and
– bus control signals.
• All other devices like program memory, ports, data memory,
serial interface, interrupt control, timers, and the CPU are all
interfaced together through the system bus.

CPU
• Microcontroller 8051 has a central processing unit which is also
called ALU (Arithmetic Logic Unit) which performs all
arithmetic and logical operation.
Dr.K.Ragavan, SCOPE, VIT 12
Dr.K.Ragavan, SCOPE, VIT 13
Architecture of 8051 Microcontroller

Dr.K.Ragavan, SCOPE, VIT 14


RAM (Random-access memory)
• Microcontroller 8051 has 128-byte RAM for data storage.
• It is a Volatile type of memory. That means the data is lost when power
to the device is turned off.
• It is used during execution time to store data temporarily.
• RAM consists of a register bank, stack, and temporary data storage with
some special function registers (SFR’s).

ROM (Read Only Memory)


• In 8051, 4KB ROM is available for program storage.
• It is a Non-Volatile type of memory. It means that data is not lost even
in the event of power failure.
• 8051 has a 16-bit address. It means it can access 2^16 memory
locations and we can interface up to 64 KB of program memory
externally in case of large applications.
Sizes specified of RAM and ROM are different by their manufacturer
Dr.K.Ragavan, SCOPE, VIT 15
8051 Timers and Counters
• Microcontroller 8051 has two timer pins T0 and T1
• By these timers, we can generate a delay of a particular time in timer mode
• We can count external pulses or events in counter mode
• Two 16-bit timer registers are available as T0 (TH0 & TL0) and T1 (TH1
& TL1), e.g. If we want to load T0 then we can load Higher 8-bit in TH0 &
Lower 8-bit in TL0
• TMOD and TCON registers are used to select mode and control the timer
operation
8051 Interrupts
• Interrupts are requested by internal or external peripherals which are
masked while unused.
• Interrupt handler routines are called after each interrupts event occurs.
• These routines are called an Interrupt Service Routine (ISR) and are
located in special memory loc.
• INT0 and INT1 pins used to accept external
Dr.K.Ragavan, interrupts.
SCOPE, VIT 16
Oscillator
• it is used to provide a clock to the 8051 which decides the speed
and baud rate.
• We use crystals of frequency varying from 4MHz to 30 MHz.
Normally we use 11.0592 MHz frequency which is required for a
9600 baud rate in serial communication.

8051 Serial Communication port


• 8051 MCU has two serial communication (UART) pins TXD and
RXD used for transmitting and receive data serially via the SBUF
register
• SCON SFR used to control serial operation

Dr.K.Ragavan, SCOPE, VIT 17


Pin Diagram

Dr.K.Ragavan, SCOPE, VIT 18


• Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other
functions. It is internally pulled up, bi-directional I/O port.
• Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial
values.
• Pins 10 to 17 − These pins are known as Port 3. This port serves some
functions like interrupts, timer input, control signals, serial communication
signals RxD and TxD, etc.
• Pins 18 & 19 − These pins are used for interfacing an external crystal to get
the system clock.
• Pin 20 − This pin provides the power supply to the circuit (Ground).
• Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher
order address bus signals are also multiplexed using this port.
• Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used
to read a signal from the external program memory.
• Pin 30 − This is EA pin which stands for External Access input. It is used to
enable/disable the external memory interfacing.
• Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to
demultiplex the address-data signal of port.
• Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower
order address and data bus signals are multiplexed using this port.
• Pin 40 − This pin is used to provide power
Dr.K.Ragavan, supply
SCOPE, VIT to the circuit (Vcc). 19

You might also like