HT36FA Holtek Semiconductor Inc., HT36FA Datasheet - Page 15

no-image

HT36FA

Manufacturer Part Number
HT36FA
Description
Ht36fa -- Music Synthesizer 8-bit Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet
Rev. 1.20
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 fomula:
98Hz= 261Hz x
A pair of the values FR11~FR0 and BL3~BL0 can be
determined when the f
Start address definition
The HT36FA provides two address types for extended
use, one is the program ROM address which is pro-
gram counter corresponding with PF value, the other
is the start address of the PCM code.
The ST12~ST0 is used to define the start address of
each PCM code and reads the waveform data from
this location. The HT36FA provides 16 input data lines
from WA17~WA0, the ST12~ST0 is used to locate the
major 12 bits .e. WA17~WA5 and the undefined data
from WA4~WA0 is always set as 00000b. In other
words, the WA17~WA0=ST12~ST0 2
PCM code has to be located at a multiple of 32. Other-
wise, the PCM code will not be read out correctly be-
cause it has a wrong start code.
Waveform format definition
The HT36FA accepts two waveform formats to ensure
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.
OUT
WBS=0 means the sample format is 8-bit
WBS=1 means the sample format is 12-bit
= f
RECORD
RECORD
OUT
is the output signal frequency, f
of 261Hz and the SR of 11025Hz, the tone
OSC
OUT
x
) of G3: f
is 6.4MHz, the formula of a tone fre-
25kHz
Waveform Format
11025Hz
SR
25kHz
x
OSC
OUT
FR11 ~ FR0
2
x
is 6.4MHz.
(17 BL3~BL0)
=98Hz.
FR11 ~ FR0
2
-
(17 BL3~BL0)
-
5
8bit. So each
RECORD
and
15
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 become close.
The RE12~RE0 is used to calculate the repeat ad-
dress of the PCM code. The process for setting the
RE12~RE0 is to write the 2 s complement of the re-
peat length to RE12~RE0, with the highest carry ig-
nored. The HT36FA will get the repeat address by
adding the RE12~RE0 to the address of the end code,
then jump to the address to repeat this range.
Volume control
The HT36FA provides the volume control independ-
ently. The volume are controlled by VR9~VR0, re-
spectively. The chip provides 1024 levels of
controllable volume, the 000H is the maximum and
3FFH is the minimum output volume.
The PCM code definition
The HT36FA can only solve the voice format of the
signed 8-bit or 12-bit raw PCM. And the MCU will take
the voice code 80H as the end code.
So each PCM code section must be ended with the
end code 80H.
Digital to Analog Converter
The HT36FA provides one 16-bit voltage type DAC
device controlled by the MCU or Wavetable Synthe-
sizer for driving the external speaker through an exter-
nal NPN transistor. It is in fact an optional object used
for Wavetable Synthesizer DAC or general DAC, this
is chosen by Mask Option and DAC control register. If
the general DAC is chosen for application, then the
Wavetable Synthesizer is disabled since the DAC is
taken up and controlled by the MCU. If general DAC is
selected, the programmer must write the voice data to
register DAL and DAH to get the corresponding ana-
log data. If Mask Option enables the DAC register and
the SELW, then the following table comes useful.
Bit7~Bit3
Bit No.
Bit2
Bit1
Bit0
SELWR
SELWL
DAON
Label
No used
SELWL=1, left channel DAC
data from wavetable
SELWL=0, left channel DAC
data from MCU (Default)
DAON=1: DAC ON
DAON=0: DAC OFF (Default)
SELWR=1, Right Channel
DAC data from Wavetable
SELWR=0, Right Channel
DAC data from MCU (Default)
DAC
Function
February 26, 2007
HT36FA

Related parts for HT36FA