MC96FR116C
November, 2018 Rev.1.8
39
8. MEMORY
The MC96FR116C has separate address spaces for Program and Data Memory. The logical
separation of Program and Data Memory allows the Data Memory to be accessed by 8-bit addresses,
which can be more quickly stored and manipulated by an 8-bit CPU. Nevertheless, 16-bit Data
Memory addresses can also be generated through the DPTR register.
Program Memory contains user software and is read-only while the device is in normal running mode.
But the Program Memory can be erased or programmed by ISP(In System Programming) method.
The MC96FR116C can assign maximum 16KB to Program Memory which is divided into 2 banks.
Data Memory is composed of Internal RAM (IRAM), External RAM (XRAM). IRAM is read-writable
and address space is 256B including Stack Pointer. XRAM has 2048B of memory depth and also
read-writable.
NOTE
The terms IRAM and XRAM are used just to classify kind of memory. XRAM
doesn’t have to reside outside
the device. In MC96FR116C, both IRAM and XRAM reside in device.
8.1 Program Memory
A 16-bit program counter is capable of addressing up to 16K bytes, but this device has 16K bytes of
program memory space located in one bank 0. The following figure shows a map of program memory
in MC96FR116C. After reset, the CPU begins program execution from address 0000
H
. All interrupt
vector is assigned to their fixed location in program memory. An interrupt causes the CPU to jump to
its vector location, where the CPU commences execution of the service routine. External interrupt 0,
for example, is assigned to location 000B
H
. If user wants to use external interrupt 0 as an interrupt
source, its service routine must begin at location 000B
H
. If the interrupt is not used, its service location
is available as general purpose program memory. Because all interrupt vector can use 8 bytes from
each vector address
NOTE
, the service routine can reside entirely within that 8 bytes if an interrupt
service routine is short enough (as is often the case in control applications). Normally an interrupt
service routine is longer than 8 bytes, so the service routine starts with a jump instruction.
NOTE
Refer to Table 10-2 Interrupt Vector Address.
0000
H
3FFF
H
16KB
Bank0
Figure 8-1 Program Memory