01.04.2014 Views

Preliminary C8051F120/1/2/3 C8051F124/5/6/7 - KEMT FEI TUKE

Preliminary C8051F120/1/2/3 C8051F124/5/6/7 - KEMT FEI TUKE

Preliminary C8051F120/1/2/3 C8051F124/5/6/7 - KEMT FEI TUKE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Preliminary</strong><br />

<strong>C8051F120</strong>/1/2/3<br />

<strong>C8051F124</strong>/5/6/7<br />

12.2. Memory Organization<br />

The memory organization of the CIP-51 System Controller is similar to that of a standard 8051. There are two separate<br />

memory spaces: program memory and data memory. Program and data memory share the same address space but<br />

are accessed via different instruction types. There are 256 bytes of internal data memory and 128k bytes of internal<br />

program memory address space implemented within the CIP-51. The CIP-51 memory organization is shown in<br />

Figure 12.2.<br />

Figure 12.2. Memory Map<br />

0x200FF<br />

0x20000<br />

0x1FFFF<br />

0x1FC00<br />

0x1FBFF<br />

0x00000<br />

PROGRAM/DATA MEMORY<br />

(FLASH)<br />

Scrachpad Memory<br />

(DATA only)<br />

RESERVED<br />

FLASH<br />

(In-System<br />

Programmable in 1024<br />

Byte Sectors)<br />

0xFF<br />

0x80<br />

0x7F<br />

0x30<br />

0x2F<br />

0x20<br />

0x1F<br />

0x00<br />

0xFFFF<br />

DATA MEMORY (RAM)<br />

INTERNAL DATA ADDRESS SPACE<br />

Upper 128 RAM<br />

(Indirect Addressing<br />

Only)<br />

(Direct and Indirect<br />

Addressing)<br />

Bit Addressable<br />

General Purpose<br />

Registers<br />

Special Function<br />

Registers<br />

(Direct Addressing Only)<br />

Lower 128 RAM<br />

(Direct and Indirect<br />

Addressing)<br />

EXTERNAL DATA ADDRESS SPACE<br />

0<br />

1<br />

2<br />

3<br />

Up To<br />

256 SFR Pages<br />

Off-chipXRAM space<br />

0x2000<br />

0x1FFF<br />

0x0000<br />

XRAM - 8192 Bytes<br />

(accessable using MOVX<br />

instruction)<br />

12.2.1. Program Memory<br />

The CIP-51 has a 128k byte program memory space. The MCU implements 131072 bytes of this program memory<br />

space as in-system re-programmable FLASH memory in four 32k byte code banks. A common code bank (Bank 0)<br />

of 32k bytes is always accessible from addresses 0x0000 to 0x7FFF. The three upper code banks (Bank 1, Bank 2,<br />

and Bank 3) are each mapped to addresses 0x8000 to 0xFFFF, depending on the selection of bits in the PSBANK register,<br />

as described in Figure 12.3. The IFBANK bits select which of the upper banks are used for code execution,<br />

while the COBANK bits select the bank to be used for direct writes and reads of the FLASH memory. Note: 1024<br />

bytes of the memory in Bank 3 (0x1FC00 to 0x1FFFF) are reserved and are not available for user program or data<br />

storage.<br />

Program memory is normally assumed to be read-only. However, the CIP-51 can write to program memory by setting<br />

the Program Store Write Enable bit (PSCTL.0) and using the MOVX instruction. This feature provides a mechanism<br />

for the CIP-51 to update program code and use the program memory space for non-volatile data storage. Refer to Section<br />

“15. FLASH MEMORY” on page 173 for further details.<br />

© 2002 Cygnal Integrated Products, Inc. DS008-0.8-AUG02 Page 123

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!