HT82A832R
Rev. 1.00
7
July 18, 2006
the PCL performs a short jump. The destination will be
within the current program ROM page.
When a control transfer takes place, an additional
dummy cycle is required.
Program Memory
PROM
The program memory is used to store the program
instructions which are to be executed. It also contains
data, table, and interrupt entries, and is organized into
4096 15 bits, addressed by the program counter and
table pointer.
Certain locations in the program memory are reserved
for special usage:
Location 000H
This area is reserved for program initialization. After a
chip reset, the program always begins execution at lo-
cation 000H.
Location 004H
This area is reserved for the USB interrupt service
program. If the USB interrupt is activated, the interrupt
is enabledand the stack is not full, the program begins
execution at location 004H.
Location 008H
ThisareaisreservedfortheTimer/EventCounter0in-
terrupt service program. If a timer interrupt results
from a Timer/Event Counter 0 overflow, and if the in-
terrupt is enabled and the stack is not full, the program
begins execution at location 008H.
Location 00CH
ThisareaisreservedfortheTimer/EventCounter1in-
terrupt service program. If a timer interrupt results
from a Timer/Event Counter 1 overflow, and the inter-
rupt is enabled and the stack is not full, the program
begins execution at location 00CH.
Location 010H
This area is reserved for the play interrupt service pro-
gram. If play data is valid, and the interrupt is enabled
and the stack is not full, the program begins execution
at location 010H.
Location 014H
This area is reserved for when 8 bits of data have
beenreceivedortransmittedsuccessfullyfromthese-
rial interface. If the related interrupts are enabled, and
the stack is not full, the program begins execution at
location 014H.
Location 018H
This area is reserved for the record interrupt service
program. If the record data valid, the interrupt is en-
abled and the stack is not full, the program begins ex-
ecution at location 018H.
Table location
Any location in the program memory can be used as a
look-up table. There are three methods to read the
ROM data using two table read instructions:
TABRDC and TABRDL , transfer the contents of
the lower-order byte to the specified data memory,
and the higher-order byte to TBLH (08H).
The three methods are shown as follows:
The instruction TABRDC [m] (the current page,
one page=256 words), where the table location is
defined by TBLP (07H) in the current page. The
configuration option, TBHP, is disabled (default).
The instruction TABRDC [m] , where the table lo-
cation is defined by registers TBLP (07H) and
TBHP (01FH). The configuration option, TBHP, is
enabled.
The instruction TABRDL [m] , where the table lo-
cations is defined by register TBLP (07H) in the last
page (0F00H~0FFFH).
, %
%
:
( ' =
%
% ) %
%
:
%
( ' =
%
% %
%
:
%
) )
C
)
C
!
B 9
%
: & % 4 1
8 % ;
6
. . . C
D % %
% #
% %
% .
!
B 9
%
: & % 4 1
8 % ;
6
) ) C
. . C
% :
. ) ) C
)
) C
)
0 C
%
%
:
%
=
%
& E
%
) ) ) C
) ) 0 C
) ) C
&
%
%
:
%
& %
#
%
%
:
%
Program Memory
Instruction
Table Location
*11
*10
*9
*8
*7
*6
*5
*4
*3
*2
*1
*0
TABRDC [m]
P11
P10
P9
P8
@7
@6
@5
@4
@3
@2
@1
@0
TABRDL [m]
1
1
1
1
@7
@6
@5
@4
@3
@2
@1
@0
Table Location
Note: *11~*0: Table location bits
P11~P8: Current program counter bits when TBHP is disabled
P11~P8: Current program counter bits
@7~@0: Table pointer bits
TBHP register bit3~bit0 when TBHP is enabled