SlideShare a Scribd company logo
1 of 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.

More Related Content

What's hot

8051 architecture
8051 architecture8051 architecture
8051 architecturesb108ec
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085Sumit Swain
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecturesatish1jisatishji
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18raosandy11
 
8251 communication interface
8251 communication interface8251 communication interface
8251 communication interfaceLingalaSowjanya
 
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
 
8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051daniemol
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257MdFazleRabbi18
 
8051 addressing modes & instruction set
8051 addressing modes & instruction set8051 addressing modes & instruction set
8051 addressing modes & instruction setManoj Babar
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration AKHIL MADANKAR
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Dhaval Kaneria
 
SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)SUNODH GARLAPATI
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessorsobhadevi
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architectureDr.YNM
 

What's hot (20)

8051 architecture
8051 architecture8051 architecture
8051 architecture
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
8 bit microcontroller
8 bit microcontroller8 bit microcontroller
8 bit microcontroller
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecture
 
interrupts of 8051.pdf
interrupts of 8051.pdfinterrupts of 8051.pdf
interrupts of 8051.pdf
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
8051 i/o port circuit
8051 i/o port circuit8051 i/o port circuit
8051 i/o port circuit
 
8051 archi
8051 archi8051 archi
8051 archi
 
8251 communication interface
8251 communication interface8251 communication interface
8251 communication interface
 
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 )
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
 
8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
 
8051 addressing modes & instruction set
8051 addressing modes & instruction set8051 addressing modes & instruction set
8051 addressing modes & instruction set
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 

Similar to 8051 microprocessor

Similar to 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
 

More from VJ Aiswaryadevi (14)

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 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
 

Recently uploaded

General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
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
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
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
 

Recently uploaded (20)

General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
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
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
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
 

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.