SlideShare una empresa de Scribd logo
1 de 33
Overview

Introduction
Block Diagram and Pin
Description of the 8051
Registers
Memory mapping in 8051
Stack in the 8051
I/O Port Programming
Timers
Interrupts &
Applications
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)
Why do we need to learn
          Microcontrollers ?
   Its not an exaggeration if I say that ,today
    there is no electronic gadget on the earth
    which is designed without a
    Microcontroller. Ex: communication
    devices, digital entertainment, portable
    devices etc…
     Not believable ??? See the next
    slide
   Personal information products: Cell phone,
    pager, watch, pocket recorder, calculator
   Laptop components: mouse, keyboard, modem,
    fax card, sound card, battery charger
   Home appliances: door lock, alarm clock,
    thermostat, air conditioner, TV remote, VCR,
    small refrigerator, exercise equipment,
    washer/dryer, microwave oven
   Industrial equipment: Temperature/pressure
    controllers, Counters, timers, RPM Controllers
   Toys: video games, cars, dolls, etc.
So, A good designer should always
know what type of controller he/she
is using ,their architecture, advantages
, disadvantages , ways to reduce
production costs and product
reliability etc….
         O.K ????
Microcontrollers from different manufacturers
   •Atmel                         •Motorola
   •ARM                                •8-bit
   •Intel                                  •68HC05
        •8-bit                             •68HC08
            •8XC42                         •68HC11
            •MCS48                     •16-bit
            •MCS51                         •68HC12
            •8xC251                        •68HC16
        •16-bit                        •32-bit
            •MCS96                         •683xx
            •MXS296               •Texas Instruments
   •National Semiconductor             •TMS370
        •COP8                          •MSP430
   •Microchip                     •Zilog
        •12-bit instruction PIC        •Z8
        •14-bit instruction PIC        •Z86E02
            •PIC16F84
        •16-bit instruction PIC
   •NEC
Then What is a Microcontroller ?
 A smaller computer
 On-chip RAM, ROM, I/O ports...

 Example : Motorola’s 6811, Intel’s 8051,
  Zilog’s Z8 and PIC 16X
        CPU    RAM ROM
                              A single chip
                     Serial
        I/O    Timer COM      Microcontroller
        Port
                     Port
EVOLUTION
                  Flashback !!!!
In the year 1976, Motorola created a Microprocessor
 chip called 6801 which replaced its brother 6800 with
 certain add-on chips to make a computer. This paved
 the way for the new revolution in the history of chip
 design and gave birth to a new entity called
             MICROCONTROLLER.
The INTEL bagged the credit of producing the first
 Microcontroller 8048 with a CPU and 1K bytes of
 EPROM, 64 Bytes of RAM an 8-Bit Timer and 27
 I/O pins in 1976.
Evolution            contd…
   Then followed the most popular controller
    8051 in the year 1980 with 4K bytes of
    ROM,128 Bytes of RAM , a serial port, two 16-
    bit Timers , and 32 I/O pins.
   The 8051 family has many additions and
    improvements over the years and remains a
    most soughtafter tool for todays circuit
    designers.
   The same INTEL introduced a 16 bit
    controller 8096 in the year 1982
   Later INTEL introduced 80c196 series of 16-
    bit microcontrollers for mainly industrial
    applications

   Microchip, another company has introduced a
    microcontroller PIC 16C64 an 8-bit in the year
    1985.
   32-bit microcontrollers have been developed by IBM
    and Motorola-MPC 505 is a 32-bit RISC controller of
    Motorola
   The 403 GA is a 32 -bit RISC embedded controller of
    IBM
ARM Controllers
   In recent times ARM company (Advanced
    Risc machines) has developed and introduced
    32 bit controllers which are highend
    application devices,especially communication
    devices like mobiles , ipods etc..(Refer
    www.arm.com)
Types of Microcontrollers
RESET CIRCUITARY
 Vcc



                       31

                            X1
       10 uF   30 pF

                            X2
                            RST
                       9
       8.2 K
   8051 contains four I/O ports (P0 - P3)
   Each port can be used as input or output
    (bi-direction)
Important Features of 8051
   4K bytes ROM
   128 bytes RAM
   Four 8-bit I/O ports
   Two 16-bit timers
   Serial interface
   64K external code memory space
   64K data memory space
MCS-51 “Family” of
             Microcontollers
Feature       8031   8051    8052      8751
ROM           NO     4kB    8kB     4kB UV Eprom

RAM (Bytes)   128     128    256          128

TIMERS         2      2      3            2

I/O PINS      32     32      32          32

SERIAL PORTS 1        1       1           1

INTERRUPT     6       6       8           6
 SOURCES
On-Chip Facilities Overview
          (Original 8051)

   Parallel Input/Output Ports
   System Clock Generator
   Serial Port
   Timers
   Interrupt Control
Microcontroller Architectures
                         Memory
                    0
      Address Bus
                         Program
CPU    Data Bus          + Data    Von Neumann
                    2n
                                   Architecture
                         Memory
                     0
      Address Bus
                         Program
CPU    Fetch Bus                     Harvard
      Address Bus 0
                                     Architecture
       Data Bus          Data
“Original” 8051
                        Microcontroller
Oscillator              4096 Bytes       128 Bytes          Two 16 Bit
and timing         Program Memory      Data Memory         Timer/Event
                         (ROM)            (RAM)              Counters


8051                                           Internal data bus
CPU


             64 K Byte Bus           Programmable          Programmable
               Expansion                  I/O              Serial Port Full
                Control                                    Duplex UART
                                                         Synchronous Shifter
  subsystem interrupts

  External interrupts    Control      Parallel ports                    Serial Output
                                      Address Data Bus   Serial Input
                                      I/O pins
Pin Description of the 8051
   The 8051 is a 40 pin
    device, but out of
    these 40 pins, 32 are
    used for I/O.


   24 of these are dual
    purpose, i.e. they can
    operate as I/O or a
    control line or as part
    of address or data
    bus.
8051 CPU Registers

           A (8-bit Accumulator)
           B (8-bit register for Mul &Div)
           PSW (8-bit Program Status Word)
           SP (8-bit Stack Pointer)
           PC (16-bit Program Counter)
           DPTR (16-bit Data Pointer)
1F
     Registers
                   Four Register Banks
                   Each bank has R0-R7
          Bank 3

18
17


          Bank 2

10
0F


          Bank 1

08
07   R7
06   R6
05   R5
04
03
     R4
     R3
          Bank 0
02   R2
01   R1
00   R0
Bit Addressable Memory
2F   7F                                 78   20h – 2Fh (16 locations X 8-bits =
2E                                           128 bits)
2D
2C                                              Bit addressing:
2B                                                        mov C, 1Ah
2A                                                        or
29                                                        mov C, 23h.2
28
27
26
25
24
23                            1A
22                                      10
21   0F                                 08
20   07   06   05   04   03   02   01   00
Special Function Registers
DATA registers

CONTROL registers

•Timers

•Serial ports

•Interrupt system

•Analog to Digital converter   Addresses 80h – FFh
•Digital to Analog converter
 etc..                         Direct Addressing is used to
                               access SFRs
Contd…
List of Registers
 (*Denotes the SFRs)
PSW REGISTER
Memory mapping in 8051


        ROM memory map in 8051 family
               4k                  8k                       32k
0000H               0000H               0000H



0FFFH                                           DS5000-32


                    1FFFH
        8051
                            8752        7FFFH




          from Atmel                       from Dallas
          Corporation                      Semiconductor
RAM memory space allocation in the 8051

       7FH


                                 Scratch pad RAM

       30H

       2FH

                               Bit-Addressable RAM
       20H
       1FH
                               Register Bank 3
       18H
       17H
       10H                     Register Bank 2
       0FH
       08H
                        Stack) Register Bank 1)
       07H
       00H                     Register Bank 0
PORTS OF 8051
   8051 has 4 Ports. Port 0, Port1, Port2 , Port3
   Port 0 is a dual purpose port, it is located from
    pin 32 to pin 39 (8 pins). To use this port as both
    input/output ports each pin must be connected
    externally to a 10 k ohm pull-up resistor.This is
    because Port 0 is an open drain.
         Simple ex: MOV A, #22
            BACK    MOV P0 ,A
                    ACALL DELAY
                    CPL A
                    SJMP BACK
Port 0 with Pull-Up Resistors
Ports….
   Port 1 is a dedicated I/O port from pin 1 to
    pin 8.Upon reset it is configured as output.
    It is generally used for interfacing to
    external device thus if you need to connect
    to switches or LEDs, you could make use of
    these 8 pins, but it doesn’t need any pull-up
    resistors as it is having internally
   Like port 0, port 2 is a dual-purpose port.(Pins 21
    through 28) It can be used for general I/O or as
    the high byte of the address bus for designs with
    external code memory. Like P1 ,Port2 also doesn’t
    require any pull-up resistors
Ports contd…

   Port 3 is also dual purpose but designers
    generally avoid using this port unnecessarily for
    I/O because the pins have alternate functions
    which are related to special features of the 8051.
     Indiscriminate use of these pins may interfere
    with the normal operation of the 8051.
   However, for a programmer, it is the same to
    program P0, P1, P2 and P3.
   All the ports upon RESET are configured as
    output. To use any of the ports as an input
    port,it must be set(Programmed)

Más contenido relacionado

La actualidad más candente

8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
SABBIR AHMED
 
8449972 embedded-systems-and-model-of-metro-train
8449972 embedded-systems-and-model-of-metro-train8449972 embedded-systems-and-model-of-metro-train
8449972 embedded-systems-and-model-of-metro-train
Jitendra Saroj
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
918007165995
 
8051microcontroller
8051microcontroller 8051microcontroller
8051microcontroller
manish080
 
8051 microcontroller features
8051 microcontroller features8051 microcontroller features
8051 microcontroller features
Tech_MX
 

La actualidad más candente (20)

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 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
8449972 embedded-systems-and-model-of-metro-train
8449972 embedded-systems-and-model-of-metro-train8449972 embedded-systems-and-model-of-metro-train
8449972 embedded-systems-and-model-of-metro-train
 
Microcontroller ppt
Microcontroller pptMicrocontroller ppt
Microcontroller ppt
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Lecture SOHIL LUHAR
Lecture SOHIL LUHARLecture SOHIL LUHAR
Lecture SOHIL LUHAR
 
8051microcontroller
8051microcontroller 8051microcontroller
8051microcontroller
 
8051 presentation
8051 presentation8051 presentation
8051 presentation
 
1 8051 microcontroller intr
1 8051 microcontroller intr1 8051 microcontroller intr
1 8051 microcontroller intr
 
MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration MICROCONTROLLER 8051- Architecture & Pin Configuration
MICROCONTROLLER 8051- Architecture & Pin Configuration
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
8051 microcontroller features
8051 microcontroller features8051 microcontroller features
8051 microcontroller features
 
MICROCONTROLLER 8051
MICROCONTROLLER 8051MICROCONTROLLER 8051
MICROCONTROLLER 8051
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
Unit iv introduction to 8051 microcontroller ppts
Unit iv introduction to 8051 microcontroller pptsUnit iv introduction to 8051 microcontroller ppts
Unit iv introduction to 8051 microcontroller ppts
 

Destacado

τεύχος 3
τεύχος 3τεύχος 3
τεύχος 3
pahomios
 
Presentation1
Presentation1Presentation1
Presentation1
deadeput
 
Miche spring 2014 to order www.reneethompson.miche.com
Miche spring 2014 to order www.reneethompson.miche.comMiche spring 2014 to order www.reneethompson.miche.com
Miche spring 2014 to order www.reneethompson.miche.com
Renee Thompson
 
Introduction 1
Introduction 1Introduction 1
Introduction 1
rajijeba
 
mua pendientes y pulseras
mua pendientes y pulserasmua pendientes y pulseras
mua pendientes y pulseras
muaunbeso
 
παρουσιαση προγραμματων
παρουσιαση προγραμματωνπαρουσιαση προγραμματων
παρουσιαση προγραμματων
pahomios
 
New ss training slides 11 sep2012
New ss training slides 11 sep2012New ss training slides 11 sep2012
New ss training slides 11 sep2012
azlinwaja
 
Who runs the world
Who runs the worldWho runs the world
Who runs the world
azmi3456
 
παρουσίαση1
παρουσίαση1παρουσίαση1
παρουσίαση1
pahomios
 

Destacado (20)

τεύχος 3
τεύχος 3τεύχος 3
τεύχος 3
 
Presentation1
Presentation1Presentation1
Presentation1
 
Miche spring 2014 to order www.reneethompson.miche.com
Miche spring 2014 to order www.reneethompson.miche.comMiche spring 2014 to order www.reneethompson.miche.com
Miche spring 2014 to order www.reneethompson.miche.com
 
Tik
TikTik
Tik
 
Celine dion sans attendre
Celine dion   sans attendreCeline dion   sans attendre
Celine dion sans attendre
 
Introduction 1
Introduction 1Introduction 1
Introduction 1
 
A078
A078A078
A078
 
Impeccable training
Impeccable trainingImpeccable training
Impeccable training
 
Anisa wahyuni
Anisa wahyuniAnisa wahyuni
Anisa wahyuni
 
mua pendientes y pulseras
mua pendientes y pulserasmua pendientes y pulseras
mua pendientes y pulseras
 
Anisa wahyuni
Anisa wahyuniAnisa wahyuni
Anisa wahyuni
 
Biodata
BiodataBiodata
Biodata
 
παρουσιαση προγραμματων
παρουσιαση προγραμματωνπαρουσιαση προγραμματων
παρουσιαση προγραμματων
 
Anisa wahyuni
Anisa wahyuniAnisa wahyuni
Anisa wahyuni
 
Psychological features of teenage age
Psychological features of teenage agePsychological features of teenage age
Psychological features of teenage age
 
Turismo nórdico escandinavo
Turismo nórdico escandinavoTurismo nórdico escandinavo
Turismo nórdico escandinavo
 
New ss training slides 11 sep2012
New ss training slides 11 sep2012New ss training slides 11 sep2012
New ss training slides 11 sep2012
 
Spring 2013 catalog
Spring 2013 catalogSpring 2013 catalog
Spring 2013 catalog
 
Who runs the world
Who runs the worldWho runs the world
Who runs the world
 
παρουσίαση1
παρουσίαση1παρουσίαση1
παρουσίαση1
 

Similar a Mcu51

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
eceprinter6
 
btech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxbtech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptx
SKWriters
 

Similar a Mcu51 (20)

microcontroller-8051-ppt
 microcontroller-8051-ppt microcontroller-8051-ppt
microcontroller-8051-ppt
 
microcontroller-8051-ppt(1)
microcontroller-8051-ppt(1)microcontroller-8051-ppt(1)
microcontroller-8051-ppt(1)
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
8051.pptx
8051.pptx8051.pptx
8051.pptx
 
Microprocessors and Microcontrollers.ppt
Microprocessors and Microcontrollers.pptMicroprocessors and Microcontrollers.ppt
Microprocessors and Microcontrollers.ppt
 
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
 
89s52 2
89s52 289s52 2
89s52 2
 
8 bit microcontroller
8 bit microcontroller8 bit microcontroller
8 bit microcontroller
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
8051
80518051
8051
 
AVR Fundamentals
AVR FundamentalsAVR Fundamentals
AVR Fundamentals
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 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
 
8051.pptx
8051.pptx8051.pptx
8051.pptx
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduino
 
btech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxbtech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptx
 
unit-2.pptx
unit-2.pptxunit-2.pptx
unit-2.pptx
 

Mcu51

  • 1. Overview Introduction Block Diagram and Pin Description of the 8051 Registers Memory mapping in 8051 Stack in the 8051 I/O Port Programming Timers Interrupts & Applications
  • 2. 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)
  • 3. Why do we need to learn Microcontrollers ?  Its not an exaggeration if I say that ,today there is no electronic gadget on the earth which is designed without a Microcontroller. Ex: communication devices, digital entertainment, portable devices etc… Not believable ??? See the next slide
  • 4. Personal information products: Cell phone, pager, watch, pocket recorder, calculator  Laptop components: mouse, keyboard, modem, fax card, sound card, battery charger  Home appliances: door lock, alarm clock, thermostat, air conditioner, TV remote, VCR, small refrigerator, exercise equipment, washer/dryer, microwave oven  Industrial equipment: Temperature/pressure controllers, Counters, timers, RPM Controllers  Toys: video games, cars, dolls, etc.
  • 5. So, A good designer should always know what type of controller he/she is using ,their architecture, advantages , disadvantages , ways to reduce production costs and product reliability etc…. O.K ????
  • 6. Microcontrollers from different manufacturers •Atmel •Motorola •ARM •8-bit •Intel •68HC05 •8-bit •68HC08 •8XC42 •68HC11 •MCS48 •16-bit •MCS51 •68HC12 •8xC251 •68HC16 •16-bit •32-bit •MCS96 •683xx •MXS296 •Texas Instruments •National Semiconductor •TMS370 •COP8 •MSP430 •Microchip •Zilog •12-bit instruction PIC •Z8 •14-bit instruction PIC •Z86E02 •PIC16F84 •16-bit instruction PIC •NEC
  • 7. Then What is a Microcontroller ?  A smaller computer  On-chip RAM, ROM, I/O ports...  Example : Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X CPU RAM ROM A single chip Serial I/O Timer COM Microcontroller Port Port
  • 8. EVOLUTION Flashback !!!! In the year 1976, Motorola created a Microprocessor chip called 6801 which replaced its brother 6800 with certain add-on chips to make a computer. This paved the way for the new revolution in the history of chip design and gave birth to a new entity called MICROCONTROLLER. The INTEL bagged the credit of producing the first Microcontroller 8048 with a CPU and 1K bytes of EPROM, 64 Bytes of RAM an 8-Bit Timer and 27 I/O pins in 1976.
  • 9. Evolution contd…  Then followed the most popular controller 8051 in the year 1980 with 4K bytes of ROM,128 Bytes of RAM , a serial port, two 16- bit Timers , and 32 I/O pins.  The 8051 family has many additions and improvements over the years and remains a most soughtafter tool for todays circuit designers.  The same INTEL introduced a 16 bit controller 8096 in the year 1982
  • 10. Later INTEL introduced 80c196 series of 16- bit microcontrollers for mainly industrial applications  Microchip, another company has introduced a microcontroller PIC 16C64 an 8-bit in the year 1985.  32-bit microcontrollers have been developed by IBM and Motorola-MPC 505 is a 32-bit RISC controller of Motorola  The 403 GA is a 32 -bit RISC embedded controller of IBM
  • 11. ARM Controllers  In recent times ARM company (Advanced Risc machines) has developed and introduced 32 bit controllers which are highend application devices,especially communication devices like mobiles , ipods etc..(Refer www.arm.com)
  • 13. RESET CIRCUITARY Vcc 31 X1 10 uF 30 pF X2 RST 9 8.2 K
  • 14. 8051 contains four I/O ports (P0 - P3)  Each port can be used as input or output (bi-direction)
  • 15. Important Features of 8051  4K bytes ROM  128 bytes RAM  Four 8-bit I/O ports  Two 16-bit timers  Serial interface  64K external code memory space  64K data memory space
  • 16. MCS-51 “Family” of Microcontollers Feature 8031 8051 8052 8751 ROM NO 4kB 8kB 4kB UV Eprom RAM (Bytes) 128 128 256 128 TIMERS 2 2 3 2 I/O PINS 32 32 32 32 SERIAL PORTS 1 1 1 1 INTERRUPT 6 6 8 6 SOURCES
  • 17. On-Chip Facilities Overview (Original 8051)  Parallel Input/Output Ports  System Clock Generator  Serial Port  Timers  Interrupt Control
  • 18. Microcontroller Architectures Memory 0 Address Bus Program CPU Data Bus + Data Von Neumann 2n Architecture Memory 0 Address Bus Program CPU Fetch Bus Harvard Address Bus 0 Architecture Data Bus Data
  • 19. “Original” 8051 Microcontroller Oscillator 4096 Bytes 128 Bytes Two 16 Bit and timing Program Memory Data Memory Timer/Event (ROM) (RAM) Counters 8051 Internal data bus CPU 64 K Byte Bus Programmable Programmable Expansion I/O Serial Port Full Control Duplex UART Synchronous Shifter subsystem interrupts External interrupts Control Parallel ports Serial Output Address Data Bus Serial Input I/O pins
  • 20. Pin Description of the 8051  The 8051 is a 40 pin device, but out of these 40 pins, 32 are used for I/O.  24 of these are dual purpose, i.e. they can operate as I/O or a control line or as part of address or data bus.
  • 21. 8051 CPU Registers A (8-bit Accumulator) B (8-bit register for Mul &Div) PSW (8-bit Program Status Word) SP (8-bit Stack Pointer) PC (16-bit Program Counter) DPTR (16-bit Data Pointer)
  • 22. 1F Registers Four Register Banks Each bank has R0-R7 Bank 3 18 17 Bank 2 10 0F Bank 1 08 07 R7 06 R6 05 R5 04 03 R4 R3 Bank 0 02 R2 01 R1 00 R0
  • 23. Bit Addressable Memory 2F 7F 78 20h – 2Fh (16 locations X 8-bits = 2E 128 bits) 2D 2C Bit addressing: 2B mov C, 1Ah 2A or 29 mov C, 23h.2 28 27 26 25 24 23 1A 22 10 21 0F 08 20 07 06 05 04 03 02 01 00
  • 24. Special Function Registers DATA registers CONTROL registers •Timers •Serial ports •Interrupt system •Analog to Digital converter Addresses 80h – FFh •Digital to Analog converter etc.. Direct Addressing is used to access SFRs
  • 26. List of Registers (*Denotes the SFRs)
  • 28. Memory mapping in 8051 ROM memory map in 8051 family 4k 8k 32k 0000H 0000H 0000H 0FFFH DS5000-32 1FFFH 8051 8752 7FFFH from Atmel from Dallas Corporation Semiconductor
  • 29. RAM memory space allocation in the 8051 7FH Scratch pad RAM 30H 2FH Bit-Addressable RAM 20H 1FH Register Bank 3 18H 17H 10H Register Bank 2 0FH 08H Stack) Register Bank 1) 07H 00H Register Bank 0
  • 30. PORTS OF 8051  8051 has 4 Ports. Port 0, Port1, Port2 , Port3  Port 0 is a dual purpose port, it is located from pin 32 to pin 39 (8 pins). To use this port as both input/output ports each pin must be connected externally to a 10 k ohm pull-up resistor.This is because Port 0 is an open drain. Simple ex: MOV A, #22 BACK MOV P0 ,A ACALL DELAY CPL A SJMP BACK
  • 31. Port 0 with Pull-Up Resistors
  • 32. Ports….  Port 1 is a dedicated I/O port from pin 1 to pin 8.Upon reset it is configured as output. It is generally used for interfacing to external device thus if you need to connect to switches or LEDs, you could make use of these 8 pins, but it doesn’t need any pull-up resistors as it is having internally  Like port 0, port 2 is a dual-purpose port.(Pins 21 through 28) It can be used for general I/O or as the high byte of the address bus for designs with external code memory. Like P1 ,Port2 also doesn’t require any pull-up resistors
  • 33. Ports contd…  Port 3 is also dual purpose but designers generally avoid using this port unnecessarily for I/O because the pins have alternate functions which are related to special features of the 8051. Indiscriminate use of these pins may interfere with the normal operation of the 8051.  However, for a programmer, it is the same to program P0, P1, P2 and P3.  All the ports upon RESET are configured as output. To use any of the ports as an input port,it must be set(Programmed)

Notas del editor

  1. Program memory – RAM or ROM? Data memory – RAM or ROM?