
W78E354
- 12 -
1. The first of these is the internal program space (internal Flash memory) with 16K byte size
(0000H
3FFFH). The program space can be accessed by both opcode fetches and the
"MOVC"
instructions.
2. The second is referred to as the data memory space and has a size of 256 bytes (0000H
00FFH).
The data memory is integrated within the chip rather than being outside as in the case of the
standard 8031. The "inside" data memory space is accessed by the "MOVX @Ri" instruction.
3. The third address space has 256 locations while it is used by 384 bytes (256 bytes of RAM and 128
bytes of SFRs).
The lower 128 locations of this address space (00H
7FH) are for the lower 128 bytes of scratchpad
RAM. Any of these 128 bytes may be used by a programmer but some of them have special uses.
The lowest 32 bytes are organized to four 8-byte register banks. The bank select bits (RS0 and RS1
in the PSW register) selects one of these four banks which is to be used currently as an operand in
the instruction set. Registers 0 to 7 in the bank are referenced by the register direct opcodes.
Registers 0 and 1 may also contain an address that is referenced by the register indirect opcodes.
The higher 128 locations of this address space (80H
FFH) are shared by the higher 128 bytes of
scratchpad RAM and the Special Function Registers (SFRs). The SFRs are accessed only by "direct"
addressing while the higher 128 bytes of scrachpad RAM are accessed only by "indirect" addressing.
The higher 128 bytes of scratchpad data RAM are also available for stack space.
Address spaces 20H to 2FH are bit-addressable and can be used by the Boolean Variable
Manipulation instructions. For example, bit 0 of address 20H has a Boolean address 00H, and bit 7 of
address 2FH has a Boolean address 7FH. The higher Boolean addresses (80H
FFH) are mapped
into the SFR address space. To determine a Boolean address in some bit-addressable SFR, the
higher 5 bits of the SFR's address can be combined with the 3 lower bits that specify the desired bit in
the SFR.
0000H
3FFFH
00H
FFH
00H
On-Chip
Program
Memory
On-Chip
Data
Memory
FFH
7FH
80H
(Direct Addressing)
(Direct/Indirect
SFR
Scratchpad
RAM
(Indirect Addressing)
Scratchpad
RAM
(MOVX @Ri)
Figure1. Addres Space