SlideShare a Scribd company logo
1 of 25
SUBJECT NAME: MICROPRCESSOR & MICROCONTROLLER
NAME: Dr. Ashok Kumar K
Insert Your Photo here
INTRODUCTION:
8051 microcontroller is one of the most successful controller given by Intel company.
8051 is more convenient to use rather than the microprocessor for a single application
Because it is very cost-effective and it is a system on chip .
Microcntroller-8051
OUTCOMES:
Student understands the architecture of 8051 microcontroller.
Student understands the addressing modes and instruction set of 8051 microcontroller.
Student can develop various assembly language programs in real time applications
Using microcontrollers.
CONTENTS:
8051 microcontroller-architecture
8051 microcontroller pin configuration
OUTCOMES:
 Student can understands the architecture of 8051 microcontroller.
 Student can understands the pin description of 8051 microcontroller.
What is a Microcontroller?
A single chip computer or A CPU with all the peripherals like RAM,
ROM, I/O Ports, Timers/Counters On the same chip.
For ex: Motorola's 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X etc…
8051 Microcontroller
8051 Microcontroller
8051 Microcontroller
1.The 8051 is based on an 8-bit controller with Harvard architecture.
2. Its 8-bit architecture is optimized for control applications with
extensive Boolean processing.
3.It is available as a 40-pin DIP chip and works at+5 volts DC.
Salient features:
1. 4 KB on chip program memory (ROM or EPROM))
2. 128 bytes on chip data memory (RAM).
3. 8-bit data bus & 16-bit address bus
4. 32 general purpose registers each of 8 bits
5. Two -16 bit timers T0 and T1
6 .Five interrupts (3 internal and 2 external).
7. Four parallel ports each of 8-bits (PORT0, PORT1, PORT2, PORT3)
with a total of 32 I/O lines.
8. One 16-bit program counter and one 16-bit DPTR (data pointer)
9. One 8-bit stack pointer
10. One microsecond instruction cycle with 12 MHz crystal.
11. One full duplex serial communication port.
Intel 8051 Microcontroller Architecture
1.8051 has 8-bit ALU which can perform all the 8-bit arithmetic and
logical operations in one machine cycle.
2. The ALU is associated with two registers A & B
A and B Registers:
1.The A and B registers are special function registers which hold the
results of many arithmetic and logical operations of 8051.
2.The A register is also called the Accumulator
3.B register especially used to store the second operand while doing
the multiplication and division operation .
The R registers:
1. The "R" registers are a set of eight registers that are named R0, R1,
up to R7.
2. The "R" registers are also used to temporarily store values. These R
registers and banks are there in the Internal RAM.
Intel 8051 Microcontroller Architecture
Program Counter (PC):
1. 8051 has a 16-bit program counter .
2. The program counter always points to the address of the next
instruction to be executed.
Stack Pointer Register (SP):
1. It is an 8-bit register which stores the address of the stack top. i.e the
Stack Pointer is used to indicate where the next value to be removed
from the stack should be taken from.
Data pointer register (DPTR):
1. It is a 16-bit register which is the only user-accessible.
2.DPTR, as the name suggests, is used to point to data.
3. When the 8051 accesses external memory it will access external
memory at the address indicated by DPTR.
4. This DPTR can also be used as two8-registers DPH and DPL.
Intel 8051 Microcontroller Architecture
Program Status Word Register (PSW):
1. The 8051 has a 8-bit PSW register which is also known as Flag
register.
2. The two unused bits are user definable bits.
3. In the 6-bits four of them are conditional flags.
PSW Register :
Intel 8051 Microcontroller Architecture
CY AC F0 RS1 RS0 OV F1 P
PSW.7 PSW.6 PSW.5 PSW.4 PSW.3 PSW.2 PSW.1 PSW.0
The meaning of various bits of PSW register is shown below:
Intel 8051 Microcontroller Architecture
Name of the flag Bit position Meaning
CY PSW.7 Carry flag
AC PSW.6 Auxiliary carry flag
F0 PSW.5 Flag 0 available for general purpose
RS1 PSW.4 Register bank select bit 1
RS0 PSW.3 Register bank select bit 0
OV PSW.2 Overflow flag
F1 PSW.1 Flag 1 for general purpose
P PSW.0 Parity flag .Set/cleared by hardware
The selection of the register banks and their addresses are given below
Intel 8051 Microcontroller Architecture
RS1 RS0 REGISTER BANK ADDRESS
0 0 0 00H - 07H
0 1 1 08H - 0FH
1 0 2 10H - 17H
1 1 3 18H - 1FH
1.The 8051 microcontroller has 128 bytes of internal RAM and 4kb of
on chip ROM .
2. The RAM is also known as data memory and the ROM is known as
program memory.
3. Both RAM & ROM capacity can extend upto 64KB(by interfacing
External memory with 8051)
INTERNAL RAM OF 8051:
1. This internal RAM is found on-chip on the 8051.
2. So it is the fastest RAM available, and it is also the most flexible in
terms of reading, writing, and modifying its contents.
3. Internal RAM is volatile, so when the 8051 is reset this memory is
cleared.
Memory Organization
The 128 bytes of internal
RAM is organized as below.
1. Four register banks
(Bank0, Bank1, Bank2 and
Bank3) each of 8-bytes (total
32 bytes). The default bank
register is Bank0.
2. 16 bytes of bit addressable
area
3. 80 bytes of general
purpose area (Scratch pad
memory) as shown in the
diagram .
Memory Organization
Internal RAM organization:
Internal ROM (on - chip ROM):
1. The 8051 microcontroller has
4 kB of on chip ROM but it can be
extended up to 64kB.This ROM is
also called program memory or
code memory.
2. The CODE segment is accessed
using the program counter (PC)
for opcode fetches and by DPTR
for data.
3. The external ROM is accessed
when the EA (active low) pin is
connected to ground .
Memory Organization
Internal ROM organization :
1.In 8051
microcontroller there
certain registers which
uses the RAM addresses
from 80h to ffh and they
are meant for certain
specific operations .
2. These registers are
called special function
registers (sfrs).
3. Some of these
registers are bit
addressable also.
Special Function Registers (SFR’s)
Special Function Registers (SFR’s)
The * indicates the bit addressable SFRs
1. The 8051 microcontroller has four parallel I/O ports, each of 8-bits .
2. So, it provides the user 32 I/O lines for connecting the
microcontroller to the peripherals.
3. The four ports are P0 (port 0),p1(port1) ,p2(port 2) and P3 (port3).
4. Upon reset all the ports are output ports. In order to make them
input, all the ports must be set i.e a high bit must be sent to all the port
pins.
PORT 0:
1. Port 0 is an 8-bit I/O port with dual purpose.
2. If external memory is used, these port pins are used for the lower
address byte address/data (AD0-AD7), otherwise all bits of the port
are either input or output.
Parallel I /O Ports
3. Unlike other ports, Port 0 is not provided with pull-up resistors
internally, so for PORT0 pull-up resistors of nearly 10k are to be
connected externally as shown in the below fig.
Parallel I /O Ports
PORT 1:
1. Port 1 occupies a total of 8 pins (pins 1 through 8).
2. It has no dual application and acts only as input or output port.
3. In contrast to port 0, this port does not need any pull-up resistors
since pull-up resistors connected internally.
PORT 2:
1. Port 2 is also an eight bit parallel port. (Pins 21- 28).
2. It can be used as input or output port.
3. As this port is provided with internal pull-up resistors it does not
need any external pull-up resistors.
4. Port2 lines are also associated with the higher order address lines
A8-A15.
Parallel I /O Ports
PORT 3:
1. Port3 is also an 8-bit parallel port
with dual function.( Pins 10 to 17).
2. The port pins can be used for I/O
operations as well as for control
operations.
3. The details of these additional
operations are given in the table.
4. Port 3 also do not need any
external pull-up resistors as they are
provided internally similar to the
case of port2 & port 1.
Parallel I /O Ports
8051 Pin configuration:
8051 Microcontroller Pin Configuration
XTAL1, XTAL2:
These two pins are connected to Quartz crystal oscillator which runs
the on-chip oscillator.
Crystal oscillator connection to XTAL1 and XTAL2 pins shown below
8051 Microcontroller Pin Configuration
RST:
1. The RESET pin is an input pin and it is an active high pin.
2. When a high pulse is applied to this pin the microcontroller will
reset and terminate all activities.
EA (External Access):
1. This pin is an active low pin.
2. This pin is connected to ground when microcontroller is accessing
the program code stored in the external memory and connected to Vcc
when it is accessing the program code in the on chip memory.
PSEN (Program Store Enable):
1. This is an output pin which is active low.
2. When the microcontroller is accessing the program code stored in
the external ROM, this pin is connected to the OE (Output Enable) pin
of the ROM.
ALE (ADDRESS LATCH ENABLE):
1. This ALE pin will de multiplex the address and data bus.
2. When the pin is high, the AD bus will act as address bus otherwise
the AD bus will act as data bus.
8051 Microcontroller Pin Configuration
P0.0- P0.7 (AD0-AD7):
The port 0 pins multiplexed with Address/data pins .If the
microcontroller is accessing external memory these pins will act as
address/data pins otherwise they are used for Port 0 pins.
P2.0- P2.7 (A8-A15):
The port2 pins are multiplexed with the higher order address pins.
When the microcontroller is accessing external memory these pins
provide the higher order address byte otherwise they act as Port 2
pins.
P1.0- P1.7:
These 8-pins are dedicated for Port1 to perform input or output port
operations.
P3.0- P3.7:
These 8-pins are meant for Port3 operations and also for some control
operations like Read, Write, Timer0, Timer1, INT0, INT1, RxD and TxD.
8051 Microcontroller Pin Configuration

More Related Content

What's hot

8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti 8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti VenkatraoRamisetti
 
8051 Microcontroller Tutorial and Architecture with Applications
8051 Microcontroller Tutorial and Architecture with Applications8051 Microcontroller Tutorial and Architecture with Applications
8051 Microcontroller Tutorial and Architecture with Applicationselprocus
 
8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay KumarVijay Kumar
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051Rashmi
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051Sadiq Rahim
 
janakiraman egsp collage I msc 4 unit
janakiraman egsp collage  I msc 4 unitjanakiraman egsp collage  I msc 4 unit
janakiraman egsp collage I msc 4 unitjanakiramang6
 
The hardware of the Mcs 51 microcontroller
 The hardware of the Mcs 51 microcontroller The hardware of the Mcs 51 microcontroller
The hardware of the Mcs 51 microcontrollerGarba Geidam
 
janakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiramang6
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 MicrocontrollerNitin Ahire
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt ianishgoel
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notesDr.YNM
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 MicrocontrollerJai Sudhan
 

What's hot (20)

8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti 8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
8051 presentation
8051 presentation8051 presentation
8051 presentation
 
8051 Microcontroller Tutorial and Architecture with Applications
8051 Microcontroller Tutorial and Architecture with Applications8051 Microcontroller Tutorial and Architecture with Applications
8051 Microcontroller Tutorial and Architecture with Applications
 
8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
MICROCONTROLLER - INTEL 8051
MICROCONTROLLER - INTEL 8051MICROCONTROLLER - INTEL 8051
MICROCONTROLLER - INTEL 8051
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
janakiraman egsp collage I msc 4 unit
janakiraman egsp collage  I msc 4 unitjanakiraman egsp collage  I msc 4 unit
janakiraman egsp collage I msc 4 unit
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
 
8051 Micro Controller
8051 Micro Controller 8051 Micro Controller
8051 Micro Controller
 
The hardware of the Mcs 51 microcontroller
 The hardware of the Mcs 51 microcontroller The hardware of the Mcs 51 microcontroller
The hardware of the Mcs 51 microcontroller
 
janakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiraman I msc 4 unit
janakiraman I msc 4 unit
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt i
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notes
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 

Similar to Micro controller

Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller918007165995
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentseceprinter6
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerSudhanshu Janwadkar
 
Unit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notesUnit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notesPrabhu Mali
 
Microcontroller (1).pptx
Microcontroller (1).pptxMicrocontroller (1).pptx
Microcontroller (1).pptxITPradiptaRoy
 
Ashish microcontroller 8051
Ashish microcontroller 8051Ashish microcontroller 8051
Ashish microcontroller 8051ASHISH RAJ
 
8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptxARYAKUMARNIRAV
 
8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil Kaware8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil KawareProf. Swapnil V. Kaware
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdfSrikrishna Thota
 
Microcontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay KumarMicrocontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay KumarVijay Kumar
 
B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051MahiboobAliMulla
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051guest70d48b1
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxShanDimantha1
 

Similar to Micro controller (20)

Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 Microcontroller
 
8051.pptx
8051.pptx8051.pptx
8051.pptx
 
Unit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notesUnit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notes
 
Microcontroller (1).pptx
Microcontroller (1).pptxMicrocontroller (1).pptx
Microcontroller (1).pptx
 
Ashish microcontroller 8051
Ashish microcontroller 8051Ashish microcontroller 8051
Ashish microcontroller 8051
 
8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx
 
8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil Kaware8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil Kaware
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
 
Microcontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay KumarMicrocontroller (8051) by K. Vijay Kumar
Microcontroller (8051) by K. Vijay Kumar
 
B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Unit 4.pptx
Unit 4.pptxUnit 4.pptx
Unit 4.pptx
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
Micro 8051
Micro 8051Micro 8051
Micro 8051
 
89s52 2
89s52 289s52 2
89s52 2
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptx
 
Unit 5
Unit 5Unit 5
Unit 5
 

Recently uploaded

1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesRashidFaridChishti
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxNANDHAKUMARA10
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...jabtakhaidam7
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 

Recently uploaded (20)

1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 

Micro controller

  • 1. SUBJECT NAME: MICROPRCESSOR & MICROCONTROLLER NAME: Dr. Ashok Kumar K Insert Your Photo here
  • 2. INTRODUCTION: 8051 microcontroller is one of the most successful controller given by Intel company. 8051 is more convenient to use rather than the microprocessor for a single application Because it is very cost-effective and it is a system on chip . Microcntroller-8051 OUTCOMES: Student understands the architecture of 8051 microcontroller. Student understands the addressing modes and instruction set of 8051 microcontroller. Student can develop various assembly language programs in real time applications Using microcontrollers.
  • 3. CONTENTS: 8051 microcontroller-architecture 8051 microcontroller pin configuration OUTCOMES:  Student can understands the architecture of 8051 microcontroller.  Student can understands the pin description of 8051 microcontroller.
  • 4. What is a Microcontroller? A single chip computer or A CPU with all the peripherals like RAM, ROM, I/O Ports, Timers/Counters On the same chip. For ex: Motorola's 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X etc… 8051 Microcontroller
  • 6. 8051 Microcontroller 1.The 8051 is based on an 8-bit controller with Harvard architecture. 2. Its 8-bit architecture is optimized for control applications with extensive Boolean processing. 3.It is available as a 40-pin DIP chip and works at+5 volts DC. Salient features: 1. 4 KB on chip program memory (ROM or EPROM)) 2. 128 bytes on chip data memory (RAM). 3. 8-bit data bus & 16-bit address bus 4. 32 general purpose registers each of 8 bits 5. Two -16 bit timers T0 and T1 6 .Five interrupts (3 internal and 2 external). 7. Four parallel ports each of 8-bits (PORT0, PORT1, PORT2, PORT3) with a total of 32 I/O lines. 8. One 16-bit program counter and one 16-bit DPTR (data pointer) 9. One 8-bit stack pointer 10. One microsecond instruction cycle with 12 MHz crystal. 11. One full duplex serial communication port.
  • 8. 1.8051 has 8-bit ALU which can perform all the 8-bit arithmetic and logical operations in one machine cycle. 2. The ALU is associated with two registers A & B A and B Registers: 1.The A and B registers are special function registers which hold the results of many arithmetic and logical operations of 8051. 2.The A register is also called the Accumulator 3.B register especially used to store the second operand while doing the multiplication and division operation . The R registers: 1. The "R" registers are a set of eight registers that are named R0, R1, up to R7. 2. The "R" registers are also used to temporarily store values. These R registers and banks are there in the Internal RAM. Intel 8051 Microcontroller Architecture
  • 9. Program Counter (PC): 1. 8051 has a 16-bit program counter . 2. The program counter always points to the address of the next instruction to be executed. Stack Pointer Register (SP): 1. It is an 8-bit register which stores the address of the stack top. i.e the Stack Pointer is used to indicate where the next value to be removed from the stack should be taken from. Data pointer register (DPTR): 1. It is a 16-bit register which is the only user-accessible. 2.DPTR, as the name suggests, is used to point to data. 3. When the 8051 accesses external memory it will access external memory at the address indicated by DPTR. 4. This DPTR can also be used as two8-registers DPH and DPL. Intel 8051 Microcontroller Architecture
  • 10. Program Status Word Register (PSW): 1. The 8051 has a 8-bit PSW register which is also known as Flag register. 2. The two unused bits are user definable bits. 3. In the 6-bits four of them are conditional flags. PSW Register : Intel 8051 Microcontroller Architecture CY AC F0 RS1 RS0 OV F1 P PSW.7 PSW.6 PSW.5 PSW.4 PSW.3 PSW.2 PSW.1 PSW.0
  • 11. The meaning of various bits of PSW register is shown below: Intel 8051 Microcontroller Architecture Name of the flag Bit position Meaning CY PSW.7 Carry flag AC PSW.6 Auxiliary carry flag F0 PSW.5 Flag 0 available for general purpose RS1 PSW.4 Register bank select bit 1 RS0 PSW.3 Register bank select bit 0 OV PSW.2 Overflow flag F1 PSW.1 Flag 1 for general purpose P PSW.0 Parity flag .Set/cleared by hardware
  • 12. The selection of the register banks and their addresses are given below Intel 8051 Microcontroller Architecture RS1 RS0 REGISTER BANK ADDRESS 0 0 0 00H - 07H 0 1 1 08H - 0FH 1 0 2 10H - 17H 1 1 3 18H - 1FH
  • 13. 1.The 8051 microcontroller has 128 bytes of internal RAM and 4kb of on chip ROM . 2. The RAM is also known as data memory and the ROM is known as program memory. 3. Both RAM & ROM capacity can extend upto 64KB(by interfacing External memory with 8051) INTERNAL RAM OF 8051: 1. This internal RAM is found on-chip on the 8051. 2. So it is the fastest RAM available, and it is also the most flexible in terms of reading, writing, and modifying its contents. 3. Internal RAM is volatile, so when the 8051 is reset this memory is cleared. Memory Organization
  • 14. The 128 bytes of internal RAM is organized as below. 1. Four register banks (Bank0, Bank1, Bank2 and Bank3) each of 8-bytes (total 32 bytes). The default bank register is Bank0. 2. 16 bytes of bit addressable area 3. 80 bytes of general purpose area (Scratch pad memory) as shown in the diagram . Memory Organization Internal RAM organization:
  • 15. Internal ROM (on - chip ROM): 1. The 8051 microcontroller has 4 kB of on chip ROM but it can be extended up to 64kB.This ROM is also called program memory or code memory. 2. The CODE segment is accessed using the program counter (PC) for opcode fetches and by DPTR for data. 3. The external ROM is accessed when the EA (active low) pin is connected to ground . Memory Organization Internal ROM organization :
  • 16. 1.In 8051 microcontroller there certain registers which uses the RAM addresses from 80h to ffh and they are meant for certain specific operations . 2. These registers are called special function registers (sfrs). 3. Some of these registers are bit addressable also. Special Function Registers (SFR’s)
  • 17. Special Function Registers (SFR’s) The * indicates the bit addressable SFRs
  • 18. 1. The 8051 microcontroller has four parallel I/O ports, each of 8-bits . 2. So, it provides the user 32 I/O lines for connecting the microcontroller to the peripherals. 3. The four ports are P0 (port 0),p1(port1) ,p2(port 2) and P3 (port3). 4. Upon reset all the ports are output ports. In order to make them input, all the ports must be set i.e a high bit must be sent to all the port pins. PORT 0: 1. Port 0 is an 8-bit I/O port with dual purpose. 2. If external memory is used, these port pins are used for the lower address byte address/data (AD0-AD7), otherwise all bits of the port are either input or output. Parallel I /O Ports
  • 19. 3. Unlike other ports, Port 0 is not provided with pull-up resistors internally, so for PORT0 pull-up resistors of nearly 10k are to be connected externally as shown in the below fig. Parallel I /O Ports
  • 20. PORT 1: 1. Port 1 occupies a total of 8 pins (pins 1 through 8). 2. It has no dual application and acts only as input or output port. 3. In contrast to port 0, this port does not need any pull-up resistors since pull-up resistors connected internally. PORT 2: 1. Port 2 is also an eight bit parallel port. (Pins 21- 28). 2. It can be used as input or output port. 3. As this port is provided with internal pull-up resistors it does not need any external pull-up resistors. 4. Port2 lines are also associated with the higher order address lines A8-A15. Parallel I /O Ports
  • 21. PORT 3: 1. Port3 is also an 8-bit parallel port with dual function.( Pins 10 to 17). 2. The port pins can be used for I/O operations as well as for control operations. 3. The details of these additional operations are given in the table. 4. Port 3 also do not need any external pull-up resistors as they are provided internally similar to the case of port2 & port 1. Parallel I /O Ports
  • 22. 8051 Pin configuration: 8051 Microcontroller Pin Configuration
  • 23. XTAL1, XTAL2: These two pins are connected to Quartz crystal oscillator which runs the on-chip oscillator. Crystal oscillator connection to XTAL1 and XTAL2 pins shown below 8051 Microcontroller Pin Configuration
  • 24. RST: 1. The RESET pin is an input pin and it is an active high pin. 2. When a high pulse is applied to this pin the microcontroller will reset and terminate all activities. EA (External Access): 1. This pin is an active low pin. 2. This pin is connected to ground when microcontroller is accessing the program code stored in the external memory and connected to Vcc when it is accessing the program code in the on chip memory. PSEN (Program Store Enable): 1. This is an output pin which is active low. 2. When the microcontroller is accessing the program code stored in the external ROM, this pin is connected to the OE (Output Enable) pin of the ROM. ALE (ADDRESS LATCH ENABLE): 1. This ALE pin will de multiplex the address and data bus. 2. When the pin is high, the AD bus will act as address bus otherwise the AD bus will act as data bus. 8051 Microcontroller Pin Configuration
  • 25. P0.0- P0.7 (AD0-AD7): The port 0 pins multiplexed with Address/data pins .If the microcontroller is accessing external memory these pins will act as address/data pins otherwise they are used for Port 0 pins. P2.0- P2.7 (A8-A15): The port2 pins are multiplexed with the higher order address pins. When the microcontroller is accessing external memory these pins provide the higher order address byte otherwise they act as Port 2 pins. P1.0- P1.7: These 8-pins are dedicated for Port1 to perform input or output port operations. P3.0- P3.7: These 8-pins are meant for Port3 operations and also for some control operations like Read, Write, Timer0, Timer1, INT0, INT1, RxD and TxD. 8051 Microcontroller Pin Configuration