HT46R4A
Data Memory
that is known as General Purpose Data Memory. This
area of Data Memory is fully accessible by the user pro-
gram for both read and write operations. By using the
²SET [m].i² and ²CLR [m].i² instructions individual bits
can be set or reset under program control giving the
user a large range of flexibility for bit manipulation in the
Data Memory.
The Data Memory is a volatile area of 8-bit wide RAM
internal memory and is the location where temporary in-
formation is stored. Divided into two sections, the first of
these is an area of RAM where special function registers
are located. These registers have fixed locations and
are necessary for correct operation of the device. Many
of these registers can be read from and written to di-
rectly under program control, however, some remain
protected from user manipulation. The second area of
Data Memory is reserved for general purpose use. All
locations within this area are read and write accessible
under program control.
Special Purpose Data Memory
This area of Data Memory is where registers, necessary
for the correct operation of the microcontroller, are
stored. Most of the registers are both readable and
writable but some are protected and are readable only,
the details of which are located under the relevant Spe-
cial Function Register section. Note that for locations
that are unused, any read instruction to these addresses
will return the value ²00H².
Structure
The two sections of Data Memory, the Special Purpose
and General Purpose Data Memory are located at con-
secutive locations. All are implemented in RAM and are
8 bits wide but the length of each memory section is dic-
tated by the type of microcontroller chosen. The start
address of the Data Memory for all devices is the ad-
dress ²00H². Registers which are common to all
microcontrollers, such as ACC, PCL, etc., have the
same Data Memory address.
0
0
0
0
0
0
0
0
0
0
0
1
2
3
4
5
6
7
8
9
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
I
A
R
M
P
A
C
C
P
C
L
0
0
H
T
B
L
P
T
B
L
H
S
D
p
e
c
i
a
l
P
u
r
p
o
s
e
0
0
A
B
S
T
A
T
U
S
a
t
a
M
e
m
o
r
y
I
N
T
C
0
0
0
C
D
3
F
H
T
M
R
0
4
0
H
0
E
T
T
M
M
R
0
C
C
0
F
1
1
1
1
1
1
1
1
1
1
0
1
2
3
4
5
6
7
8
9
T
M
R
1
G
D
e
n
e
r
a
l
P
u
r
p
o
s
e
R
1
a
t
a
M
e
m
o
r
y
P
A
P
A
C
F
F
H
P
B
H
T
4
6
R
4
A
P
B
C
P
C
Data Memory Structure
P
C
C
P
D
Note: Most of the Data Memory bits can be directly
manipulated using the ²SET [m].i² and ²CLR
[m].i² with the exception of a few dedicated bits.
The Data Memory can also be accessed
through the memory pointer register MP.
P
D
C
1
1
A
B
P
W
W
M
0
P
M
1
1
1
C
D
1
E
I
N
T
C
1
1
F
2
0
A
D
R
L
General Purpose Data Memory
2
1
A
D
D
R
C
H
2
2
2
3
A
R
All microcontroller programs require an area of
read/write memory where temporary data can be stored
and retrieved for use later. It is this area of RAM memory
A
C
S
R
:
U
n
u
s
e
d
,
r
e
a
d
a
s
"
0
0
"
Special Purpose Data Memory
Rev. 1.00
10
November 28, 2007