HT36M4
A_R
ENV1
ENV0
Volume Control Bit
VL2~VL0, VR2~VR0
VL1~VL0, VR1~VR0
VL0, VR0
Control Bit Final Value
Mode
0
0
0
x
1
1
1
0
0
1
1
0
0
1
0
1
0
1
0
1
0
111b
11b
Release mode
No change mode
Attach mode
1b
No Bit
Unchanged
000b
00b
VL2~VL0, VR2~VR0
VL1~VL0, VR1~VR0
VL0, VR0
0b
Envelope Type Definition
·
The PCM code definition
The HT36M4 can only solve the voice format of the signed 8-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 (DAC)
The HT36M4 provides one 16-bit voltage type DAC device controlled by the MCU or wavetable synthesizer for driving
an external speaker through an external NPN transistor. It is in fact an optional object used for Wavetable Synthesizer
DAC or general DAC, this is chosen by DAC control register. If general DAC is chosen for application, then Wavetable
synthesizer is disabled because the DAC is taken up and controlled by the MCU. If general DAC is selected, the pro-
grammer must write the voice data to register DAL and DAH to get the corresponding analog data. If Mask Option en-
ables the DAC register and enables the SELW, then the following table comes useful.
Bit No.
Bit7~Bit3
Bit2
Label
¾
Function
Unused
Unused
¾
DAON=1: DAC ON
Bit1
Bit0
DANO
DAON=0: DAC OFF (Default)
SELWR=1: Right Channel DAC data from Wavetable
SELWR=0: Right Channel DAC data from MCU (default)
SELWR
DAC (1FH) Control Regulation
Mask Option
No
1
Mask Option
Description
WDT Source
On-chip RC/instruction clock/disable WDT
2
CLRWDT Times One time, two times (CLR WDT1/WDT2)
3
Wake-up
Pull-high
OSC Mode
LVR
PA only
4
PA, PB0~PB3 input
Crystal or resistor type
Enable or disable
5
6
Rev. 1.10
17
March 14, 2007