HT36M4 Holtek Semiconductor Inc., HT36M4 Datasheet - Page 16

no-image

HT36M4

Manufacturer Part Number
HT36M4
Description
Ht36m4 -- Music Synthesizer 8-bit Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
Rev. 1.10
VM
CH3~CH0 channel number selection
The HT36M4 has a built-in 16 output channels and
CH3~CH0 is used to define which channel is selected.
When this register is written to, the wavetable synthe-
sizer will automatically output the dedicated PCM
code. So this register is also used as a start playing
key and it has to be written to after all the other
wavetable function registers are already defined.
Change parameter selection
These two bits, VM and FR, are used to define which
register will be updated on this selected channel.
There are two modes that can be selected to reduce
the process of setting the register. Please refer to the
statements of the following table:
Output frequency definition
The data on BL3~BL0 and FR11~FR0 are used to de-
fine the output speed of the PCM file, i.e. it can be
used to generate the tone scale. When the FR11~FR0
is 800H and BL3~BL0 is 6H, each sample data of the
PCM code will be sent out sequentially.
When the f
quency is:
f
where f
SR is the frequency and sampling rate on the sample
code, respectively.
So if a voice code of C3 has been recorded which has
the f
frequency (f
Can be obtained by using the formula:
196Hz= 261Hz x
A pair of the values FR11~FR0 and BL3~BL0 can be
determined when the f
Start address definition
The HT36M4 provides two address types for ex-
tended use, one is the program ROM address which is
program counter corresponding with PF value, the
other is the start address of the PCM code.
The ST11~ST0 is used to define the start address of
each PCM code and reads the waveform data from
this location. The HT36M4 provides 17 input data
lines from WA16~WA0, the ST11~ST0 is used to lo-
cate the major 16 bits i.e. WA16~WA5 and the unde-
fined data from WA4~WA0 is always set as 00000b. In
other words, the WA16~WA0=ST11~ST0 2
So each PCM code has to be located at a multiple of
32. Otherwise, the PCM code will not be read out cor-
rectly because it has a wrong start code.
OUT
0
0
1
= f
RECORD
RECORD
FR
OUT
0
1
0
OSC
is the output signal frequency, f
of 261Hz and the SR of 11025Hz, the tone
OUT
Update all the parameter
Only update the frequency number
Only update the volume
x
50kHz
is 12.8MHz, the formula of a tone fre-
) of G3: f
SR
11025Hz
50kHz
x
OSC
FR11 ~ FR0
2
OUT
(17 BL3~BL0)
is 12.8MHz.
=196Hz.
x
Function
-
FR11~ FR0]
2
(17 BL3~BL0)
-
RECORD
5
8-bit.
and
16
Waveform format definition
The HT36M4 accepts two waveform formats to en-
sure a more economical data space. WBS is used to
define the sample format of each PCM code.
The 12-bit sample format allocates location to each
sample data. Please refer to the waveform format
statement as shown below.
Repeat number definition
The repeat number is used to define the address
which is the repeat point of the sample. When the re-
peat number is defined, it will be output from the start
code to the end code once and always output the
range between the repeat address to the end code
(80H) until the volume becomes close.
The RE14~RE0 is used to calculate the repeat ad-
dress of the PCM code. The process for setting the
RE14~RE0 is to write the 2 s complement of the re-
peat length to RE14~RE0, with the highest carry ig-
nored. The HT36M4 will get the repeat address by
adding the RE14~RE0 to the address of the end code,
then jump to the address to repeat this range.
Left and right volume control
The HT36M4 provides the left and right volume con-
trol independently. The left and right volume are con-
trolled by VL9~VL0 and VR9~VR0 respectively. The
chip provides 1024 levels of controllable volume, the
000H is the maximum and 3FFH is the minimum out-
put volume.
Envelope type definition
The HT36M4 provides a function to easily program
the envelope by setting the data of ENV1~ENV0 and
A_R. It forms a vibrato effect by a change of the
volume to attach and release alternately.
The A_R signal is used to define the volume change in
attach mode or release mode and ENV1~ENV0 is
used to define which volume control bit will be
changeable. On the attach mode, the control bits will
be sequentially signaled down to 0. On the release
mode, the control bits will be sequentially signaled up
to 1. The relationship is shown in the following table.
WBS=0 means the sample format is 8-bit
WBS=1 means the sample format is 12-bit
Waveform Format
March 14, 2007
HT36M4

Related parts for HT36M4