MC80F0704/0708/0804/0808
8.3 Data Memory
Figure 8-8 shows the internal Data Memory space available.
Data Memory is divided into three groups, a user RAM, control
registers, and Stack memory.
0000H
00BFH
00C0H
00FFH
0100H
01BFH
01C0H
01FFH
User Memory
(192Bytes)
Control
Registers
Not Available
User Memory
or Stack Area
(64 bytes)
PAGE0
(When “G-flag=0”,
this page0 is selected)
PAGE1
Figure 8-8 Data Memory Map
User Memory
The MC80F0704/0708/0804/0808 has 256 × 8 bits for the user
memory (RAM). RAM pages are selected by RPR (See Figure 8-
9 ).
Note: After setting RPR(RAM Page Select Register), be
sure to execute SETG instruction. When executing CLRG
instruction, be selected PAGE0 regardless of RPR.
Control Registers
The control registers are used by the CPU and Peripheral function
blocks for controlling the desired operation of the device. There-
fore these registers contain control and status bits for the interrupt
system, the timer/ counters, analog to digital converters and I/O
ports. The control registers are in address range of 0C0H to 0FFH.
Note that unoccupied addresses may not be implemented on the
chip. Read accesses to these addresses will in general return ran-
dom data, and write accesses will have an indeterminate effect.
More detailed informations of each register are explained in each
peripheral section.
Note: Write only registers can not be accessed by bit ma-
nipulation instruction. Do not use read-modify-write instruc-
tion. Use byte manipulation instruction, for example “LDM”.
Example; To write at CKCTLR
LDM CKCTLR,#0AH ;Divide ratio(÷32)
Stack Area
The stack provides the area where the return address is saved be-
fore a jump is performed during the processing routine at the ex-
ecution of a subroutine call instruction or the acceptance of an
interrupt.
When returning from the processing routine, executing the sub-
routine return instruction [RET] restores the contents of the pro-
gram counter from the stack; executing the interrupt return
instruction [RETI] restores the contents of the program counter
and flags.
The save/restore locations in the stack are determined by the
stack pointed (SP). The SP is automatically decreased after the
saving, and increased before the restoring. This means the value
of the SP indicates the stack location number for the next save.
Refer to Figure 8-4 on page 26.
RPR
R/W R/W R/W
7
6
5
4
3
2
1
0
-
-
-
-
-
- RPR1 RPR0
ADDRESS: 0E1H
INITIAL VALUE: ---- --00B
System clock source select
00 : PAGE0
01 : PAGE1
others : Setting prohibited
Figure 8-9 RPR(RAM Page Select Register)
October 31, 2011 Ver 1.03
29