11.07.2015 Views

MC95FB204 - abov.co.kr

MC95FB204 - abov.co.kr

MC95FB204 - abov.co.kr

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>MC95FB204</strong>8.2 Data MemoryFigure 8.2 shows the internal Data memory space available.FFHUpper128 BytesFFHSpecial FunctionRegistersInternal RAM128 Bytes80H(IndirectAddressing)80H(Direct Addressing)7FHLower128 BytesInternal RAM00H(Direct or IndirectAddressing)Figure 8.2 Data memory mapThe internal memory space is divided into three blocks, which are generally referred to as the lower128, upper 128, and SFR space.Internal Data memory addresses are always one byte wide, which implies an address space of only256 bytes. However, the addressing modes for internal RAM can in fact ac<strong>co</strong>mmodate 384 bytes,using a simple trick. Direct addresses higher than 7FH access one memory space and indirectaddresses higher than 7FH access a different memory space. Thus Figure 8.2 shows the upper 128and SFR space occupying the same block of addresses, 80H through FFH, although they arephysically separate entities.The lower 128 bytes of RAM are present in all 8051 devices as mapped in Figure 8-3. The lowest 32bytes are grouped into 4 banks of 8 registers. Program instructions call out these registers as R0through R7. Two bits in the Program Status Word select which register bank is in use. This allowsmore efficient used of <strong>co</strong>de space, since register instructions are shorter than instructions that usedirect addressing.The next 16 bytes <strong>abov</strong>e the register banks form a block of bit-addressable memory space. The8051 instruction set includes a wide selection of single-bit instructions, and the 128 bits in this areacan be directly addressed by these instructions. The bit addresses in this area are 00H through 7FH.All of the bytes in the lower 128 can be accessed by either direct or indirect addressing. The upper128 bytes RAM can only be accessed by indirect addressing. These spaces are used for user RAMand stack pointer.30 July 17, 2012 Ver.1.7

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

Saved successfully!

Ooh no, something went wrong!