CY8C28xxx PSoC Programmable System-on-Chip TRM, Document No. 001-52594 Rev. *G
57
4. RAM Paging
This chapter explains the PSoC
®
device’s use of RAM Paging and its associated registers. For a complete table of the RAM
Paging registers, refer to the
“Summary Table of the Core Registers” on page 36
. For a quick reference of all PSoC registers
in address order, refer to the
Register Details chapter on page 125
.
4.1
Architectural Description
The M8C is an 8-bit CPU with an 8-bit address bus. The 8-
bit memory address bus allows the M8C to access up to 256
bytes of SRAM, to increase the amount of available SRAM
and preserve the M8C
language. PSoC devices
with more than 256 bytes of SRAM have a paged memory
architecture. The CY8C28xxx devices have 1 KB of RAM;
thus, they have four pages.
To take full advantage of the paged memory architecture of
the PSoC device, several registers must be used and two
CPU_F register bits must be managed. However, the Power
On Reset (POR) value for all of the paging registers and
CPU_F bits is zero. This places the PSoC device in a mode
identical to PSoC devices with only 256 bytes of SRAM. It is
not necessary to understand all of the Paging registers to
take advantage of the additional SRAM available in some
devices. Very simple modifications to the reset state of the
memory paging logic can be made, to begin to take advan-
tage of the additional SRAM pages.
The memory paging architecture consists of five areas:
■
Stack Operations
■
Interrupts
■
MVI Instructions
■
Current Page Pointer
■
Indexed Memory Page Pointer
The first three of these areas have no dependency on the
CPU_F register's PgMode bits and are covered in the next
subsections after Basic Paging. The function of the last two
depend on the CPU_F PgMode bits and will be covered last.
4.1.1
Basic Paging
The M8C is an 8-bit CPU with an 8-bit memory address bus.
The memory address bus allows the M8C to access up to
256 bytes of SRAM. To increase the amount of SRAM, the
M8C accesses memory page bits. The memory page bits
are located in the CUR_PP register and allow for selection
of one of eight SRAM pages. In addition to setting the page
bits, Page mode must be enabled by setting the CPU_F[7]
bit. If Page mode is not enabled, the page bits are ignored
and all non-stack memory access is directed to Page 0.
After Page mode is enabled and the page bits are set, all
instructions that operate on memory access the SRAM page
indicated by the page bits. The exceptions to this are the
instructions that operate on the stack and the MVI instruc-
tions: PUSH, POP, LCALL, RETI, RET, CALL, and MVI. See
the description of
and
for a more detailed discus-
sion.
Figure 4-1. Data Memory Organization
Page 0
SRAM
256 Bytes
ISR
Page 6
SRAM
256 Bytes
Page 5
SRAM
256 Bytes
Page 3
SRAM
256 Bytes
Page 2
SRAM
256 Bytes
Page 1
SRAM
256 Bytes
Page 7
SRAM
256 Bytes
Page 4
SRAM
256 Bytes
00h
FFh
Summary of Contents for CY8C28 series
Page 65: ...64 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G RAM Paging ...
Page 125: ...124 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 311: ...310 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G IDAC_CR0 1 FDh ...
Page 317: ...316 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 393: ...392 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 477: ...476 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Digital Clocks ...
Page 561: ...560 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...