Internal ROM in 8051.
The 8051 is organized so that data memory and program code memory can be in two entirely different physical memory entities.
Each has the same address ranges. The structure of the internal RAM has been discussed previously. A corresponding block of internal program code contained in an internal ROM occupies code address space 0000h to FFFFh.
The program addresses higher than 0FFFh, which exceed the internal ROM capacity, will cause the 8051 to automatically fetch code bytes from external program memory. Code bytes can also be fetched exclusively from an external memory, addresses 0000h to FFFFh, by connecting the external access pin to ground.
The PC doesn't care where the code is the circuit designer decides whether the code is found totally in internal ROM, totally in external ROM, or in a combination of internal and external ROM.
NAME FUNCTION INTERNAL RAM ADDRESS (HEX)
A Accumulator 0E0
B Arithematic 0F0
DPH Addressing External memory 83
DPL Addressing External memory 82
IE Interrupt enable control 0A8
IP Interrupt enable control 0B8
P0 Input/output latch port 80
P1 Input/output latch port 90
P2 Input/output latch port A0
P3 Input/output latch port 0B0
PCON Power Control 87
PSW Program Status Word 0D0
SCON Serial Port Control 98
SBUF Serial port data buffer 99
SP Stack Pointer 81
TMOD Timer/counter mode control 89
TCON Timer/counter control 88
TL0 Timer 0 low byte 8A
TH0 Timer 0 HIGH byte 8C
TL1 Timer 1 low byte 8B
TH1 Timer 0 high byte 8D
These are the hexadecimal commands to the respective functions.
Each has the same address ranges. The structure of the internal RAM has been discussed previously. A corresponding block of internal program code contained in an internal ROM occupies code address space 0000h to FFFFh.
The program addresses higher than 0FFFh, which exceed the internal ROM capacity, will cause the 8051 to automatically fetch code bytes from external program memory. Code bytes can also be fetched exclusively from an external memory, addresses 0000h to FFFFh, by connecting the external access pin to ground.
The PC doesn't care where the code is the circuit designer decides whether the code is found totally in internal ROM, totally in external ROM, or in a combination of internal and external ROM.
NAME FUNCTION INTERNAL RAM ADDRESS (HEX)
A Accumulator 0E0
B Arithematic 0F0
DPH Addressing External memory 83
DPL Addressing External memory 82
IE Interrupt enable control 0A8
IP Interrupt enable control 0B8
P0 Input/output latch port 80
P1 Input/output latch port 90
P2 Input/output latch port A0
P3 Input/output latch port 0B0
PCON Power Control 87
PSW Program Status Word 0D0
SCON Serial Port Control 98
SBUF Serial port data buffer 99
SP Stack Pointer 81
TMOD Timer/counter mode control 89
TCON Timer/counter control 88
TL0 Timer 0 low byte 8A
TH0 Timer 0 HIGH byte 8C
TL1 Timer 1 low byte 8B
TH1 Timer 0 high byte 8D
These are the hexadecimal commands to the respective functions.
Comments
Post a Comment