Holtek HT84144 Magic voicetm Datasheet

HT84XXX
Magic VoiceTM
Features
·
·
·
·
·
·
·
·
·
Operating voltage: 2.4V~5.0V
Programmable tone melody generator
ADPCM or m-law PCM, PCM synthesis
Wide range of sampling rate for voice
synthesis
Minimum sampling rate step: 100Hz
Voice melody mixed output
Programmable 2 channels of melody mixed
output
Programmable 2 channels of voice mixed
output
13 kinds of melody beats
·
·
·
·
·
·
·
·
·
·
·
5 octaves of tone level and 18 tempos
16 levels of digital volume control
Two current type D/A outputs
Eight programmable I/O pins
Four programmable input pins
Provides 36 sec to 384 sec of voice capacity
Timer controller
Voice fill-in function
Powerful user-defined functions
Power-on initial setting
28-pin SKDIP package
·
Speech synthesizers and sound effect
generators
Applications
·
·
High-end educational leisure products
Alert and warning systems
General Description
such as to build-in a tiny controller. The Magic
VoiceTM provides various operational functions
similar to arithmetic operation, logic operation,
branch decision, random counter, and a programmable timer. The Magic VoiceTM series
are suitable for versatile voice and sound effect
applications.
The HT84XXX family is a series of programmable speech synthesizers and tone generators designed for user-defined voice and melody
applications. It provides various sampling
rates and beats, tone levels, tempos for the
speech synthesizer and melody generator. The
HT84XXX series has two built-in high quality,
current type D/A outputs with 16 levels of volume control. The user¢s commands enable the
user to program the powerful custom function
The HT84XXX Magic VoiceTM is Easy FormatTM supported.
ROM Selection Table
The HT84XXX series provides various voice capacity as shown below:
Part No.
HT84036
HT84072
HT84144
HT84192
HT84384
ROM
768Kb
1536Kb
3072Kb
4096Kb
8192Kb
Voice
Length
36 sec
72 sec
144 sec
192 sec
384 sec
Note: The voice capacity is based on a sampling rate of 21Kb/s
TM
Magic Voice is a trademark of Holtek Semiconductor Inc.
TM
Easy Format is a trademark of Grow With Me, Inc.
1
April 26, 2000
HT84XXX
Block Diagram
T im e B a s e
G e n e ra to r
O S C
P B 0 ~ P B 7
T o n e /M e lo d y
G e n e ra to r
D e c o d e r
&
I/O
C o n tr o lle r
P A 0 ~ P A 3
V D D
V S S
D A
& U
In s tru
R O
T A
s e r
c tio n
M
C u rre n t T y p e
D /A O u tp u t
A U D 0
S p e e c h
S y n th e s iz e r
C u rre n t T y p e
D /A O u tp u t
A U D 1
Pin Assignment
N C
1
2 8
N C
N C
2
2 7
N C
N C
3
2 6
N C
N C
4
2 5
N C
N C
5
2 4
N C
V D D
6
2 3
O S C
A U D 0
7
2 2
V S S
A U D 1
8
2 1
V S S
P B 7
9
2 0
P A 0
P B 6
1 0
1 9
P A 1
P B 5
1 1
1 8
P A 2
P B 4
1 2
1 7
P A 3
P B 3
1 3
1 6
P B 0
P B 2
1 4
1 5
P B 1
H T 8 4 X X X
2 8 S K D IP
2
April 26, 2000
HT84XXX
Pad Assignment
HT84036
V D D
A U D 0
1
(0 , 0 )
2
O S C
1 7
V S S
1 6
V S S
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
1 5
P B 6
P B 5
P B 4
P B 3
P B 2
P B 1
P B 0
P A 3
P A 2
P A 1
P A 0
4
1 8
3
P B 7
A U D 1
Chip size: 2735 ´ 2105 (mm)2
* The IC substrate should be connected to VSS in the PCB layout artwork.
3
April 26, 2000
HT84XXX
HT84072
(0 , 0 )
V D D
A U D 0
1
2
P B 4
9
1 0
1 1
1 2
P A 3
P B 5
8
P B 0
7
P B 1
6
P B 2
5
P B 6
4
1 3
1 4
1 8
O S C
1 7
V S S
1 6
V S S
1 5
3
P A 0
P A 1
P A 2
P B 3
P B 7
A U D 1
Chip size: 2735 ´ 2645 (mm)2
* The IC substrate should be connected to VSS in the PCB layout artwork.
4
April 26, 2000
HT84XXX
HT84144
(0 , 0 )
V D D
A U D 0
1
2
V S S
1 2
1 3
1 4
1 5
P A 0
P B 4
1 1
P A 1
P B 5
1 0
P A 2
P B 6
9
P A 3
P B 7
8
P B 0
7
V S S
1 6
P B 1
6
1 7
P B 2
5
O S C
P B 3
4
1 8
3
A U D 1
Chip size: 2735 ´ 3735 (mm)2
* The IC substrate should be connected to VSS in the PCB layout artwork.
5
April 26, 2000
HT84XXX
HT84192
(0 ,0 )
1
V D D
A U D 0
2
1 1
1 2
1 3 1 4
1 5
P A 0
P A 1
1 0
P A 2
9
V S S
V S S
P A 3
P B 4
P B 5
P B 6
P B 7
A U D 1
8
1 7
1 6
P B 0
7
O S C
P B 1
6
P B 2
5
P B 3
4
3
1 8
Chip size: 2735 ´ 4460 (mm)2
* The IC substrate should be connected to VSS in the PCB layout artwork.
6
April 26, 2000
HT84XXX
HT84384
(0 , 0 )
V D D
A U D 0
1
2
1 7
1 6
V S S
1 3
1 4
1 5
P A 1
P A 0
1 1 1 2
O S C 1
P A 2
1 0
P A 3
P B 4
9
P B 0
P B 5
8
P B 1
7
P B 2
6
P B 3
5
P B 6
A U D 1
4
P B 7
3
1 8
V S S
Chip size: 2740 ´ 7350 (mm)2
* The IC substrate should be connected to VSS in the PCB layout artwork.
7
April 26, 2000
HT84XXX
Pad Coordinates
HT84036
Unit: mm
Pad No.
X
Y
Pad No.
X
Y
1
2
3
4
5
6
7
8
9
-1125.31
-1177.49
-939.68
-689.05
-503.45
-352.65
-167.05
-16.25
169.35
114.74
-398.79
-884.61
-774.24
-774.24
-774.24
-774.24
-774.24
-774.24
10
11
12
13
14
15
16
17
18
320.15
505.75
656.55
842.15
992.95
1178.55
1167.43
1167.53
1167.53
-774.24
-774.24
-774.24
-774.24
-774.24
-774.24
-517.18
-377.08
-35.96
HT84072
Unit: mm
Pad No.
X
Y
Pad No.
X
Y
1
2
3
4
5
6
7
8
9
-1125.31
-1177.49
-939.68
-689.05
-503.45
-352.65
-167.05
-16.25
169.35
-155.26
-668.79
-1154.61
-1044.24
-1044.24
-1044.24
-1044.24
-1044.24
-1044.24
10
11
12
13
14
15
16
17
18
320.15
505.75
656.55
842.15
992.95
1178.55
1167.43
1167.53
1167.53
-1044.24
-1044.24
-1044.24
-1044.24
-1044.24
-1044.24
-787.18
-647.08
-305.96
HT84144
Unit: mm
Pad No.
X
Y
Pad No.
X
Y
1
2
3
4
5
6
7
8
9
-1125.31
-1177.49
-939.68
-689.05
-503.45
-352.65
-167.05
-16.25
169.35
-700.26
-1213.79
-1699.61
-1589.24
-1589.24
-1589.24
-1589.24
-1589.24
-1589.24
10
11
12
13
14
15
16
17
18
320.15
505.75
656.55
842.15
992.95
1178.55
1167.43
1167.53
1167.53
-1589.24
-1589.24
-1589.24
-1589.24
-1589.24
-1589.24
-1332.18
-1192.08
-850.96
8
April 26, 2000
HT84XXX
HT84192
Unit: mm
Pad No.
X
Y
Pad No.
X
Y
1
2
3
4
5
6
7
8
9
-1125.31
-1177.49
-939.68
-689.05
-503.45
-352.65
-167.05
-16.25
169.35
-1062.76
-1576.29
-2062.11
-1951.74
-1951.74
-1951.74
-1951.74
-1951.74
-1951.74
10
11
12
13
14
15
16
17
18
320.15
505.75
656.55
842.15
992.95
1178.55
1167.43
1167.53
1167.53
-1951.74
-1951.74
-1951.74
-1951.74
-1951.74
-1951.74
-1694.68
-1554.58
-1213.46
HT84384
Unit: mm
Pad No.
X
Y
Pad No.
X
Y
1
2
3
4
5
6
7
8
9
-1121.81
-1173.99
-936.18
-685.55
-499.95
-349.15
-163.55
-12.75
172.85
-2507.96
-3021.49
-3507.31
-3396.94
-3396.94
-3396.94
-3396.94
-3396.94
-3396.94
10
11
12
13
14
15
16
17
18
323.65
509.25
660.05
845.65
996.45
1182.05
1170.93
1171.03
1171.03
-3396.94
-3396.94
-3396.94
-3396.94
-3396.94
-3396.94
-3139.88
-2999.78
-2658.66
Pin Description
Pin No. Pin Name I/O
Internal
Connection
Description
1~5,
24~28
NC
¾
¾
No connection
6
VDD
¾
¾
Positive power supply
7
AUD0
O
PMOS
Open Drain
Audio output for driving an external transistor
8
AUD1
O
PMOS
Open Drain
Audio output for driving an external transistor
15~9
PB1~PB7
I/O
Pull-high or
CMOS
Bidirectional I/O pins
Can be optioned as trigger inputs or LED outputs
16
PB0
I/O
Pull-high or
CMOS
Bidirectional I/O pins
Can be optioned as CDS interface with internal
Schmitt trigger input
9
April 26, 2000
HT84XXX
Pin No. Pin Name I/O
Internal
Connection
Description
20~17
PA0~PA3
I
Wake-up
Pull-high
Trigger inputs
Can also be configured as wake-up inputs
21, 22
VSS
¾
¾
Negative power supply, ground
23
OSC
I
¾
Built-in RC oscillator
An oscillator resistor is connected between OSC and
VSS
Absolute Maximum Ratings
Supply Voltage.................................-0.3V to 6V
Storage Temperature.................-50°C to 125°C
Input Voltage .................VSS-0.3V to VDD+0.3V
Operating Temperature ..............-20°C to 70°C
Note: These are stress ratings only. Stresses exceeding the range specified under ²Absolute Maximum Ratings² may cause substantial damage to the device. Functional operation of this device
at other conditions beyond those listed in the specification is not implied and prolonged exposure to extreme conditions may affect device reliability.
Electrical Characteristics
Symbol
Parameter
Ta=25°C
Test Conditions
VDD
Conditions
Min.
Typ. Max. Unit
VDD
Operating Voltage
¾
¾
2.4
¾
5.2
V
ISTB
Standby Current
3V
No load, system HALT
¾
1
3
mA
IDD
Operating Current
3V
No load, fSYS=4MHz
¾
5
8
mA
IOL
PB0~PB7 Sink Current
3V
VOL=0.3V
4
6
¾
mA
IO
Max. AUD1 and AUD2
Output Current
3V
VOH=0.6V
-1.5
-2
¾
mA
fSYS
System Frequency
3V
ROSC=240kW
3.6
4.0
4.4
MHz
10
April 26, 2000
HT84XXX
Functional Description
The Magic VoiceTM series is a series of programmable speech synthesizers and melody generators. It provides various sampling rates and
beats, tone levels, tempos for speech synthesizer and melody generator. For voice synthesizer, the Magic VoiceTM provides 8-bit PCM,
6-bit m-law PCM and 4-bit ADPCM synthesis.
In HT84XXX series, a mixed output of two
channels PCM synthesis is allowed but only
one channel ADPCM synthesis is allowed. For
melody generator, the Magic VoiceTM supports
a tone melody and PCM melody generator and
two channels mixed output for the whole series.
UME_n (n=1 or 2) registers. The D/A pins are
PMOS open drain structure and ouput synthesized signals for driving a speaker through an
external NPN transistor when the chip is active. However, it becomes floating when the
chip is in the standby state. An 8050 type transistor with hFE=150 is recommended for the
output driver of the D/A output pin.
Melody/Tone generator
The HT84XXX family has a built-in melody/tone generator. The generator can generate
13 different kinds of melody beats, 5 octaves of
tone level, 18 tempos, and 2 channels mixed
output. Of these components, the melody tempo
is changeable and generates sound effects by
writing a control value to the TEMPO register.
The chip provides the following 18 tempos, 13
beats, and 5 octaves for user¢s programming.
The Magic VoiceTM series build-in 8 programmable I/O pins and 4 programmable input pins
along with powerful user¢s command. The
user¢s instructions are employed to develop
new and customized functions for a wide variety of innovative applications.
· 18 tempos (Beats/Min.)
Speech and melody analysis
The speech and melody sources of the Magic
VoiceTM can be recorded and edited from the PC
sound card and media tools. Holtek¢s CAD tools
first load a speech source file as .WAV or .PCM
format, then transfer the speech file as PCM,
LOG-PCM or ADPCM format, and finally save
it to the internal mask ROM by changing a
layer of the mask. The PCM format generates a
higher sound quality whereas the ADPCM format brings about a longer recording capacity.
The melody source can either be in the .MID or
in the .MLD format.
68
78
82
93
100
105
109
114
119
125
132
139
147
156
179
192
227
310
· 13 beats
1 1 1 1 1 1 1 2 3
4 3
1,
2
24, 12, 8, 6, 4, 3, 2, 3, 4, 3, 2,
· 5 octaves
C1~B1, C2~B2, C3~B3, C4~B4, C5~B5
PCM/ADPCM synthesizer
The HT84XXX family contains a PCM and
ADPCM synthesizer. The synthesizer offers a
wide range of sampling rates from 4kHz to
24kHz for PCM synthesis and 4kHz to 16kHz
for ADPCM synthesis. The sampling rate of the
synthesizer can be changed by writing a control
value to the sampling rate register. It also supports a small variety of 100Hz. For a higher
performance sound quality, the PCM coding is
required. But for a longer recording capacity,
the ADPCM coding is recommended.
The .MID file is the standard format of the windows media tools. The .MLD file is a text format. After the .MID file is compiled, the .MLD
file is automatically generated.
The Magic VoiceTM can support the following
compression format of the voice .WAV and
.PCM file: AD4, PCM8, m-law PCM.
Current type D/A output
The HT84XXX series supply two high accuracy
current type D/A output pins for audio output.
The output volume is changeable from 0 to 15
digital levels by writing a value to the VOL11
April 26, 2000
HT84XXX
The capability of the voice sampling rate for
various voice compression format.
fOSC
PCM8
m-law
PCM
AD4
4M
12kHz
11kHz
8kHz
5M
15kHz
14kHz
10kHz
6M
18kHz
16kHz
12kHz
8M
24kHz
22kHz
16kHz
sistor of 240kW. The RC type of oscillator offers
the most cost-effective solution, although the
frequency of the oscillation may vary with temperature and the chip itself due to process variation.
ROSC
HT84EVA HT84P00
IC
fOSC
Oscillator configuration
The HT84XXX series provides an RC oscillator
for the system clock. The system oscillator
stops in the standby state so as to reduce power
consumption.
4M
180kW
240kW
240kW
5M
150kW
210kW
210kW
6M
120kW
180kW
180kW
8M
91kW
150kW
150kW
Mask options
The following options have to be defined to ensure a proper system functioning:
For the oscillator circuit, an external resistor is
required between OSC and VSS. The oscillator
frequency is typically 4MHz for an external re-
· Pull-high resistor: 33kW/98kW (3V)
· Keydebouncetime:0ms~255ms(fOSC=4MHz)
12
April 26, 2000
HT84XXX
Application Circuits
Basic application
V
E A S Y 4
D D
P A 0
V D D
P A 1
P A 2
P A 3
8 0 5 0
A U D 0
P B 7
8 0 5 0
A U D 1
P B 6
P B 5
P B 4
P B 3
O S C
R
O S C
P B 1
V S S
V
P B 2
P B 0
E A S Y 8
D D
P A 0
V D D
P A 1
P A 2
P A 3
8 0 5 0
T R 1
E A S Y 4 -1
V
D D
P A 0
T R 2
V D D
T R 3
P A 2
T R 4
P A 3
8 0 5 0
O U T 8
P B 4
O U T 4
P B 3
O S C
O U T 3
O U T 2
R
O S C
T R 5
V
P A 0
V D D
T R 7
T R 8
P A 3
8 0 5 0
P B 4
P B 3
R
O S C
O S C
P B 2
P B 1
V S S
P B 0
T R 4
O U T 7
O U T 6
O U T 5
O U T 4
O U T 3
O U T 2
O U T 1
T R 1
T R 5
T R 2
T R 6
T R 3
T R 7
T R 4
T R 8
T R 9
T R 1 0
T R 1 1
T R 1 2
A U D 0
P B 7
8 0 5 0
P B 6
P B 5
P A 1
P A 2
P B 7
A U D 1
P B 0
E A S Y 1 2
D D
T R 6
A U D 0
8 0 5 0
P B 2
P B 1
V S S
O U T 1
T R 4
P B 6
P B 5
O U T 5
T R 3
T R 3
P B 7
A U D 1
O U T 6
T R 2
T R 2
A U D 0
8 0 5 0
O U T 7
T R 1
P A 1
T R 1
A U D 1
O U T 6
P B 6
P B 5
O U T 5
P B 4
O U T 4
P B 3
O S C
O U T 3
O U T 2
R
O S C
P B 1
V S S
O U T 1
13
P B 2
P B 0
O U T 5
O U T 4
O U T 3
O U T 2
O U T 1
November 8, 1999
HT84XXX
V
E A S Y 1 6
D D
P A 0
V D D
P A 1
P A 2
P A 3
8 0 5 0
T R 1
T R 5
T R 9
T R 2
T R 6
T R 1 0
T R 3
T R 7
T R 1 1
T R 4
T R 8
T R 1 2
T R 1
T R 5
T R 9
T R 1 3
T R 2
T R 6
T R 1 0
T R 1 4
T R 3
T R 7
T R 1 1
T R 1 5
T R 4
T R 8
T R 1 2
T R 1 6
T R 1 3
T R 1 4
T R 1 5
T R 1 6
A U D 0
P B 7
8 0 5 0
A U D 1
P B 6
P B 5
P B 4
P B 3
O S C
R
O S C
P B 1
V S S
V
P B 2
P B 0
E A S Y 2 0
D D
P A 0
V D D
P A 1
P A 2
P A 3
8 0 5 0
O U T 4
O U T 3
O U T 2
O U T 1
T R 1 7
T R 1 8
T R 1 9
T R 2 0
A U D 0
P B 7
8 0 5 0
A U D 1
P B 6
P B 5
P B 4
P B 3
R
O S C
O S C
P B 2
P B 1
V S S
P B 0
O U T 3
O U T 2
O U T 1
14
April 26, 2000
HT84XXX
E A S Y 2 4
V
P A 0
D D
V D D
P A 1
P A 2
P A 3
8 0 5 0
T R 1
T R 5
T R 9
T R 1 3
T R 1 7
T R 2 1
T R 2
T R 6
T R 1 0
T R 1 4
T R 1 8
T R 2 2
T R 1 9
T R 2 3
T R 3
T R 7
T R 1 1
T R 1 5
T R 4
T R 8
T R 1 2
T R 1 6
T R 2 0
T R 2 4
T R 1
T R 5
T R 9
T R 1 3
T R 1 7
T R 2 1
T R 2
T R 6
T R 1 0
T R 1 4
T R 1 8
T R 2 2
T R 3
T R 7
T R 1 1
T R 1 5
T R 1 9
T R 2 3
T R 4
T R 8
T R 1 2
T R 1 6
T R 2 0
T R 2 4
A U D 0
P B 7
8 0 5 0
A U D 1
P B 6
P B 5
P B 4
P B 3
O S C
R
O S C
P B 2
P B 1
V S S
P B 0
E A S Y 2 8
V
P A 0
D D
V D D
P A 1
P A 2
P A 3
8 0 5 0
O U T 2
O U T 1
T R 2 5
T R 2 6
T R 2 7
T R 2 8
A U D 0
P B 7
8 0 5 0
A U D 1
P B 6
P B 5
P B 4
P B 3
R
O S C
O S C
P B 2
P B 1
V S S
P B 0
O U T 1
15
April 26, 2000
HT84XXX
V
E A S Y 3 2
D D
P A 0
V D D
P A 1
P A 2
8 0 5 0
A U D 0
8 0 5 0
A U D 1
P A 3
T R 1
T R 5
T R 9
T R 1 3
T R 1 7
T R 2 1
T R 2 5
T R 2
T R 6
T R 1 0
T R 1 4
T R 1 8
T R 2 2
T R 2 6
T R 3
T R 7
T R 1 1
T R 1 5
T R 1 9
T R 2 3
T R 2 7
T R 4
T R 8
T R 1 2
T R 1 6
T R 2 0
T R 2 4
T R 2 8
T R 2 9
T R 3 0
T R 3 1
T R 3 2
P B 7
P B 6
P B 5
P B 4
O S C
R
O S C
V S S
V
P B 3
P B 2
P B 1
P B 0
E A S Y 6 4
D D
P A 3
V D D
P A 2
P A 1
8 0 5 0
A U D 0
8 0 5 0
P A 0
A U D 1
P B 6
P B 5
O S C
R
P B 4
P B 3
O S C
V S S
P B 2
P B 1
P B 0
T R 1
T R 2
T R 3
T R 4
T R 5
T R 6
T R 7
T R 9
T R 1 0
T R 1 1
T R 1 2
T R 1 3
T R 1 4
T R 1 5
T R 1 7
T R 1 8
T R 1 9
T R 2 0
T R 2 1
T R 2 2
T R 2 3
T R 2 5
T R 2 6
T R 2 7
T R 2 8
T R 2 9
T R 3 0
T R 3 1
T R 3 3
T R 3 4
T R 3 5
T R 3 6
T R 3 7
T R 3 8
T R 3 9
T R 4 1
T R 4 2
T R 4 3
T R 4 4
T R 4 5
T R 4 6
T R 4 7
T R 4 9
T R 5 0
T R 5 1
T R 5 2
T R 5 3
T R 5 4
T R 5 5
T R 5 7
T R 5 8
T R 5 9
T R 6 0
T R 6 1
T R 6 2
T R 6 3
T R 8
T R 1 6
T R 2 4
T R 3 2
T R 4 0
T R 4 8
T R 5 6
T R 6 4
P B 7
Note: In Easy 64 mode, only falling edge trigger can be used in input state
In Easy 64 mode, the path command ²TRn?L:pathname² and ²TRn?H:pathname² are
invalid
16
April 26, 2000
HT84XXX
Push-pull amplifilter application
V
D D
8 0 5 0
4 7 m F
V D D
P A 0
A U D 0
P A 1
P A 2
P A 3
P B 7
8 5 5 0
P B 6
4 7 0 W
V
P B 5
D D
P B 4
P B 3
8 0 5 0
P B 2
A U D 1
P B 1
4 7 m F
P B 0
O S C
8 5 5 0
4 7 0 W
IN P U T 1
IN P U T 2
IN P U T 3
IN P U T 4
O U T 8
O U T 7
O U T 6
O U T 5
O U T 4
O U T 3
O U T 2
O U T 1
V S S
R
O S C
OP amplifilter application
V
D D
P A 0
V D D
0 .1 m F
T o P o w e r
A m p
1 0 k W
P A 1
A U D 0
P A 2
P A 3
5 6 0 W
P B 7
P B 6
0 .1 m F
P B 5
A U D 1
T o P o w e r
A m p
1 0 k W
P B 4
5 6 0 W
P B 3
P B 2
P B 1
P B 0
O S C
IN P U T 2
IN P U T 3
IN P U T 4
O U T 8
O U T 7
O U T 6
O U T 5
O U T 4
O U T 3
O U T 2
O U T 1
V S S
R
17
IN P U T 1
O S C
April 26, 2000
HT84XXX
Application Notes
Easy FormatTM
The syntax of the Easy FormatTM consists of four major parts. They are format and audio file declaration part, input states declaration part, output states declaration part and path command part.
The architecture of the Easy FormatTM program is shown as follows:
EASY n
; Comment
; Format and audio file declaration part
....
Stereo/Mono
; Two AUD output or single AUD output
INPUT STATES
; Input states declaration part
....
OUTPUT STATES
; Output states declaration part
....
PATHS
; Path command part
....
Note: Easy FormatTM is a trademark of Grow With Me, Inc.
Format and voice/melody file declaration
In this area the format and audio file declaration are used to define the number of input and output
as well as declare the audio format.
Syntax: EASY n
The EASY n command is used to define the maximum number of trigger input in the application circuit. The alphanumeric n represents the number of trigger input where n has the choice from 4 to 64
with a scale 4. However, the determination of trigger input reflects the number of output. The relation of the number of I/O is shown in the following table.
EASY n
TRn
OUTn
EASY 4
TR1, TR2, TR3, TR4
OUT1, OUT2, ...., OUT7
EASY 8
TR1, TR2, ...., TR8
OUT1, OUT2, ...., OUT6
EASY 12
TR1, TR2, ...., TR12
OUT1, OUT2, ...., OUT5
EASY 16
TR1, TR2, ...., TR16
OUT1, OUT2, ...., OUT4
EASY 20
TR1, TR2, ...., TR20
OUT1, OUT2, OUT3
EASY 24
TR1, TR2, ...., TR24
OUT1, OUT2
EASY 28
TR1, TR2, ...., TR28
OUT1
EASY 32
TR1, TR2, ...., TR32
EASY 64
TR1, TR2, ...., TR64
* refer to the application circuit
18
April 26, 2000
HT84XXX
Syntax:
voice_file/compression_method
melody_file
tone_file
The source audio files must be included in your Easy program. The audio files include the voice files
with the extended name .PCM or .WAV, the melody files with .MID or .MLD format and the tone files
with Holtek¢s .HT8 format. The compression methods of voice files have three options such as m-law
PCM, PCM8 and AD4.
Example:
voice1.wav/pcm8
; #0 voice files declaration
voice2.pcm/ad4
; #1
melody1.mid
; #2 melody files declaration
melody2.mld
; #3
tone1.ht8
; #4 tone files declaration
Stereo/Mono:
The audio output selection. If the audio output is declared as ²Stereo², the channel
1 voice will output via AUD1 and the channel 2 voice will output via AUD2. If the
audio output is declared as ²Mono², the channel 1 and channel 2 voices will mixedly
output via AUD1 and AUD2 is invalid. The default declaration is ²Mono². The audio file compressed by AD4 cannot output through channel 2. If the melody file outputs through channel 2, the melody file cannot include any channel 1 instructions.
Input states declaration
Syntax:
INPUT STATES
;
TRn
....
statename:
[rising_edge_path][/falling_edge_path]
....
The bracket [ ] is denoted as optional existence. If the path is assigned as ²X², the input trigger signal
is ignored. Unassigned trigger paths will automatically be assigned as ²X². When TRn detects a rising edge or a falling edge signal, the path name of the rising edge path or falling edge path will be executed. The statename and path label can be any name defined by the user. The ²/² denotes the falling
edge path. The maximum number of statename are 256 and the maximum number of different pathname
are 128.
Example:
INPUT STATES
; input states declaration
;
TR1
TR2
TR3
Run:
P12Start
/P13Stop
P14Go/P15Pause
where ²Run² denotes the input statename and ²P12Start², ²/P13Stop², ²P14Go² and ²/P15Pause² are
all pathnames. When a rising edge signal triggers the TR1, then the path of P12Start will be executed. And if a falling edge signal triggers the TR1, then the signal is ignored, etc.
19
April 26, 2000
HT84XXX
Output states declaration
Syntax:
OUTPUT STATES
;
OUTn
statename:
OutputMode ....
....
The possible output mode are listed and described on the following table. The maximum number of
output state are 256.
Output Mode
Description
X
Set OUTn to input mode with pull-high resistor
H
Set the output pins to logic high
L
Set the output pins to logic low
P+
Send a (+) pulse train to output pins
P-
Send a (-) pulse train to output pins
SP+
Send a plus single pulse to output pins
SP-
Send a minus single pulse to output pins
Example:
OUTPUT STATES
; output states declaration
;
OUT1
OUT2
SirenOn:
P+
L
where ²SirenOn² denotes the output statename. Executing ²SirenOn² in the path command will send
a positive pulse train to PB0 and send a logic low to PB1.
Path command definition
Syntax:
PATHS
pathname:
path command
....
The pathname is defined according to the user¢s desire. The elements of the path command are listed
and described on the following table. Each path equation consists of many path commands and each
command is separated by one or more space. In order to increase the program readability if the path
commands exceed the screen display you can break the path command to the next line and put the
symbol ²&² in front of the new line.
20
April 26, 2000
HT84XXX
Path_Command
Description
Input statename
To active input state
Output statename
To active output state
Pathname
To execute the specified path
VAR=pathname
Define the variable path
VAR
To execute the variable path
Volume_1=n
Define the volume 1 value (n=0~15)
Volume_2=n
Define the volume 2 value (n=0~15)
Samplerate_1=n
Define the sampling rate 1 value
Samplerate_2=n
Define the sampling rate 2 value
Delay(n)
To delay n (min=0.1s) (n=0.1~65), fOSC=4MHz
TRn?H:pathname
If TRn is logic High, then the pathname is executed.
TRn?L:pathname
If TRn is logic Low, then the pathname is executed.
Flashrate=n
Set the output pulse rate to ²n² pulses per second, where n can be
assigned as 1, 2, 3, ..., 12
FlashrateT=n
Set the output pulse rate after the melody tempo,
n=1, 2, 3, ..., 12
FlashrateV=n
Set the output pulse rate after the volume,
n=1, 2, ..., 12
END
Enter power down mode
Mi=PB
Read Port B to Mi
STOP1
Stop the sound of channel 1 playback
STOP2
Stop the sound of channel 2 playback
Mi=data
Set the contents of Mi to be data
Mi=Mj
Set the contents Mi to be Mj
Mi(bn)=1 or 0
Set bit bn to be 1 or 0, bn=0~7
Mi=Mj+data
Add immediate data with Mj to Mi
Mi=Mi+Mj
Add Mi with Mj to Mi
Mi=Mj.AND.data
And immediate data with Mj to Mi, data=0~255
Mi=Mj.OR.data
OR immediate data with Mj to Mi, data=0~255
Mi=Mj.XOR.data
XOR immediate data with Mj to Mi, data=0~255
Mi?data:pathname
If Mi=data then pathname is executed
Mi?Mj:pathname
If Mi=Mj then pathname is executed.
Mi(bn)?1:pathname
If the bit bn of Mi is ²1² then the pathname is executed.
Mi(bn)?0:pathname
If the bit bn of Mi is ²0² then the pathname is executed.
21
April 26, 2000
HT84XXX
Path_Command
Description
Mi:[Path1, Path2,
Path3, .... Pathn]
Path1 is executed when Mi=1;
Path2 is executed when Mi=2;
....
Pathn is executed when Mi=n
Random(Mi)
Get a random code and put it to Mi
Timert: timer_path
Initial the timer. If time out then timer_path is executed, t=0.1~65 sec.
TimerON
Start the timer counter
TimerOFF
Stop timer counter
n*soundfile, n*#N or
#N
Play the soundfile n times
#N is the N¢th soundfile which is defined in the audio file declaration part.
The starting number is 0
[n*soundfile] or
[repeat *soundfile]
Play the soundfile n times or repeatedly via channel 2 and simultaneously
execute the next path command.
Wait
Stop executing the next path command until the channel 2 soundfile is
terminated.
Note: The n of TRn ranges from 1 to 32
²Volume_1=15² is equal to ²Volume=15²
²Samplerate_1=4000² is equal to ²Samplerate=4000², ²4000² means that the sampling rate is
4kHz.
The Mi, Mj are working registers (i, j=0, 1, 2, ..., 10), the M0~M4 are dedicated for users, the
others are shared with VAR and Timer command.
Register
Command
Comment
M0~M4
¾
M5, M6
VAR
Normal register
If the VAR instruction is used, the M5, M6 will be invalid.
M7~M10
Timer
If the Timer instruction are used, the M7~M10 will be invalid.
Example:
EASY 4
INPUT STATES
;
TR1
TR2
TR3
TR4
start:
/P1
X
X
X
PATHS
POWERON:
start
END
where ²POWERON² is a reserved pathname and provides the initial setting. When the power is
turned on, a falling edge trigger in TR1 is accepted and others are all ignored.
22
April 26, 2000
HT84XXX
Application 1 ¾ One shot, nonretriggerable
EASY 4
voice.wav/pcm8
;#0 sound file declaration
INPUT STATES
;
TR1
TR2
TR3
TR4
state1:
/path1
X
X
X
busy:
X
X
X
X
state1
END
PATHS
POWERON:
state1
END
path1:
busy
1*voice
T R 1
A U D
Application 2 ¾ One shot, retriggerable by itself
EASY 4
voice.wav/pcm8
;#0 sound file declaration
INPUT STATES
;
TR1
TR2
TR3
TR4
state1:
/path1
X
X
X
POWERON:
state1
END
path1:
1*voice
END
PATHS
T R 1
A U D
23
April 26, 2000
HT84XXX
Application 3 ¾ One shot, retriggerable by the other pin only
EASY 4
voice1.wav/pcm8
;#0 sound file declaration
voice2.wav/pcm8
;#1
voice3.wav/pcm8
;#2
voice4.wav/pcm8
;#3
INPUT STATES
;
TR1
TR2
TR3
TR4
state0:
/path1
/path2
/path3
/path4
state1:
X
/path2
/path3
/path4
state2:
/path1
X
/path3
/path4
state3:
/path1
/path2
X
/path4
state4:
/path1
/path2
/path3
X
POWERON:
state0
END
path1:
state1
#0
state0
END
path2:
state2
#1
state0
END
path3:
state3
#2
state0
END
path4:
state4
#3
state0
END
PATHS
T R 1
T R 2 ~ T R 4
A U D
# 0
# 0
# (1 ~ 3 )
24
April 26, 2000
HT84XXX
Application 4 ¾ Level hold, retriggerable by the other pin only
EASY 4
voice1.wav/pcm8
;#0 sound file declaration
voice2.wav/pcm8
;#1
voice3.wav/pcm8
;#2
voice4.wav/pcm8
;#3
INPUT STATES
;
TR1
TR2
TR3
TR4
state0:
/path1
/path2
/path3
/path4
state1:
path11
/path2
/path3
/path4
state2:
/path1
path11
/path3
/path4
state3:
/path1
/path2
path11
/path4
state4:
/path1
/path2
/path3
path11
POWERON:
state0
END
path1:
state1
#0
path1
path2:
state2
#1
path2
path3:
state3
#2
path3
path4:
state4
#3
path4
path11:
state0
END
PATHS
T R 1
T R 2 ~ T R 4
A U D
# 0
# 0
# 0
# (1 ~ 3 )
25
April 26, 2000
HT84XXX
Application 5 ¾ LED output, direct mode
EASY 4
voice1 .wav/pcm8 ;#0 sound file declaration
INPUT STATES
;
TR1
TR2
TR3
TR4
state0:
/path1
X
X
X
OUTPUT STATES
;OUT
1
2
alarm:
P+
L
standby:
L
H
turnoff:
X
X
POWERON:
state0
flashrate=6Hz
END
path1:
alarm
#0
delay(2)
PATHS
standby
turnoff
END
Application 6 ¾ LED output matrix mode
EASY 4
INPUT STATES
;
TR1
state0:
/path0
OUTPUT STATES
;
OUT1 OUT2 OUT3 OUT4
OUT5
OUT6
OUT7
LED1:
P+
L
L
L
H
H
H
LED2:
L
P+
L
L
H
H
H
LED3:
L
L
P+
L
H
H
H
LED4:
P+
L
L
H
L
H
H
LED5:
L
P+
L
H
L
H
H
LED6:
L
L
P+
H
L
H
H
LED7:
P+
L
L
H
H
L
H
LED8:
L
P+
L
H
H
L
H
LED9:
L
L
P+
H
H
L
H
LED10:
P+
L
L
H
H
H
L
LED11:
L
P+
L
H
H
H
L
LED12:
L
L
P+
H
H
H
L
turnoff:
X
X
X
X
X
X
X
26
April 26, 2000
HT84XXX
PATHS
POWERON:
state0 M0=0
path0:
M0=M0+1
flashrate=3Hz
END
& M0:[P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12]
P1:
LED1
delay(2)
turnoff
END
P2:
LED2
delay(2)
turnoff
END
P3:
LED3
delay(2)
turnoff
END
P4:
LED4
delay(2)
turnoff
END
P5:
LED5
delay(2)
turnoff
END
P6:
LED6
delay(2)
turnoff
END
P7:
LED7
delay(2)
turnoff
END
P8:
LED8
delay(2)
turnoff
END
P9:
LED9
delay(2)
turnoff
END
P10:
LED10
delay(2)
turnoff
END
P11:
LED11
delay(2)
turnoff
END
P12:
M0=0
LED12
delay(2)
turnoff
27
END
April 26, 2000
HT84XXX
Application 7 ¾ Police car
This is a full program application example to demonstrate how Easy Format handles a complicated
design requirement. All the work is to be done on a single page.
S T A R T
A C C E L
S IR E N
L 1
B R A K E
L 2
There are four input trigger buttons and two output pins to drive two LEDs.
· BUTTON #1: Turn ON (START) or OFF the engine.
· BUTTON #2: Gas pedal to give ACCELERATION sound from idle and then keep on at a steady
running sound.
· BUTTON #3: SIREN sound On/Off: toggle ON and toggle Off.
· BUTTON #4: BRAKE, triggers deceleration sound and then brings the car to idle.
· LEDs OUTPUTs: Blinks in opposite phase when the Siren sound is on. That is when one light is on,
the other light is off in an alternating pattern.
· TIME OUT REQUIREMENTS: every sound needs to be automatically shut down after a specified
period if no more trigger signal is received.
Easy FormatTM application example: Police Car flow chart
ID L E
P 1 2 S T A R T
P 2 3 A C C E L
P 3 2 B R A K E
P 2 5 S IR E N O N
P 2 1 S T A R T
P 1 3 A C C E L
S T O P
P 5 3 S IR E N O N
R U N
P 1 4 S IR E N O N
P 5 3 S IR E N O F F
S IR E N + R U N
P 5 4 B R A K E
P 4 1 S IR E N O F F
P 4 5 A C C E L
S IR E N
28
April 26, 2000
HT84XXX
EASY 4
**********************************************************************
;* voice file define
**********************************************************************
StartSnd.wav/ad4
IdleSnd.wav/ad4
AccelSnd.wav/ad4
RunSnd.wav/ad4
DecelSnd.wav/ad4
SirenSnd.wav/ad4
SiRunSnd.wav/ad4
*********************************************************************
;* I/O States
*********************************************************************
INPUT STATES
;
TR1
TR2
TR3
TR4
;
Start
Accel
Siren
Brake
StopCar:
/P12Start /P13Accel
/P14SirenOn
X
Idle:
/P21Start /P23Accel
/P25SirenOn
X
Run:
X
X
/P35SirenOn
/P32Brake
Siren
X
/P45Accel
/P41SirenOff
X
SirenRun
X
X
/P53SirenOff
/P54Brake
OUT1
OUT2
OUTPUT STATES
;
SirenOn:
P+
P-
SirenOff:
H
H
*********************************************************************
;* Paths
*********************************************************************
Paths
POWERON:
StopCar
SirenOff
FLASHRATE=6Hz
P12Start:
Idle
1*StartSnd 10*IdleSnd
P21Start:
StopCar
P13Accel:
Run
END
PowerDown
END
2*IdleSnd
1*AccelSnd
20*RunSnd
& PowerDown
29
April 26, 2000
HT84XXX
P14SirenOn:
Siren
SirenOn
10*SirenSnd
SirenOff
PowerDown
P41SirenOff:
StopCar
P23Accel:
Run
1*AccelSnd
20*RunSnd
END
PowerDown
P32Brake:
Idle
1*DecelSnd
10*idleSnd
PowerDown
P25SirenOn:
1*AccelSnd
P35SirenOn:
SirenRun
SirenRun
SirenOn
P53SirenOff:
SirenOff
P45Accel:
P25SirenOn
Run
P54Brake:
1*DecelSnd
SirenOn
20*RunSnd
Siren
10*SiRunSnd
10*SiRunSond
SirenOn
PowerDown
PowerDown
PowerDown
10*SirenSnd
& PowerDown
PowerDown:
SirenOff
StopCar
End
30
April 26, 2000
HT84XXX
Holtek Semiconductor Inc. (Headquarters)
No.3 Creation Rd. II, Science-based Industrial Park, Hsinchu, Taiwan, R.O.C.
Tel: 886-3-563-1999
Fax: 886-3-563-1189
Holtek Semiconductor Inc. (Taipei Office)
5F, No.576, Sec.7 Chung Hsiao E. Rd., Taipei, Taiwan, R.O.C.
Tel: 886-2-2782-9635
Fax: 886-2-2782-9636
Fax: 886-2-2782-7128 (International sales hotline)
Holtek Semiconductor (Hong Kong) Ltd.
RM.711, Tower 2, Cheung Sha Wan Plaza, 833 Cheung Sha Wan Rd., Kowloon, Hong Kong
Tel: 852-2-745-8288
Fax: 852-2-742-8657
Copyright ã 2000 by HOLTEK SEMICONDUCTOR INC.
The information appearing in this Data Sheet is believed to be accurate at the time of publication. However, Holtek
assumes no responsibility arising from the use of the specifications described. The applications mentioned herein are
used solely for the purpose of illustration and Holtek makes no warranty or representation that such applications
will be suitable without further modification, nor recommends the use of its products for application that may present a risk to human life due to malfunction or otherwise. Holtek reserves the right to alter its products without prior
notification. For the most up-to-date information, please visit our web site at http://www.holtek.com.tw.
31
April 26, 2000
Similar pages