SlideShare una empresa de Scribd logo
1 de 23
MICROCONTROLLERS
           8051
WHAT IS A MICROCONTROLLER?
• All of the components needed for a controller
  were built right onto one chip.
• A one chip computer, or microcontroller was
  born.
• A microcontroller is a highly integrated chip
  which includes, on one chip, all or most of the
  parts needed for a controller.
• The microcontroller could be called a "one-
  chip solution".
MICROPROCESSOR vs MICRO CONTROLLER
MICROPROCESSOR Vs MICRO CONTROLLER

   General-purpose                  Microcontroller
   microprocessors
                                  The fixed amount of on-chip
 Must add RAM, ROM, I/O           ROM, RAM, and number of
  ports, and timers externally     I/O ports makes them ideal
  to make them functional          for applications in which
 Make the system bulkier          cost and space are critical.
  and much more expensive         In many applications, the
 Have the advantage of            space it takes, the power it
  versatility on the amount of     consumes, and the price per
  RAM, ROM, and I/O ports          unit are much more critical
                                   considerations than the
                                   computing power
Features :
• The Intel 8051 is used in embedded
  systems
  – 8-bit CPU
  – 4k bytes ROM for the program
  – 128 BYTES of RAM for variables
  – 32 I/O lines ( 4 PORTS WITH 8 EACH )
  – 2 timers
  – 1 Serial port
  – 6 interrupt sources
  – Low cost (10-15 cents per chip)
Block Diagram
External Interrupts


   Interrupt           4k          128 bytes           Timer 1
    Control           ROM            RAM               Timer 2




     CPU




     OSC               Bus
                                   4 I/O Ports          Serial
                      Control



                                 P0 P2 P1        P3   TXD   RXD
                                Addr/Data
8051 – PIN DIAGRAM
8051 – 40 PIN IC
• 8051 contains four I/O ports (P0 - P3)
                 • Each port can be used as input or output
                   (bi-direction)

                        Port 1          Port 2        Port 3
    Port 0
                       P1(P1.0~       P2(P2.0~       P3(P3.0~
P0(P0.0~P0.7)
                        P1.7)           P2.7)         P3.7)
                                      8-bit R/W -
 8-bit R/W -                                          General
                                        General
   General                                          Purpose I/O
                                      Purpose I/O
 Purpose I/O           Only 8-bit
                         R/W -
                        General       Or high       if not using
  Or acts as a          Purpose      byte of the     any of the
  multiplexed
                          I/O         address          internal
   low byte                            bus for      peripherals
  address and                                       (timers) or
  data bus for
                                      external
    external                          memory          external
   memory                              design       interrupts.
     design
PORT 3 – MULTIPLE FUNCTIONS
IMPORTANT PINS

•   PSEN (out): Program Store Enable, the read signal
    for external program memory (active low).
•   ALE (out): Address Latch Enable, to latch address
    outputs at Port0 and Port2
•   EA (in): External Access Enable, active low to access
    external program memory locations 0 to 4K
•   RXD,TXD: UART pins for serial I/O on Port 3
•   XTAL1 & XTAL2: Crystal inputs for internal
    oscillator.
SIGNALS - OPERATION
• Vcc(pin 40):
   – Vcc provides supply voltage to the chip.
   – The voltage source is +5V.
• GND(pin 20):ground
• XTAL1 and XTAL2(pins 19,18):
   – These 2 pins provide external clock.
   – Way 1:using a quartz crystal oscillator
   – Way 2:using a TTL oscillator
QUARTZ CRYSTAL OSCILLATOR
• Using a quartz crystal oscillator
• We can observe the frequency on the XTAL2
  pin.      C2
                         XTAL2
          30pF

           C1
                         XTAL1
          30pF

                         GND
XTAL Connection to an External Clock Source


• Using a TTL oscillator
• XTAL2 is unconnected.
             N             XTAL2
             C

           EXTERNAL
           OSCILLATOR
           SIGNAL          XTAL1



                           GND
RST - RESET
• RST(pin 9):reset
   – input pin and active high
       • The high pulse must be high at least 2 machine
         cycles.
   – power-on reset.
       • Upon applying a high pulse to RST, the
         microcontroller will reset and all values in
         registers will be lost.
       • Reset values of some 8051 registers
RESET Value of Some 8051 Registers:


 Register           Reset Value

 PC                 0000

 ACC                0000

 B                  0000

 PSW                0000

 SP                 0007

 DPTR               0000

 RAM are all zero
RESET CIRCUITARY
Vcc



                      31
                           EA/VPP
                           X1
      10 uF   30 pF

                           X2
                           RST
                      9
      8.2 K
EA’ & PSEN’
• EA’(pin 31):external access
   – There is no on-chip ROM in 8031 and 8032 .
   – The EA’ pin is connected to GND to indicate
     the code is stored externally.
   – PSEN’ & ALE are used for external ROM.
   – For 8051, EA’ pin is connected to Vcc.
   – active low.
• PSEN’(pin 29):program store enable
   – This is an output pin and is connected to the OE
     pin of the ROM.
ALE
ALE(pin 30):address
latch enable
   It is an output pin and is
   active high.
   8051 port 0 provides
   both address and data.
   The ALE pin is used for
   de-multiplexing the
   address and data by
   connecting to the G pin of
   the 74LS373 latch.
External code memory

       WR
       RD
     PSEN                      OE
      ALE            74LS373   CS
             G
     P0.0                      A0
                 D
     P0.7                      A7


                               D0
                               D7
EA
     P2.0                      A8
      P2.7                     A15

 8051                          ROM
External data memory
       WR                      WR
       RD                      RD
     PSEN
      ALE            74LS373   CS
             G
     P0.0                      A0
                 D
     P0.7                      A7


                               D0
                               D7
EA
     P2.0                      A8
      P2.7                     A15

 8051                          RAM
Title

• Lorem ipsum dolor sit amet, consectetuer
  adipiscing elit. Vivamus et magna. Fusce sed
  sem sed magna suscipit egestas.
• Lorem ipsum dolor sit amet, consectetuer
  adipiscing elit. Vivamus et magna. Fusce sed
  sem sed magna suscipit egestas.

Más contenido relacionado

La actualidad más candente

8051 assembly programming
8051 assembly programming8051 assembly programming
8051 assembly programmingsergeiseq
 
Programming 8051 Timers
Programming 8051 Timers Programming 8051 Timers
Programming 8051 Timers ViVek Patel
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingAnkur Mahajan
 
An application of 8085 register interfacing with LED
An application  of 8085 register interfacing with LEDAn application  of 8085 register interfacing with LED
An application of 8085 register interfacing with LEDTaha Malampatti
 
8051 (microcontroller)class1
8051 (microcontroller)class18051 (microcontroller)class1
8051 (microcontroller)class1Nitin Ahire
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O portsanishgoel
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction SetDr. Pankaj Zope
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSORAkhila Rahul
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051hello_priti
 
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )Tarun Khaneja
 

La actualidad más candente (20)

I o ports.ppt
I o ports.pptI o ports.ppt
I o ports.ppt
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
8051 assembly programming
8051 assembly programming8051 assembly programming
8051 assembly programming
 
Programming 8051 Timers
Programming 8051 Timers Programming 8051 Timers
Programming 8051 Timers
 
Advance Peripheral Bus
Advance Peripheral Bus Advance Peripheral Bus
Advance Peripheral Bus
 
8251 USART
8251 USART8251 USART
8251 USART
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
 
An application of 8085 register interfacing with LED
An application  of 8085 register interfacing with LEDAn application  of 8085 register interfacing with LED
An application of 8085 register interfacing with LED
 
8051 (microcontroller)class1
8051 (microcontroller)class18051 (microcontroller)class1
8051 (microcontroller)class1
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
8051 Inturrpt
8051 Inturrpt8051 Inturrpt
8051 Inturrpt
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSOR
 
8051 timers
8051 timers8051 timers
8051 timers
 
8279 PKDI
8279 PKDI8279 PKDI
8279 PKDI
 
3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
Counters
CountersCounters
Counters
 
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
 

Similar a 8051 microprocessor

Similar a 8051 microprocessor (20)

8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
8051microcontroller
8051microcontroller 8051microcontroller
8051microcontroller
 
Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"
 
8051
80518051
8051
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 
Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
 
At89s51
At89s51At89s51
At89s51
 
8051 full ppt
8051 full ppt8051 full ppt
8051 full ppt
 
8051 microcontrollers ch3
8051 microcontrollers ch38051 microcontrollers ch3
8051 microcontrollers ch3
 
At89 s8252
At89 s8252At89 s8252
At89 s8252
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
At89s51
At89s51At89s51
At89s51
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 
8051.pptx
8051.pptx8051.pptx
8051.pptx
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
dspAt89 s52
dspAt89 s52dspAt89 s52
dspAt89 s52
 
At 89s51
At 89s51At 89s51
At 89s51
 

Más de VJ Aiswaryadevi (15)

8051
80518051
8051
 
memory 8051
memory  8051memory  8051
memory 8051
 
logical 8051
logical 8051logical 8051
logical 8051
 
interrupts
interruptsinterrupts
interrupts
 
mup
mupmup
mup
 
branch ins 8051
branch ins 8051branch ins 8051
branch ins 8051
 
boolean 8051
boolean 8051boolean 8051
boolean 8051
 
arithmetic ins in 8051
arithmetic ins in 8051arithmetic ins in 8051
arithmetic ins in 8051
 
8051 archi
8051 archi8051 archi
8051 archi
 
8051 microprocessor
8051 microprocessor8051 microprocessor
8051 microprocessor
 
Groupware
GroupwareGroupware
Groupware
 
Db
DbDb
Db
 
302 B+Tree Ind Hash
302 B+Tree Ind Hash302 B+Tree Ind Hash
302 B+Tree Ind Hash
 
storage media
storage mediastorage media
storage media
 
B Trees
B TreesB Trees
B Trees
 

Último

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 

Último (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

8051 microprocessor

  • 2. WHAT IS A MICROCONTROLLER? • All of the components needed for a controller were built right onto one chip. • A one chip computer, or microcontroller was born. • A microcontroller is a highly integrated chip which includes, on one chip, all or most of the parts needed for a controller. • The microcontroller could be called a "one- chip solution".
  • 4. MICROPROCESSOR Vs MICRO CONTROLLER General-purpose Microcontroller microprocessors  The fixed amount of on-chip  Must add RAM, ROM, I/O ROM, RAM, and number of ports, and timers externally I/O ports makes them ideal to make them functional for applications in which  Make the system bulkier cost and space are critical. and much more expensive  In many applications, the  Have the advantage of space it takes, the power it versatility on the amount of consumes, and the price per RAM, ROM, and I/O ports unit are much more critical considerations than the computing power
  • 5. Features : • The Intel 8051 is used in embedded systems – 8-bit CPU – 4k bytes ROM for the program – 128 BYTES of RAM for variables – 32 I/O lines ( 4 PORTS WITH 8 EACH ) – 2 timers – 1 Serial port – 6 interrupt sources – Low cost (10-15 cents per chip)
  • 6. Block Diagram External Interrupts Interrupt 4k 128 bytes Timer 1 Control ROM RAM Timer 2 CPU OSC Bus 4 I/O Ports Serial Control P0 P2 P1 P3 TXD RXD Addr/Data
  • 7. 8051 – PIN DIAGRAM
  • 8. 8051 – 40 PIN IC
  • 9. • 8051 contains four I/O ports (P0 - P3) • Each port can be used as input or output (bi-direction) Port 1 Port 2 Port 3 Port 0 P1(P1.0~ P2(P2.0~ P3(P3.0~ P0(P0.0~P0.7) P1.7) P2.7) P3.7) 8-bit R/W - 8-bit R/W - General General General Purpose I/O Purpose I/O Purpose I/O Only 8-bit R/W - General Or high if not using Or acts as a Purpose byte of the any of the multiplexed I/O address internal low byte bus for peripherals address and (timers) or data bus for external external memory external memory design interrupts. design
  • 10. PORT 3 – MULTIPLE FUNCTIONS
  • 11. IMPORTANT PINS • PSEN (out): Program Store Enable, the read signal for external program memory (active low). • ALE (out): Address Latch Enable, to latch address outputs at Port0 and Port2 • EA (in): External Access Enable, active low to access external program memory locations 0 to 4K • RXD,TXD: UART pins for serial I/O on Port 3 • XTAL1 & XTAL2: Crystal inputs for internal oscillator.
  • 12. SIGNALS - OPERATION • Vcc(pin 40): – Vcc provides supply voltage to the chip. – The voltage source is +5V. • GND(pin 20):ground • XTAL1 and XTAL2(pins 19,18): – These 2 pins provide external clock. – Way 1:using a quartz crystal oscillator – Way 2:using a TTL oscillator
  • 13. QUARTZ CRYSTAL OSCILLATOR • Using a quartz crystal oscillator • We can observe the frequency on the XTAL2 pin. C2 XTAL2 30pF C1 XTAL1 30pF GND
  • 14. XTAL Connection to an External Clock Source • Using a TTL oscillator • XTAL2 is unconnected. N XTAL2 C EXTERNAL OSCILLATOR SIGNAL XTAL1 GND
  • 15. RST - RESET • RST(pin 9):reset – input pin and active high • The high pulse must be high at least 2 machine cycles. – power-on reset. • Upon applying a high pulse to RST, the microcontroller will reset and all values in registers will be lost. • Reset values of some 8051 registers
  • 16. RESET Value of Some 8051 Registers: Register Reset Value PC 0000 ACC 0000 B 0000 PSW 0000 SP 0007 DPTR 0000 RAM are all zero
  • 17. RESET CIRCUITARY Vcc 31 EA/VPP X1 10 uF 30 pF X2 RST 9 8.2 K
  • 18. EA’ & PSEN’ • EA’(pin 31):external access – There is no on-chip ROM in 8031 and 8032 . – The EA’ pin is connected to GND to indicate the code is stored externally. – PSEN’ & ALE are used for external ROM. – For 8051, EA’ pin is connected to Vcc. – active low. • PSEN’(pin 29):program store enable – This is an output pin and is connected to the OE pin of the ROM.
  • 19. ALE ALE(pin 30):address latch enable It is an output pin and is active high. 8051 port 0 provides both address and data. The ALE pin is used for de-multiplexing the address and data by connecting to the G pin of the 74LS373 latch.
  • 20. External code memory WR RD PSEN OE ALE 74LS373 CS G P0.0 A0 D P0.7 A7 D0 D7 EA P2.0 A8 P2.7 A15 8051 ROM
  • 21. External data memory WR WR RD RD PSEN ALE 74LS373 CS G P0.0 A0 D P0.7 A7 D0 D7 EA P2.0 A8 P2.7 A15 8051 RAM
  • 22.
  • 23. Title • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus et magna. Fusce sed sem sed magna suscipit egestas. • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus et magna. Fusce sed sem sed magna suscipit egestas.