C8051F000/1/2/5/6/7
C8051F010/1/2/5/6/7
Figure 10.2. Memory Map
PROGRAM MEMORY
0x807F
0x8000
0x7FFF
0x7E00
0x7DFF
FLASH
(In-System
Programmable in 512
Byte Sectors)
0x0000
0xFFFF
0xF800
128 Byte ISP FLASH
RESERVED
0xFF
0x80
0x7F
DATA MEMORY
INTERNAL DATA ADDRESS SPACE
Upper 128 RAM
(Indirect Addressing
Only)
(Direct and Indirect
Addressing)
0x30
0x2F
0x20
0x1F
0x00
Bit Addressable
General Purpose
Registers
Special Function
Register's
(Direct Addressing Only)
Lower 128 RAM
(Direct and Indirect
Addressing)
EXTERNAL DATA ADDRESS SPACE
(same 2048 byte RAM block )
0x17FF
(same 2048 byte RAM block )
0x1000
0x0FFF
0x0800
0x07FF
0x0000
(same 2048 byte RAM block )
The same 2048 byte RAM
block can be addressed on
2k boundaries throughout
the 64k External Data
Memory space.
RAM - 2048 Bytes
(accessable using MOVX
command)
10.2.5. Stack
A programmer’s stack can be located anywhere in the 256-byte data memory. The stack area is designated using
the Stack Pointer (SP, 0x81) SFR. The SP will point to the last location used. The next value pushed on the stack is
placed at SP+1 and then SP is incremented. A reset initializes the stack pointer to location 0x07. Therefore, the
first value pushed on the stack is placed at location 0x08, which is also the first register (R0) of register bank 1.
Thus, if more than one register bank is to be used, the SP should be initialized to a location in the data memory not
being used for data storage. The stack depth can extend up to 256 bytes.
The MCUs also have built-in hardware for a stack record. The stack record is a 32-bit shift register, where each
Push or increment SP pushes one record bit onto the register, and each Call or interrupt pushes two record bits onto
the register. (A Pop or decrement SP pops one record bit, and a Return pops two record bits, also.) The stack
record circuitry can also detect an overflow or underflow on the Stack, and can notify the debug software even with
the MCU running full-speed debug.
69
Rev. 1.7