HT1130
8
May24,1999
Mode
ProgramCounter
PC11 PC10 PC9 PC8 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0
Initialreset
0
0
0
0
0
0
0
0
0
0
0
0
Internalinterrupt
0
0
0
0
0
0
0
0
0
1
0
0
Externalinterrupt
0
0
0
0
0
0
0
0
1
0
0
0
Jump,callinstruction
P11
P10
P9
P8
P7
P6
P5
P4
P3
P2
P1
P0
Conditionalbranch
@
P10
P9
P8
P7
P6
P5
P4
P3
P2
P1
P0
Programmemory
FunctionalDescription
Programcounter
-
PC
This counter addresses the program ROM and
is arranged as a 12-bit binary counter from PC0
to PC11 of which contents specify a maximum
of 4096 addresses. The program counter counts
with an increment of 1 or 2 with each execution
ofaninstruction.
When executing the jump instruction (JMP, JNZ,
JC, JTMR,...), a subroutine call, initial reset, in-
ternal interrupt, external interrupt or returning
from a subroutine, the program counter is loaded
withthecorrespondinginstructiondataasshown
in the table.
Note:P0~P11:Instructioncode
@:PC11keepsthecurrentvalue
S0~S11:Stackregisterbits
Programmemory
-
ROM
Theprogrammemoryistheexecutablememory
and is arranged in a 4096
′
8 bit format. The ad-
dress is specified by the program counter (PC).
Four special locations are reserved and de-
scribedasfollows:
·
Location0
Activating the processor RES pin causes the
firstinstructiontobefetchedfromlocation0.
·
Location4
Contains the timer interrupt resulting from a
TIMER overflow. If the interrupts are enabled
itcausestheprogramtojumptothissubroutine.
·
Location8
Activating the INT input pin of the processor
with the interrupts enabled causes the pro-
gramtojumptothislocation.
Activating the PS, PP or PM input pins of the
processor with the interrupts enabled during
Halt mode also causes the program to jump to
thislocation.
·
Locationsn00HtonFFH
These are the 256 bytes of each page in the pro-
gram memory. This area from n00H to nFFH
andF00HtoFFFHcanbeusedasalook upta-
ble. Instructions such as READ R4A, READ
MR0A, READF R4A, READF MR0A can read
the table and transfer the contents of the table
to ACC and R4 or to ACC and a data memory
address specified by the register pair R1,R0.
However as R1,R0 can only store 8 bits, these
instructions cannot fully specify the full 12 bit
0 0 0 H
0 0 4 H
0 0 8 H
F 0 0 H
F F F H
R e s e t i n i t i a l p r o g r a m
T i m e r i n t e r r u p t s u b r o u t i n e
E x t e r n a l i n t e r r u p t s u b r o u t i n e
P r o g r a m R O M
8 b i t s
P a g e F l o o k - u p t a b l e ( 2 5 6 b y t e s )
P a g e N l o o k - u p t a b l e
0 0 B H
Programmemory