HT48RA0-2/HT48CA0-2
Program Counter - PC
data and table and is organized into 1024´14 bits, ad-
dressed by the program counter and table pointer.
The 10-bit program counter (PC) controls the sequence
in which the instructions stored in program ROM are ex-
ecuted and its contents specify a maximum of 1024 ad-
dresses.
Certain locations in the program memory are reserved
for special usage:
·
Location 000H
This area is reserved for the initialization program. Af-
ter chip reset, the program always begins execution at
location 000H.
After accessing a program memory word to fetch an in-
struction code, the contents of the program counter are
incremented by one. The program counter then points to
the memory word containing the next instruction code.
·
Table location
Any location in the EPROM space can be used as
look-up tables. The instructions TABRDC [m] (the cur-
rent page, one page=256 words) and TABRDL [m]
(the last page) transfer the contents of the lower-order
byte to the specified data memory, and the
When executing a jump instruction, conditional skip ex-
ecution, loading PCL register, subroutine call, initial re-
set or return from subroutine, the PC manipulates the
program transfer by loading the address corresponding
to each instruction.
0
0
0
H
D
e
v
i
c
e
i
n
i
t
i
a
l
i
z
a
t
i
o
n
p
r
o
g
r
a
m
The conditional skip is activated by instruction. Once the
condition is met, the next instruction, fetched during the
current instruction execution, is discarded and a dummy
cycle replaces it to get the proper instruction. Otherwise
proceed with the next instruction.
n
0
0
H
The lower byte of the program counter (PCL) is a read-
able and writeable register (06H). Moving data into the
PCL performs a short jump. The destination will be
within 256 locations.
P
r
o
g
r
a
m
L
o
o
k
-
u
p
t
a
b
l
e
(
2
5
6
w
o
r
d
s
)
n
F
F
H
When a control transfer takes place, an additional
dummy cycle is required.
L
o
o
k
-
u
p
t
a
b
l
e
(
2
5
6
w
o
r
d
s
)
3
F
F
H
Program Memory - ROM
1
4
b
i
t
s
N
o
t
e
:
n
r
a
n
g
e
s
f
r
o
m
0
t
o
3
The program memory is used to store the program in-
structions which are to be executed. It also contains
Program Memory
Program Counter
Mode
*9
*8
*7
*6
*5
*4
*3
*2
*1
*0
Initial reset
0
0
0
0
0
0
0
0
0
0
Skip
PC+2
Loading PCL
Jump, call branch
Return from subroutine
*9
#9
S9
*8
#8
S8
@7
#7
@6
#6
@5
#5
@4
#4
@3
#3
@2
#2
@1
#1
@0
#0
S7
S6
S5
S4
S3
S2
S1
S0
Program Counter
Note: *9~*0: Program counter bits
#9~#0: Instruction code bits
S9~S0: Stack register bits
@7~@0: PCL bits
Table Location
Instruction(s)
*9
*8
P8
1
*7
*6
*5
*4
*3
*2
*1
*0
TABRDC [m]
TABRDL [m]
P9
1
@7
@7
@6
@6
@5
@5
@4
@4
@3
@3
@2
@2
@1
@1
@0
@0
Table Location
@7~@0: Table pointer bits
Note: *9~*0: Table location bits
P9~P8: Current program counter bits
Rev. 1.50
4
July 23, 2004