SlideShare a Scribd company logo
1 of 21
8051 Pin - out
PORT 0
PORT 1
PORT 2
PORT 3
8051 Pin Description
 The 8051 is packaged in a 40 – pin DIP (Dual – In Line Package).
 It is important to note that many pins of 8051 are used for more than
one function. The alternative functions of pins are shown in bold
letters.
 It has 32 I/O pins configured as four eight – bit parallel ports (P0, P1,
P2, P3 - Bidirectional).
 All ports are multiplexed except the pins of port 1.
 Each port consists of a latch, an output driver and an input buffer.
PORT 0 (Pins 32-39):
 It is used as I/O pins. The output drives and input buffers
of port 0 are used to access external memory.
 Port 0 outputs the low order byte of the external memory
address, time multiplexed with the data being written or
read. Thus, port 0 can be used as a multiplexed
address/data bus.
PORT 1 (Pins 1-8):
 Port 1 pins can be used only as I/O pins.
PORT 2 (Pins 21-28):
• The output drives of port 2 are used to access external
memory. Port 2 outputs the high order byte of the external
memory address when the address is 16 bits wide.
Otherwise, port 2 is used as an I/O port.
PORT 3 (Pins 10-17):
• All port pins of port 3 are multifunctional.
• Therefore, each pin of port 3 can be programmed to use
as I/O or as one of the alternate function. They have
special functions as
Symbol Position Alternate Use
RD P3.7 External Memory Read Signal
WR P3.6 External Memory Write Signal
T1 P3.5 External timer 1 Input
T0 P3.4 External timer 0 Input
INT1 P3.3 External Interrupt 1 Input
INT0 P3.2 External Interrupt 0 Input
TXD P3.1 Serial data Output
RXD P3.0 Serial data Input
Alternate Use of Pins
Power supply pins Vcc (Pin 40) and Vss (Pin 20):
• 8051 operates on d.c. power supply of +5v with
respect to ground. The +5v is to be connected to Pin
Vcc and ground to pin Vss with rated power supply
current of 125mA.
Oscillator Pins XTAL2 (Pin 18) and XTAL1 (Pin 19):
• For generating an internal clock signal, the external
oscillator is connected at these two pins.
ALE( Address Latch Enable):
• AD0 to AD7 lines are multiplexed. To demultiplex
these lines and for obtaining lower half of an address,
an external latch and ALE signal of 8051 is used.
Oscillator Pins XTAL2 (Pin 18) and XTAL1 (Pin 19):
• For generating an internal clock signal, the external
oscillator is connected at these two pins.
RST (Reset, Pin 9):
• This pin is used to reset 8051. For proper reset operation,
reset signal must be held high at least for two machine
cycles, while oscillator is running.
PSEN (Program Store Enable, Pin 29):
• It is the active low output control signal used to activate
the enable signal of the external ROM/EPROM. It is
activated every six oscillator periods while reading the
external memory. Thus, this signal acts as the read strobe
to external program memory.
EA (External Access, Pin 31):
• When this pin is high (Connected to Vcc), program
fetches to address 0000H through 0FFFH are directed
to the internal ROM and program fetches to address
1000H through FFFFH are directed to external
ROM/EPROM.
• When this pin is Low, all addresses fetched by
program are directed to the external ROM/EPROM
Internal and External Memories
0FFFH
1000H
60 Kbytes
External
4 Kbytes
Internal
64 Kbytes
External
EA =
0
Access
EA =
1
Access
OR
External
Memory
Internal Memory
FFFFH
0000
FFFFH
0000
Program Memory
Accessible by
Indirect
addressing
only
64 Kbytes
External
AND
Internal Memory
FFH
0
FFFFH
0000
Accessible by
Direct
addressing
Accessible by
direct &
indirect
addressing
Upper
128
80H
7FH
Lower
128
External
Memory
(SFRs)
Data Memory
• It can access up to 64K program memory and 64K
data memory.
• The 8051 has 4K bytes of internal program memory
and 256 bytes of internal data memory.
Internal RAM Organization
• The 8051 has 128 – byte internal RAM. It is accesses
using RAM address register.
• RAM of 8051 is organized into three distinct areas:
1. Register Bank.
2. Bit Addressable.
3. General Purpose.
8051 Register Banks (Working Registers)
• The first 32-bytes from address 00H to 1FH of internal
RAM constitute 32 working registers. They are organized
into four banks of eight registers each. The four register
banks are numbered 0 to 3 and are consists of eight registers
name R0 to R7.
• Each register can be addressed by name or by its RAM
address. Only one register bank is in use at a time. Bits RS0
and RS1 in the PSW determine which bank of registers is
currently in use.
• On reset, the bank 0 is selected and hence it is a default
register bank. Register banks when not selected can be
used as general purpose RAM.
RS1(PSW.4) RS0 (PSW.3) Bank Selection
0 0 Bank 0
0 1 Bank 1
1 0 Bank 2
1 1 Bank 3
Bit / Byte Addressable
• The 8051 provides 16 bytes if a bit-addressable area.
• It occupies RAM byte addresses from 20H to 2FH, forming
a total of 128(16 X 8) addressable bits.
• An addressable bit may be specified by its bit address of
00H to 7FH, or 8 bits may form any byte address from 20H
to 2FH.
• For example, bit address 4EH refers bit 6 of the byte
address 29H.
General Purpose RAM
• The RAM area above bit addressable area from 30H to 7FH
is called general purpose RAM. It is addressable by byte.
ROM Space in 8051
• 4 byte of internal ROM with address space from 0000H to
0FFFH. It is programmed by manufacturer when the chip is built.
This part cannot be erased and altered after fabrication. This is
used to store final version of the program.
• It is accessed using program address register.
The Program Status Word (PSW) register is an 8-bit
register. It is also referred to as the flag register. Although
the PSW register is 8 bits wide, only 6 bits of it are used
by the 8051.
The two unused bits are user-definable flags.
Four of the flags are called conditional flags, meaning that
they indicate some conditions that result after an
instruction is executed. These four are CY (carry), AC
(auxiliary carry),
P (parity), and OV (overflow).
The bits PSW.3 and PSW.4 are designated as RSO and
RSI, respectively, and are used to change the bank
registers.
The PSW.5 and PSW.l bits are general-purpose status flag
bits and can be used by the programmer for any purpose.
In other words, they are user definable.
12906245.ppt

More Related Content

Similar to 12906245.ppt

8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptxARYAKUMARNIRAV
 
4th yr dmumicrocontroller1
4th yr dmumicrocontroller14th yr dmumicrocontroller1
4th yr dmumicrocontroller1haymanotyehuala
 
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...sangeeta jogade
 
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
 
janakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiramang6
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller918007165995
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notesDr.YNM
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051guest70d48b1
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdfSrikrishna Thota
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller nitugatkal
 
8051 Microcontroller -1.pptx
8051 Microcontroller -1.pptx8051 Microcontroller -1.pptx
8051 Microcontroller -1.pptxveeramaniks
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerSudhanshu Janwadkar
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollerSouvik Dutta
 

Similar to 12906245.ppt (20)

Unit 4.pptx
Unit 4.pptxUnit 4.pptx
Unit 4.pptx
 
8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx8051 Microcontroller_module_4.1.pptx
8051 Microcontroller_module_4.1.pptx
 
4th yr dmumicrocontroller1
4th yr dmumicrocontroller14th yr dmumicrocontroller1
4th yr dmumicrocontroller1
 
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
Fundamentals of Microcontroller 8051 by Dr. Jogade S M, Assistant Professor, ...
 
UNIT 3 mp (1).ppt
UNIT 3 mp (1).pptUNIT 3 mp (1).ppt
UNIT 3 mp (1).ppt
 
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
 
Micro controller
Micro controllerMicro controller
Micro controller
 
8051.ppt
8051.ppt8051.ppt
8051.ppt
 
janakiraman I msc 4 unit
janakiraman I msc 4 unitjanakiraman I msc 4 unit
janakiraman I msc 4 unit
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notes
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
UNIT 4.pptx
UNIT 4.pptxUNIT 4.pptx
UNIT 4.pptx
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
 
Microcontroller1
Microcontroller1Microcontroller1
Microcontroller1
 
8051
80518051
8051
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
8051 Microcontroller -1.pptx
8051 Microcontroller -1.pptx8051 Microcontroller -1.pptx
8051 Microcontroller -1.pptx
 
Architecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 MicrocontrollerArchitecture of the Intel 8051 Microcontroller
Architecture of the Intel 8051 Microcontroller
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 

More from DhilibanSwaminathan

More from DhilibanSwaminathan (6)

S1P1_Yachen_Wan ghdnsbekeksjsbsnsng.pptx
S1P1_Yachen_Wan ghdnsbekeksjsbsnsng.pptxS1P1_Yachen_Wan ghdnsbekeksjsbsnsng.pptx
S1P1_Yachen_Wan ghdnsbekeksjsbsnsng.pptx
 
Embedded system and real time operating system
Embedded system  and real time operating systemEmbedded system  and real time operating system
Embedded system and real time operating system
 
addressingmodes8051.ppt
addressingmodes8051.pptaddressingmodes8051.ppt
addressingmodes8051.ppt
 
addressing-mode-of-8051.pdf
addressing-mode-of-8051.pdfaddressing-mode-of-8051.pdf
addressing-mode-of-8051.pdf
 
instructions set of 8051.pdf
instructions set of 8051.pdfinstructions set of 8051.pdf
instructions set of 8051.pdf
 
pch9_03.pdf
pch9_03.pdfpch9_03.pdf
pch9_03.pdf
 

Recently uploaded

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 

Recently uploaded (20)

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 

12906245.ppt

  • 1. 8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3
  • 2. 8051 Pin Description  The 8051 is packaged in a 40 – pin DIP (Dual – In Line Package).  It is important to note that many pins of 8051 are used for more than one function. The alternative functions of pins are shown in bold letters.  It has 32 I/O pins configured as four eight – bit parallel ports (P0, P1, P2, P3 - Bidirectional).  All ports are multiplexed except the pins of port 1.  Each port consists of a latch, an output driver and an input buffer.
  • 3. PORT 0 (Pins 32-39):  It is used as I/O pins. The output drives and input buffers of port 0 are used to access external memory.  Port 0 outputs the low order byte of the external memory address, time multiplexed with the data being written or read. Thus, port 0 can be used as a multiplexed address/data bus. PORT 1 (Pins 1-8):  Port 1 pins can be used only as I/O pins.
  • 4. PORT 2 (Pins 21-28): • The output drives of port 2 are used to access external memory. Port 2 outputs the high order byte of the external memory address when the address is 16 bits wide. Otherwise, port 2 is used as an I/O port. PORT 3 (Pins 10-17): • All port pins of port 3 are multifunctional. • Therefore, each pin of port 3 can be programmed to use as I/O or as one of the alternate function. They have special functions as
  • 5. Symbol Position Alternate Use RD P3.7 External Memory Read Signal WR P3.6 External Memory Write Signal T1 P3.5 External timer 1 Input T0 P3.4 External timer 0 Input INT1 P3.3 External Interrupt 1 Input INT0 P3.2 External Interrupt 0 Input TXD P3.1 Serial data Output RXD P3.0 Serial data Input Alternate Use of Pins
  • 6. Power supply pins Vcc (Pin 40) and Vss (Pin 20): • 8051 operates on d.c. power supply of +5v with respect to ground. The +5v is to be connected to Pin Vcc and ground to pin Vss with rated power supply current of 125mA. Oscillator Pins XTAL2 (Pin 18) and XTAL1 (Pin 19): • For generating an internal clock signal, the external oscillator is connected at these two pins.
  • 7. ALE( Address Latch Enable): • AD0 to AD7 lines are multiplexed. To demultiplex these lines and for obtaining lower half of an address, an external latch and ALE signal of 8051 is used. Oscillator Pins XTAL2 (Pin 18) and XTAL1 (Pin 19): • For generating an internal clock signal, the external oscillator is connected at these two pins.
  • 8. RST (Reset, Pin 9): • This pin is used to reset 8051. For proper reset operation, reset signal must be held high at least for two machine cycles, while oscillator is running. PSEN (Program Store Enable, Pin 29): • It is the active low output control signal used to activate the enable signal of the external ROM/EPROM. It is activated every six oscillator periods while reading the external memory. Thus, this signal acts as the read strobe to external program memory.
  • 9. EA (External Access, Pin 31): • When this pin is high (Connected to Vcc), program fetches to address 0000H through 0FFFH are directed to the internal ROM and program fetches to address 1000H through FFFFH are directed to external ROM/EPROM. • When this pin is Low, all addresses fetched by program are directed to the external ROM/EPROM
  • 10. Internal and External Memories 0FFFH 1000H 60 Kbytes External 4 Kbytes Internal 64 Kbytes External EA = 0 Access EA = 1 Access OR External Memory Internal Memory FFFFH 0000 FFFFH 0000 Program Memory
  • 11. Accessible by Indirect addressing only 64 Kbytes External AND Internal Memory FFH 0 FFFFH 0000 Accessible by Direct addressing Accessible by direct & indirect addressing Upper 128 80H 7FH Lower 128 External Memory (SFRs) Data Memory
  • 12. • It can access up to 64K program memory and 64K data memory. • The 8051 has 4K bytes of internal program memory and 256 bytes of internal data memory.
  • 13. Internal RAM Organization • The 8051 has 128 – byte internal RAM. It is accesses using RAM address register. • RAM of 8051 is organized into three distinct areas: 1. Register Bank. 2. Bit Addressable. 3. General Purpose.
  • 14. 8051 Register Banks (Working Registers) • The first 32-bytes from address 00H to 1FH of internal RAM constitute 32 working registers. They are organized into four banks of eight registers each. The four register banks are numbered 0 to 3 and are consists of eight registers name R0 to R7. • Each register can be addressed by name or by its RAM address. Only one register bank is in use at a time. Bits RS0 and RS1 in the PSW determine which bank of registers is currently in use.
  • 15. • On reset, the bank 0 is selected and hence it is a default register bank. Register banks when not selected can be used as general purpose RAM. RS1(PSW.4) RS0 (PSW.3) Bank Selection 0 0 Bank 0 0 1 Bank 1 1 0 Bank 2 1 1 Bank 3
  • 16.
  • 17. Bit / Byte Addressable • The 8051 provides 16 bytes if a bit-addressable area. • It occupies RAM byte addresses from 20H to 2FH, forming a total of 128(16 X 8) addressable bits. • An addressable bit may be specified by its bit address of 00H to 7FH, or 8 bits may form any byte address from 20H to 2FH. • For example, bit address 4EH refers bit 6 of the byte address 29H.
  • 18. General Purpose RAM • The RAM area above bit addressable area from 30H to 7FH is called general purpose RAM. It is addressable by byte. ROM Space in 8051 • 4 byte of internal ROM with address space from 0000H to 0FFFH. It is programmed by manufacturer when the chip is built. This part cannot be erased and altered after fabrication. This is used to store final version of the program. • It is accessed using program address register.
  • 19. The Program Status Word (PSW) register is an 8-bit register. It is also referred to as the flag register. Although the PSW register is 8 bits wide, only 6 bits of it are used by the 8051. The two unused bits are user-definable flags. Four of the flags are called conditional flags, meaning that they indicate some conditions that result after an instruction is executed. These four are CY (carry), AC (auxiliary carry), P (parity), and OV (overflow).
  • 20. The bits PSW.3 and PSW.4 are designated as RSO and RSI, respectively, and are used to change the bank registers. The PSW.5 and PSW.l bits are general-purpose status flag bits and can be used by the programmer for any purpose. In other words, they are user definable.