HT36M4 Holtek Semiconductor Inc., HT36M4 Datasheet - Page 6

no-image

HT36M4

Manufacturer Part Number
HT36M4
Description
Ht36m4 -- Music Synthesizer 8-bit Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
Program ROM
HT36M4 provides 16 address lines WA15~WA0 to read
the Program ROM which is up to 1M bits, and is com-
monly used for the wavetable voice codes and the pro-
gram memory. It provides two address types, one type is
for program ROM, which is addressed by a bank pointer
PF2~PF0 and a 13-bit program counter PC12~PC0;
and the other type is for wavetable code, which is ad-
dressed by the start address ST0~ST11. On the pro-
gram type, WA15~WA0= PF2~PF0 2
On t h e wav e ta bl e R OM ty pe, WA 16~WA0 =
ST11~ST0 2
Program Memory - ROM
The program memory is used to store the program in-
structions which are to be executed. It also contains
data, table, and interrupt entries, and is organized into
8192 16 bits, addressed by the bank pointer, program
counter and table pointer.
Certain locations in the program memory of each bank
are reserved for special usage:
Note:
Rev. 1.10
TABRDC [m]
TABRDL [m]
Instruction (s)
Location 000H on bank0
This area is reserved for the initialization program. Af-
ter chip reset, the program always begins execution at
location 000H on bank0.
Location 004H
This area is reserved for the external interrupt service
program. If the INT input pin is activated, the interrupt
is enabled and the stack is not full, the program will
jump to location 004H and begins execution.
Location 008H
This area is reserved for the Timer/Event Counter 0 in-
terrupt service program on each bank. If timer interrupt
results from a Timer/Event Counter 0 overflow, and if the
interrupt is enabled and the stack is not full, the program
begins execution at location 008H corresponding to its
bank.
Location 00CH
This area is reserved for the Timer/Event Counter 1
interrupt service program on each bank. If a timer in-
terrupt results from a Timer/Event Counter 1 overflow,
and if the interrupt is enabled and the stack is not full,
the program begins execution at location 00CH corre-
sponding to its bank.
*12~*0: Bits of table location
@7~@0: Bits of table pointer
5
8-bit.
P15~P13
*15~*13
111
P12
*12
1
13
P11
*11
1
+PC12~PC0.
P10
*10
1
Table Location
P9
*9
1
6
P8
*8
Table Location
1
Table location
Any location in the ROM space can be used as
look-up tables. The instructions TABRDC [m] (the
current page, 1 page=256 words) and TABRDL [m]
(the last page) transfer the contents of the lower-order
byte to the specified data memory, and the
higher-order byte to TBLH (08H). Only the destination
of the lower-order byte in the table is well-defined, the
higher-order byte of the table word are transferred to
the TBLH. The Table Higher-order byte register
(TBLH) is read only. The Table Pointer (TBLP) is a
read/write register (07H), which indicates the table lo-
cation. Before accessing the table, the location must
be placed in the TBLP. The TBLH is read only and
cannot be restored. If the main routine and the ISR
(Interrupt Service Routine) both employ the table read
instruction, the contents of the TBLH in the main rou-
tine are likely to be changed by the table read instruc-
tion used in the ISR. Errors can occur. In this case,
using the table read instruction in the main routine and
the ISR simultaneously should be avoided. However,
if the table read instruction has to be applied in both
the main routine and the ISR, the interrupt should be
disabled prior to the table read instruction. It will not be
enabled until the TBLH has been backed up. All table
related instructions need 2 cycles to complete the op-
eration. These areas may function as normal program
memory depending upon user requirements.
@7
@7
*7
P15~P8: Bits of current Program Counter
@6
@6
Program Memory for Each Bank
*6
@5
@5
*5
@4
@4
*4
@3
@3
*3
@2
@2
*2
March 14, 2007
HT36M4
@1
@1
*1
@0
@0
*0

Related parts for HT36M4