MEMORY ORGANIZATION
OF
8051
SMM
NOTES
INTERNAL MEMORYINTERNAL MEMORY
A functioning computer must have memory for
program code bytes, commonly in ROM, and
RAM memory for variable data that can be
altered as the program runs
8051 has internal RAM (128 bytes) and ROM
(4Kbytes)
8051 uses the same address but in different
memories for code and data
Internal circuitry access the correct memory
based on the nature of the operation in progress
Can add memory externally if needed
8051 Internal RAM Organisation8051 Internal RAM Organisation
R7
R6
R5
R4
R3
R2
R1
R0
R7
R6
R5
R4
R3
R2
R1
R0
R7
R6
R5
R4
R3
R2
R1
R0
R7
R6
R5
R4
R3
R2
R1
R0
07
06
05
04
03
02
01
00
0F
0E
0D
0C
0B
0A
09
08
17
16
15
14
13
12
11
10
1F
1E
1D
1C
1B
1A
19
18
Bank0Bank1Bank2Bank3
27
26
25
24
23
22
21
20
2F
2E
2D
2C
2B
2A
29
28
7F 78
77 70
6F 68
67 60
5F 58
57 50
4F 48
47 40
3F 38
37 30
2F 28
27 20
1F 18
17 10
0F 08
07 00 30
7F
Working Registers Bit Addressable General Purpose
Program Status Word (PSW)Program Status Word (PSW)
Bank Select Bits, RS1, & RS0 to select 1 of 4 register bankBank Select Bits, RS1, & RS0 to select 1 of 4 register bank
Internal ROMInternal ROM
Internal ROM occupies the code address space
from 0000H to 0FFFH (Size = 4K byte)
Program addresses higher than 0FFFH will
automatically fetch code bytes from external
program memory
Code bytes can also be fetched exclusively from
an external memory by connecting the external
access pin (EA) to ground
Interfacing with External Program MemoryInterfacing with External Program Memory
Interfacing with External Data MemoryInterfacing with External Data Memory
 Read referenceRead reference
The 8051 Microcontroller and
Embedded Systems - Using Assembly
and C, Mazidi
• The 8051 Microcontroller – Hardware,
Software and Interfacing, James W.
Stewart
• Microprocessor and Micro controllers –
Prof. C.R.Sharma, Premier publishing
house

Memory organization of 8051

  • 1.
  • 2.
    INTERNAL MEMORYINTERNAL MEMORY Afunctioning computer must have memory for program code bytes, commonly in ROM, and RAM memory for variable data that can be altered as the program runs 8051 has internal RAM (128 bytes) and ROM (4Kbytes) 8051 uses the same address but in different memories for code and data Internal circuitry access the correct memory based on the nature of the operation in progress Can add memory externally if needed
  • 3.
    8051 Internal RAMOrganisation8051 Internal RAM Organisation R7 R6 R5 R4 R3 R2 R1 R0 R7 R6 R5 R4 R3 R2 R1 R0 R7 R6 R5 R4 R3 R2 R1 R0 R7 R6 R5 R4 R3 R2 R1 R0 07 06 05 04 03 02 01 00 0F 0E 0D 0C 0B 0A 09 08 17 16 15 14 13 12 11 10 1F 1E 1D 1C 1B 1A 19 18 Bank0Bank1Bank2Bank3 27 26 25 24 23 22 21 20 2F 2E 2D 2C 2B 2A 29 28 7F 78 77 70 6F 68 67 60 5F 58 57 50 4F 48 47 40 3F 38 37 30 2F 28 27 20 1F 18 17 10 0F 08 07 00 30 7F Working Registers Bit Addressable General Purpose
  • 4.
    Program Status Word(PSW)Program Status Word (PSW) Bank Select Bits, RS1, & RS0 to select 1 of 4 register bankBank Select Bits, RS1, & RS0 to select 1 of 4 register bank
  • 5.
    Internal ROMInternal ROM InternalROM occupies the code address space from 0000H to 0FFFH (Size = 4K byte) Program addresses higher than 0FFFH will automatically fetch code bytes from external program memory Code bytes can also be fetched exclusively from an external memory by connecting the external access pin (EA) to ground
  • 6.
    Interfacing with ExternalProgram MemoryInterfacing with External Program Memory
  • 7.
    Interfacing with ExternalData MemoryInterfacing with External Data Memory
  • 8.
     Read referenceReadreference The 8051 Microcontroller and Embedded Systems - Using Assembly and C, Mazidi • The 8051 Microcontroller – Hardware, Software and Interfacing, James W. Stewart • Microprocessor and Micro controllers – Prof. C.R.Sharma, Premier publishing house