HTG2150
8
July 24, 2000
Preliminary
Mode
Program Rom Address
*13 *12 *11 *10 *9
*8
*7
*6
*5
*4
*3
*2
*1
*0
Initial reset
0
0
0
0
0
0
0
0
0
0
0
0
0
0
External interrupt
0
0
0
0
0
0
0
0
0
0
0
1
0
0
Timer counter 0 overflow
0
0
0
0
0
0
0
0
0
0
1
0
0
0
Timer 2 overflow
0
0
0
0
0
0
0
0
0
1
0
0
0
0
Timer 3 overflow
0
0
0
0
0
0
0
0
0
1
0
1
0
0
D/A buffer empty interrupt
0
0
0
0
0
0
0
0
0
1
1
0
0
0
Skip
PC+2
Loading PCL
*13 *12 *11 *10 *9
*8
@7 @6 @5
@4
@3
@2 @1
@0
Jump, call branch
BP.5 #12 #11 #10 #9
#8
#7
#6
#5
#4
#3
#2
#1
#0
Return from subroutine
S13 S12 S11 S10 S9 S8
S7 S6
S5
S4
S3
S2
S1
S0
Program rom address
Note: *13~*0: Program ROM address
@7~@0: PCL bits
#12~#0: Instruction code bits
S13~S0: Stack register bits
BP.5: Bit 5 of bank pointer (04H)
gram is in the program will always jump to the
appropriate interrupt service address in Bank
0. The original full 14 bit address will be stored
on the stack and restored when the relevant
RET/RETI instruction is executed, automati-
cally returning the program to the original
ROM bank. This eliminates the need for pro-
grammers to manage the BP when interrupts
occur.
Certain locations in Bank 0 of program memory
are reserved for special usage:
ROM Bank 0 (BP5~BP7=000B)
The ROM bank 0 ranges from 0000H to
1FFFH.
Location 000H
This area is reserved for the initialization
program. After chip reset, the program al-
ways begins execution at location 000H.
Location 004H
This area is reserved for the external inter-
rupt service program. If the INT input pin is
activated, and the interrupt is enabled and
the stack is not full, the program begins exe-
cution at location 004H.
Location 008H
This area is reserved for the timer counter 0 in-
terruptserviceprogram.Ifatimerinterruptre-
sultsfromatimercounter0overflow,andifthe
interrupt is enabled and the stack is not full,
theprogrambeginsexecutionatlocation008H.
! ! ! ! 5
! ! ! + 5
! ! ! 4 5
1*
7
> *
* *
" , * -
2 2 2 5
! ! ! 5
* . *
* *
! " ! 5
! " + 5
# * - ' '* $ *
! " 4 5
Program memory