HT37Q70 Holtek Semiconductor Inc., HT37Q70 Datasheet - Page 16

no-image

HT37Q70

Manufacturer Part Number
HT37Q70
Description
4-channel Music Synthesizer Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
When executing instructions requiring jumps to
non-consecutive addresses such as a jump instruction,
a subroutine call, interrupt or reset, etc., the
microcontroller manages program control by loading the
required address into the Program Counter. For condi-
tional skip instructions, once the condition has been
met, the next instruction, which has already been
fetched during the present instruction execution, is dis-
carded and a dummy cycle takes its place while the cor-
rect instruction is obtained.
The lower byte of the Program Counter, known as the
Program Counter Low register or PCL, is available for
program control and is a readable and writable register.
By transferring data directly into this register, a short
program jump can be executed directly, however, as
only this low byte is available for manipulation, the
jumps are limited to the present page of memory, that is
256 locations. When such program jumps are executed
it should also be noted that a dummy cycle will be in-
serted.
Note: P17~P8: Program Counter bits
Rev. 1.00
Initial Reset
Timer/Event Counter 0
Overflow
Timer/Event Counter 1
Overflow
Timer Counter 2
Overflow
ERCOCI Interrupt
ADPCM Interrupt
Skip
Loading PCL
Jump, Call Branch
Return from Subroutine
@7~@0: PCL bits
#12~#0: Instruction code address bits
BP1.4~BP1.0: ROM bank pointer
S17~S0: Stack register bits
For the HT37Q70/60, the Program Counter is 18 bits wide, i.e. from b17~b0.
For the HT37Q50/40, the Program Counter is 17 bits wide, i.e. from b16~b0, therefore the b17 column in the
table is not applicable.
For the HT37Q30, the Program Counter is 16 bits wide, i.e. from b15~b0, therefore the b17 and b16 the col-
umns in the table are not applicable.
For the HT37Q20, the Program Counter is 15 bits wide, i.e. from b14~b0, therefore the b17, b16 and b15 the
columns in the table are not applicable.
Mode
BP1.4~BP1.0 #12 #11 #10
P17~P13
S17~S13
b17~b13
00000
00000
00000
00000
00000
00000
b12 b11 b10
P12 P11 P10
S12 S11 S10
0
0
0
0
0
0
0
0
0
0
0
0
Program Counter + 2 (Within Current Bank)
Program Counter
0
0
0
0
0
0
16
b9
P9
#9
S9
0
0
0
0
0
0
The lower byte of the Program Counter is fully accessi-
ble under program control. Manipulating the PCL might
cause program branching, so an extra cycle is needed
to pre-fetch. Further information on the PCL register can
be found in the Special Function Register section.
Stack
This is a special part of the memory which is used to
save the contents of the Program Counter only. The
stack can have 8 levels depending upon which option is
selected and is neither part of the data nor part of the
program space, and is neither readable nor writable.
The activated level is indexed by the Stack Pointer, SP,
and is neither readable nor writable. At a subroutine call
or interrupt acknowledge signal, the contents of the Pro-
gram Counter are pushed onto the stack. At the end of a
subroutine or an interrupt routine, signaled by a return
instruction, RET or RETI, the Program Counter is re-
stored to its previous value from the stack. After a de-
vice reset, the Stack Pointer will point to the top of the
stack.
Program Counter
b8
P8
#8
S8
0
0
0
0
0
0
@7 @6 @5 @4 @3 @2 @1 @0
S7
b7
#7
0
0
0
0
0
0
S6
b6
#6
0
0
0
0
0
0
HT37Q70/60/50/40/30/20
S5
b5
#5
0
0
0
0
0
0
S4
b4
#4
0
0
0
1
1
1
S3
b3
#3
0
1
1
0
0
1
February 17, 2009
S2
b2
#2
0
0
1
0
1
0
b1
S1
#1
0
0
0
0
0
0
b0
S0
#0
0
0
0
0
0
0

Related parts for HT37Q70