
MC68HC705J2
Rev. 2
MEMORY
MOTOROLA
6-1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SECTION 6
MEMORY
This section describes the organization of the on-chip memory.
6.1 Memory Map
The CPU can address 4 Kbytes of memory space. The program counter normally
advances one address at a time through the memory, reading the program
instructions and data. The EPROM portion of memory holds the program
instructions, fixed data, user-defined vectors, and service routines. The RAM portion
of memory holds variable data. I/O registers are memory-mapped so that the CPU
can access their locations in the same way that it accesses all other memory
locations.
Figure 6-1
is a memory map of the MCU.
Figure 6-2
is a more detailed memory map
of the 32-byte I/O register section.
6.1.1 Input/Output Section
The first 32 addresses of the memory space, $0000–$001F, are defined as the I/O
section. These are the addresses of the I/O control registers, I/O status registers,
and I/O data registers.
6.1.2 RAM
The MCU has 112 bytes of fully static read/write memory for storage of variable and
temporary data during program execution. RAM addresses $00C0–$00FF serve as
the stack. The CPU uses the stack to save CPU register contents before processing
an interrupt or subroutine call. The stack pointer decrements during pushes and
increments during pulls.
NOTE
Be careful if using the stack addresses ($00C0–$00FF) for data
storage or as a temporary work area. The CPU may overwrite data in
the stack during a subroutine or interrupt.