Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products
or to discontinue any product or service without notice, and advise customers to obtain the latest
version of relevant information to verify, before placing orders, that information being relied on
is current and complete. All products are sold subject to the terms and conditions of sale supplied
at the time of order acknowledgment, including those pertaining to warranty , patent infringement,
and limitation of liability.
TI warrants performance of its semiconductor products to the specifications applicable at the
time of sale in accordance with TI’s standard warranty. Testing and other quality control
techniques are utilized to the extent TI deems necessary to support this warranty . Specific testing
of all parameters of each device is not necessarily performed, except those mandated by
government requirements.
Customers are responsible for their applications using TI components.
In order to minimize risks associated with the customer’s applications, adequate design and
operating safeguards must be provided by the customer to minimize inherent or procedural
hazards.
TI assumes no liability for applications assistance or customer product design. TI does not
warrant or represent that any license, either express or implied, is granted under any patent right,
copyright, mask work right, or other intellectual property right of TI covering or relating to any
combination, machine, or process in which such semiconductor products or services might be
or are used. TI’s publication of information regarding any third party’s products or services does
not constitute TI’s approval, warranty or endorsement thereof.
Copyright 2000, Texas Instruments Incorporated
How to Use This Manual
This document contains the following chapters:
Chapter 1 –Introduction to the MSP53C391 and MSP53C392 Speech
Chapter 2 –MSP53C391 Hardware Description
Chapter 3 –MSP53C392 Hardware Description
Chapter 4 –MSP53C391 and MSP53C392 Software Description
Appendix A –Editing Tools and Data Preparation
Preface
Read This First
Synthesizers
Appendix B –FM Synthesis
Appendix C –Listing of FMequM2.inc
Appendix D –MSP53C391/392 Timing Considerations
Appendix E –Listing of FM2INTR1.inc
Appendix F –MSP53C391 and MSP53C392 Data Sheet
Related Documentation From Texas Instruments
MSP50x3x Mixed-Signal Processor User’s Guide
(Literature Number SLOU006B)
Read This First
iii
iv
Contents
Contents
1Introduction to the MSP53C391 and MSP53C392 Speech Synthesizers1-1. . . . . . . . . . . . . .
MSP53C391 and MSP53C392 are standard slave synthesizers from Texas
Instruments that accept compressed speech data from another microprocessor and produce speech with that data. This allows the MSP53C391 and
MSP53C392 to be used with a master microprocessor in the various speech
products including electronic learning aids, games, and toys.
The TI MSP53C391 and MSP53C392 support several different speech synthesis algorithms to permit tradeoffs to meet the different price performance
requirements of different markets. They also incorporate a two-channel FM
synthesis routine for music generation.
Both the MSP53C391 and MSP53C392 are special programs that run on the
MSP50C3x device. For more information about the MSP50C3x, please refer
to the
MSP50x3x User’s Guide
(literature number: SLOU006B)
1.2Features
Wide ranges of algorithms are incorporated in one chip. This allows the
user to choose from a low bit rate to high-quality synthesizing routines for
their application. Algorithms included are:
Software selectable 8-kHz or 10-kHz speech sample rate
Three different interface options to support different pin count require-
ments
32-Ω speaker direct drive capability
Internally generated clock requires no external components
Maximum 10-µA standby current in sleep mode
Digital volume control
Built-in, two general-purpose output pins for MSP53C391 pin expansion
1-2
1.3MSP53C391 and MSP53C392 Comparison
The MSP53C391 is optimized to support a 4-bit wide data transfer protocol.
The MSP53C392 is optimized to support an 8-bit wide data transfer protocol.
The use of the 4-bit wide protocol in the MSP53C391 frees up some I/O pins
that can be used for other purposes. These pins (EOS and BUSY) can be used
to simplify the interface by minimizing the need to periodically poll the
MSP53C391 for its current status.
The use of the 8-bit wide protocol in the MSP53C392 provides a more efficient
data transfer.
A detailed comparison of the two devices is listed in Table 1–1.
Table 1–1. MSP53C391 and MSP53C392 Comparison
Number of Data Lines4 bit8 bit
Number of Control Lines2 (Strobe & R/W)2 (Strobe & R/W)
Data RequestSupportedN/A
Separate EOS Line for Detecting
End-of-Speech
Pin ExpansionTwo expansion pinsN/A
MSP53C391 and MSP53C392 Comparison
MSP53C391MSP53C392
SupportedN/A
Introduction to the MSP53C391 and MSP53C392 Speech Synthesizers
1-3
Pin Assignments and Description
I/O
DESCRIPTION
1.4Pin Assignments and Description
Figure 1–1 shows the pin assignments for the MSP53C391. Table 1–2 provides pin functional descriptions. Figure 1–2 shows the pin assignments for
the MSP53C392. Table 1–3 shows the pin functional descriptions.
Figure 1–1. MSP53C391 Pin Assignments
MSP53C391
N PACKAGE
(TOP VIEW)
DATA2/EOS
DATA1
DATA0
OUT2
OUT1
EOS
R/W
OSC IN
1
2
3
4
5
6
7
8
16
15
14
13
12
11
10
9
DATA3/BUSY
STROB
IRQ
DAC+
DAC–
V
DD
V
SS
INIT
Table 1–2. MSP53C391 Terminal Functions
PIN
NAMENO.
DAC+13OD/A output. This output pulses high for positive output values. It remains low
when negative values are output.
DAC–12OD/A output. This output pulses high for negative output values. It remains
low when positive values are output.
DATA 0–33,2,1,16I/OData lines
EOS6OEnd of speech signal. Output high when end of speech is reached.
INIT9IInitialize input. When INIT goes low , the clock stops, the MSP53C391 goes into
low-power mode, the program counter is set to zero, and the contents of the
RAM are retained. An INIT
IRQ14ONegative-edge trigger interrupt request line. Connect to the external inter-
rupt of the master MCU for interrupt mode operation.
OUT 1–25,4OGeneral-purpose output ports used for pin expansion
OSC IN8IThis signal should be connected to VSS.
R/W7IRead/write select signal. Set high for read operations or cleared low for
write operations by the master processor.
STROB15IStrobe signal for read and write operations. Pulsed low for read or write
operations
V
DD
V
SS
11–5-V nominal supply voltage
10–Ground pin
pulse of 1 µs is sufficient to reset the processor.
1-4
Figure 1–2. MSP53C392 Pin Assignments
I/O
DESCRIPTION
MSP53C392
N PACKAGE
(TOP VIEW)
Pin Assignments and Description
DATA6/EOS
DATA5
DATA4
DATA3
DATA2
DATA1
R/W
OSC IN
1
2
3
4
5
6
7
8
16
15
14
13
12
11
10
9
DATA7/BUSY
STROB
DATA0
DAC+
DAC–
V
DD
V
SS
INIT
Table 1–3. MSP53C392 Terminal Functions
PIN
NAMENO.
DAC+13OD/A output. This output pulses high for positive output values. It remains
low when negative values are output.
DAC–12OD/A output. This output pulses high for negative output values. It remains
low when positive values are output.
DATA 0–714,6,5,4,
3,2,1,16
INIT9IInitialize input. When INIT goes low, the clock stops, the MSP53C392 goes
OSC IN8IThis signal should be connected to Vss.
R/W7IRead/write signal
STROB15IStrobe signal for read/write
V
DD
V
SS
11–5-V nominal supply voltage
10–Ground pin
I/OData lines
into low-power mode, the program counter is set to zero, and the contents of
the RAM are retained. An INIT
pulse of 1 µs is sufficient to reset the processor .
Introduction to the MSP53C391 and MSP53C392 Speech Synthesizers
1-5
D/A Information
1.5D/A Information
Two-Pin Push Pull (Option 1) is selected in MSP53C391 and MSP53C392 that
can directly drive a 32-Ω speaker . Please refer to the
Processor Users Guide
on the D/A and amplifier circuit.
1.6Algorithms Supported
LPC:D6 and 5220 format. Data rates 1.5 to 3 kbps at an 8-kHz sample
MELP: Data rates range form 2kbps ~ 3.5 kbps at an 8-kHz sample rate
CELP: Data rates can be selected form 4.2 kbps ~ 10.7kbps at an 8-kHz
sample rate
MSP50x3x Mixed Signal
(literature number: SPSU006B) for more information
rate
PCM:8 bit. Data rates is 64 kbps for 8 kHz sampling
FM: Frequency modulation for two-channel musical instrument
The MSP53C391 accepts data from the master microprocessor across four
data lines. The transfer of data is controlled by two control lines (R/W and
STROB). The data is loaded to an internal buffer and the synthesis process
reads the data from the internal buffer as needed. The MSP53C391 signals
that it is
condition that would prevent the MSP53C391 from accepting new data. This
signal is communicated to the master microprocessor using either the IRQ
BUSY signals.
Depending on the number of available pins on the master microprocessor,
three different connection options are provided to connect the master microprocessor to the MSP53C391. Whichever method is used, two operations
must be accomplished: 1) Determining if the MSP53C391 is ready to accept
new data, and if it is ready, 2) writing new data to the MSP53C391.
Two control lines are provided to enable the master microprocessor to accomplish these two tasks, STROB
not
ready to accept data when the buffer is full, or there is some other
or
and R/W.
The R/W line determines whether a read or a write operation is done to the
MSP53C391 when the STROB
is pulsed low. If the R/W is high, then a read
from the MSP53C391 is done when the STROB is pulsed low. If the R/W is low ,
then data is written to the MSP53C391 when the STROB is pulsed low.
Two signals are provided to determine if the MSP53C391 is ready or not ready
to accept new data. The BUSY
signal shares the same pin as the DA TA3 signal. During a read operation, this signal goes high to signal that the
MSP53C391 is ready for a write operation. If this signal is low during a read
operation, then the MSP53C391 is
An alternative to polling the BUSY
not
ready for a write operation.
signal is provided by the IRQ signal. This
signal goes from high to low when the MSP53C391 is ready for a write operation.
The EOS signal indicates whether or not the end-of-speech has been reached
by the synthesis process. It is set high by the MSP53C391 when the stop code
in the data stream is reached. This signal is provided on two pins. It can be read
directly on pin 6 (EOS), or during a read operation on pin 1 (DATA2/EOS).
Three methods are provided for interfacing the MSP53C391 to various microprocessors. This allows the designer to make trade-offs between the number
of device pins being used and the algorithm complexity for the interface to the
master microprocessor.
2-2
2.2Signal Description
Table 2–1. MSP53C391 Signal Description
Signal Description
Pin
NameNo.
DAC+
DAC–
DATA3/BUSY16BUSY signal can be obtained on DATA 3 during read operation. A high signal
DATA2/EOS1The EOS signal can be obtained on the DATA2 pin during a read operation. This
STROB15This is an active low strobe signal for the reading and writing operation from the
R/W7Read/write signal from master microprocessor. A high signal for a read operation
IRQ14When the data latched into the MSP53C391 is read and the MSP53C391 device is
EOS6This is an active high output signal that is asserted when end-of-speech is
OUT1–25,4General-purpose output port that can be controlled by the master microprocessor.
DATA 0–33,2,1,16 4-bit bidirectional data line
INIT9Reset signal. A low pulse to reset the chip. It can also be used to stop the
12
13
PDM-style DAC used for speech output.
indicates that the MSP53C391 is
indicates that the MSP53C391 is busy and the master should not write any
command or data to MSP53C391.
signal is normally low, but goes high when the end-of-speech code is reached in
the data stream.
master microprocessor. The data to be read is available when the strobe is active
(low) for the read operation. The data on the data line is latched into the
MSP53C391 on the raising edge of the strobe signal for the write operation.
and a low signal for a write operation.
ready to accept more data, a negative edge interrupt signal is generated to
interrupt the master. For proper operation of the interrupt function, a negative edge
triggered external interrupt input pin is required on the master microprocessor.
reached. It indicates that the speech synthesis process is finished. When a high is
detected on the EOS line by the master microprocessor, dummy bytes are written
to the MSP53C391 to reset the EOS. The next transfer can then be initiated after
the EOS was de-asserted. EOS also appears on the DATA2 pin during a read
operation for adopting different interfacing methods.
MSP53C391 operation during speech synthesis. Following the rising edge of the
pulse, a delay of up to 5 ms will be required to permit the MSP53C391 to com-
INIT
pletely initialize its internal condition.
Description
not
busy and ready to accept data. A low signal
MSP53C391 Hardware Description
2-3
Master Microprocessor Interface Description
2.3Master Microprocessor Interface Description
2.3.1Method 1: Polling
This method is used when it is important to minimize the total number of interface pins between the master microprocessor and the MSP53C391. A total of
three control lines and 4 data lines are required for this method. The two status
bits can be read from the MSP53C391 by manipulating the R/W
lines and reading the data lines.
:Read/write signal
DATA 0–3: 4-bit data line
BUSY
is ready to accept data.
EOS:End-of-speech data. A high signal indicates end-of-speech. Two bytes of dummy data writen resets
the EOS to low .
INIT
:Active low reset signal. The master microprocessor should issue a reset signal to MSP53C391 after
B. When not being used, the EOS and IRQ pins should be left unconnected.
MASTER
15
Output Port
Output Port
9
Output Port
16
I/O Port
I/O Port
I/O Port
I/O Port
14
:Active low strobe signal
:Active low busy signal form MSP53C391. A high signal indicates that the MSP53C391 is not busy and
power up to properly initialize the MSP53C391 device.
STROB
7
R/W
INIT
DATA3/BUSY
1
DATA2/EOS
2
DATA1
3
DATA0
6
EOS
IRQ
MSP53C391
13
12
DAC+
DAC–
TO SPEAKER OR
AMPLIFIER/FILTER
2-4
Read Operation
Master Microprocessor Interface Description
1)The master microprocessor sets R/W high to indicate a read operation.
2)The master microprocessor sets STROB to low and reads the state of
BUSY and EOS.
3)The master microprocessor sets STROB
If the BUSY signal was high in step 2, the MSP53C391 is
high.
not
busy and is
ready to accept a write operation. If the BUSY signal was low in step 2, the
MSP53C391 is
not
ready to accept a write operation and the read operation
should be repeated until BUSY is asserted high.
If EOS was high in step 2, the synthesis process has reached the end of the
speech data stream. In this case, the master microprocessor should stop trying to send data and reset the MSP53C391 to allow it to accept additional commands or synthesis data.
The frequency of the polling operation should be optimized to the data rate of
the algorithm being used to synthesize speech. If the polling operation is too
frequent, the MSP53C391 spends too much time servicing the polling operation and the quality of the synthetic speech may be affected. If the polling operation is too infrequent, the internal buffer may run out of data and the synthesis process can become corrupted. Normally , a polling frequency of four times
the bit rates of the speech data provides optimal transfer characteristics.
Example:
For 6.2 kbps CELP the frequency of polling would be
Write Operation
6.2
4
n
n = the number of bits transfered at a time
1)The master processor should determine that the MSP53C391 is ready to
accept data by reading the BUSY signal as described previously.
2)The master microprocessor clears R/W low to indicate a write operation
3)The master microprocessor presents valid data to the four data pins
(DATA0 – DATA3).
4)The master microprocessor pulses the STROB signal low and then high
to latch the data to the MSP53C391 input data latch.
5)The master microprocessor should do a read operation to determine that
the MSP53C391 is ready to accept additional data before attempting to
write more data.
MSP53C391 Hardware Description
2-5
Master Microprocessor Interface Description
If the EOS signal is asserted high during the read operation, the end-of-speech
has been reached and a reset operation should be performed prior to sending
new commands or speech data. The reset can be done in one of two ways:
Pulsing the INIT pin low and then waiting for the MSP53C391 to re-initialize
itself or by writing two dummy bytes as described in the following.
RESET Operation
1)Perform a read operation to determine that both the EOS and BUSY signals are high.
2)If both the EOS and BUSY signals are high, write 2 bytes of dummy data
to the MSP53C391 by repeating the write operation four times as described previously.
2.3.2Method 2: Interrupt 1
In this method, the IRQ pin of the MSP53C391 is connected to an external interrupt input pin of the master microprocessor. When the MSP53C391 is
busy and is ready to accept data, the IRQ signal goes low and provides a negative edge to trigger an interrupt in the master processor. This minimizes the
need to constantly poll the MSP53C391 while waiting for it to become ready
to accept new data.
: Negative edge interrupt to master microprocessor when MSP53C391 is not busy and ready to accept data.
14
IRQ
6
EOS
Read Operation
Master Microprocessor Interface Description
1)The master microprocessor sets R/W high to indicate a read operation.
2)The master microprocessor sets STROB to low and reads the state of
BUSY and EOS.
3)The master microprocessor sets STROB high.
The EOS is used to signal that the end-of-speech has been reached. In this
case, the master microprocessor should stop trying to send data and act to reset the MSP53C391 so as to prepare it to accept additional commands or synthesis data.
In this method, the BUSY signal is not normally used. Instead, the IRQ signal
is used to signal the need for new speech data. It pulses low then high to produce a negative edge signal to the master microprocessor when the
MSP53C391 becomes ready to accept a new write operation. It will remain low
until a new nibble is written. The master microprocessor should immediately
initiate a write operation when the IRQ
signal goes low. If the master microprocessor delays for too long a time before writing new data, it is possible that the
buffer will empty and the synthesis process will be interrupted or the quality of
speech will be degraded.
Write Operation
1)The master microprocessor should clear all pending interrupts and enable
the external interrupt.
2)The master microprocessor writes the first nibble of data by presenting
valid data on DA TA0 – DA TA3, setting R/W low to indicate a write operation
and pulsing STROB low and high to latch the data into the MSP53C391
input latch.
Subsequent data is written following the falling edge of the IRQ signal.
3)The master microprocessor waits for a falling edge on the IRQ signal.
4)Master microprocessor sets R/W high and pulses the STROB to read the
EOS signal.
5)The master microprocessor clears R/W low to indicate a write operation
6)The master microprocessor presents valid data (first nibble of the dummy
data if EOS is high or nibble of speech data if EOS is low) to the four data
pins (DATA0 – DATA3).
MSP53C391 Hardware Description
2-7
Master Microprocessor Interface Description
7)The master microprocessor pulses the STROB signal low and then high
to latch the data to the MSP53C391 input data latch.
8)A read operation should be performed just before each write operation to
ensure that the end-of-speech has not been reached.
If the EOS signal is asserted high during the read operation, the end-of-speech
has been reached and a reset operation should be performed prior to sending
new commands or speech data. The reset can be done in one of two ways:
Pulsing the INIT
itself or by writing two dummy bytes as described the following.
RESET Operation
1)Perform a read operation to determine that the EOS signal is high.
2)If the EOS signal is high, write 2 bytes of dummy data to the MSP53C391
by repeating the write operation four times as described previously.
pin low and then waiting for the MSP53C391 to re-initialize
2.3.3Method 3: Interrupt 2
This method is similar to method 2. The only difference is performing the read
operation is not necessary because the EOS and IRQ
reads.
1)The master microprocessor should clear all pending interrupts and enable
the external interrupt.
2)The master microprocessor writes the first nibble of data by presenting
valid data on DA TA0 – DA TA3, tying R/W to ground indicates a write operation and pulsing STROB low and high to latch the data into the
MSP53C391 input latch.
Subsequent data is written following the falling edge of the IRQ signal.
3)The master microprocessor waits for a falling edge on the IRQ signal.
4)The master microprocessor checks the EOS signal to verify that the endof-speech has not been reached. If the EOS is high, the end-of-speech
has been reached and the master microprocessor should stop trying to
send data and should reset the MSP53C391 as described in the following.
If the EOS is low, the end-of-speech has not been reached and the write
operation should continue with step 5.
5)Tie R/W
to ground indicates a write operation
6)The master microprocessor presents valid data to the four data pins
(DATA0 – DATA3).
7)The master microprocessor pulses the STROB signal low and then high
to latch the data to the MSP53C391 input data latch.
If the EOS signal is asserted high in step 4 (shown previously), the end-ofspeech has been reached and a reset operation should be performed prior to
sending new commands or speech data. The reset can be done in one of two
ways: Pulsing the INIT
pin low and then waiting for the MSP53C391 to re-ini-
tialize itself or by writing two dummy bytes to the MSP53C391.
MSP53C391 Hardware Description
2-9
Master Microprocessor Interface Timing
2.4Master Microprocessor Interface Timing
2.4.1Timing Method 1: Polling
Data Transfer
STROB
R/W
DATA0 – 3
DATA3/BUSY
DATA2/EOS
NOTE A: State A: Polling the status by reading the BUSY
State B: Write operation
AAAAABAA
End-of-Speech
STROB
R/W
DATA0 – 3
DATA3/BUSY
DATA2/EOS
NOTE A: State A: EOS detected by reading DATA 2/EOS
State B: Dummy write. A 4-nibble dummy write resets the EOS for the next transfer.
State C: Wait until the part is ready to accept dummy data (BUSY
State D: Check to see if the device is busy or not.
ABDBDCDBB
and EOS
high).
2-10
2.4.2Timing Method 2: Interrupt 1
Data Transfer
Master Microprocessor Interface Timing
STROB
R/W
DATA0 – 3
DATA2/EOS
IRQ
NOTE A: State A: Read the EOS state
State B: Write operation
AABB
End-of-Speech
STROB
R/W
DATA0 – 3
DATA2/EOS
IRQ
NOTE A: State A: EOS detected by read DATA2/EOS
State B: Dummy write. A 4-byte dummy write resets the EOS for the next transfer.
ABBBB
MSP53C391 Hardware Description
2-11
Master Microprocessor Interface Timing
2.4.3Timing Method 3: Interrupt 2
Data Transfer
STROB
R/W
DATA0 – 3
EOS
IRQ
NOTE A: State A: Write operation
End-of-Speech
A
STROB
R/W
DATA0 – 3
EOS
IRQ
NOTE A: State A: EOS detected by read on pin 6
State B: Dummy write. A 4-nibble dummy write resets the EOS for the next transfer.
BBB B
AA
2-12
2.5MSP53C391 Device Initialization
For proper operation, the MSP53C391 device should be initialized by sending
the following command sequence of bytes:
F,F,F,F,0,A,0,1,0,0,F,F ,F,F,F,F
Following this command sequence, the normal command sequence options
are available as described in Section 4.2 and onwards.
The function of this sequence is to properly initialize the synthesis engine by
speaking a short selection of LPC prior to speaking selections using other synthesis algorithms.
This initialization needs to be performed:
1)After you apply power to the device, or
2)When you reset the part by toggling the INIT pin.
The MSP53C392 accepts data from the master microprocessor across the
eight data lines. The transfer of data is controlled by two control lines (R/W and
STROB). The data is loaded to an internal buffer and the synthesis process
reads the data from the internal buffer as needed. The MSP53C392 signals
that it is
condition that would prevent the MSP53C392 from accepting new data. This
signal is communicated to the master microprocessor using BUSY
The MSP53C392 accepts data across an 8-bit wide data connection that is
controlled using two control lines (R/W
accomplished: 1) Determining if the MSP53C392 is ready to accept new data,
and if it is ready, 2) writing new data to the MSP53C392.
Two control lines are provided to enable the master microprocessor to accomplish these two tasks, STROB and R/W .
not
ready to accept data when the buffer is full, or there is some other
signal.
and STROB). Two operations must be
The R/W line determines whether a read or a write operation is done to the
MSP53C392 when the STROB is pulsed low. If the R/W is high, than a read
from the MSP53C392 is done when the STROB is pulsed low. If the R/W is low ,
then data is written to the MSP53C392 when the STROB
is pulsed low.
The BUSY signal shares the same pin as the DA T A7 signal. During a read operation, this signal goes high to signal that the MSP53C392 is ready for a write
operation. If this signal is low during a read operation, then the MSP53C392
is
not
ready for a write operation.
The EOS signal shares the same pin as the DA TA6 signal. During a read operation, this signal normally goes low, but goes high to signal that the
MSP53C392 has encountered an end-of-speech code in the data stream.
A negative going pulse on the INIT line can be used to reset the device. An INIT
pulse of 1 µs is enough to reset the device. Following the rising edge of the INIT
pulse, a delay of up to 5 ms will be required to permit the MSP53C391 and
MSP53C392 to completely initialize its internal condition.
3-2
3.2Signal Description
Table 3–1. MSP53C392 Signal Description
Signal Description
Pin
NameNo.
DAC+
DAC–
DATA7/BUSY 16The BUSY signal can be obtained on DATA 7 during a read operation. A high
DATA6 / EOS1The EOS signal can be obtained on DATA 6 during a read operation. This is an
R/W7Read/write signal from master microprocessor. A high signal for a read operation
STROB15This is an active low strobe signal for the reading and writing operation form
DATA 0–714,6,5,4
INIT9Reset signal. A low pulse to reset the chip. It can also be used to stop the
12
13
3,2,1,16
PDM-style DAC used for speech output.
signal indicates that the MSP53C392 is
low signal indicates that the MSP53C392 is BUSY and master should not write
any command or data to MSP53C392.
active high signal that is asserted when end-of-speech is reached. It indicates
that the speech synthesis is finished. When a high is detected on EOS by the
master microprocessor, the MSP53C392 should be reset.
and a low signal for a write operation.
master microprocessor. The data to be read is available when the strobe is
active (low) for the read operation. The data on the data line is latched into the
MSP53C392 on the rising edge of the strobe signal for the write operation.
8-bit bidirectional data line
MSP53C392 operation during speech synthesis. Following the rising edge of the
pulse, a delay of up to 5 ms will be required to permit the MSP53C392 to
INIT
completely initialize its internal condition.
Description
not
BUSY and ready to accept data. A
MSP53C392 Hardware Description
3-3
Master Microprocessor Interface Description
3.3Master Microprocessor Interface Description
3.3.1Method 1: Polling
Three control lines and eight I/O data lines are used in this interface. Data is
written to the MSP53C392 device and the status can be read back. Two status
bits (BUSY
that the MSP53C392 is busy and signal the end-of-speech has been reached.
The interfacing diagram is shown in Figure 3–1:
and EOS) can be read back by the master microprocessor to signal
MASTER
MICROPROCESSOR
Output Port
Output Port
Output Port
I/O Port
I/O Port
I/O Port
I/O Port
I/O Port
I/O Port
I/O Port
I/O Port
15
7
9
16
1
2
3
4
5
6
14
MSP53C392
STROB
R/W
INIT
DATA7/BUSY
DATA6/EOS
DATA5
DATA4
DATA3
DATA2
DATA1
DATA0
13
12
DAC+
DAC–
TO SPEAKER OR
AMPLIFIER/FILTER
NOTE A: STROB
R/W
DATA 0–7: 8-bit data line
BUSY
is ready to accept data.
EOS:End-of-speech data. A high signal indicates end-of-speech. Two bytes of dummy data written resets
INIT
3-4
:Active low strobe signal
:Read/write signal
:Active low busy signal form MSP53C392. A high signal indicates that the MSP53C392 is not busy and
the EOS to low.
:Active low reset signal. The master microprocessor should issue a reset signal to MSP53C392 after
power up to properly initialize the MSP53C392 device.
Read Operation
Master Microprocessor Interface Description
1)The master microprocessor sets R/W high to indicate a read operation.
2)The master microprocessor sets STROB
to low and reads the state of
BUSY and EOS signals.
3)The master microprocessor sets STROB high.
If the BUSY
signal was high in step 2, the MSP53C392 is
not
busy and is ready
to accept a write operation. If the BUSY signal was low in step 2, the
MSP53C392 is
not
ready to accept a write operation and the read operation
should be repeated until BUSY is asserted high.
If EOS was high in step 2, the synthesis process has reached the end of the
speech data stream. In this case, the master microprocessor should stop trying to send data and reset the MSP53C392 to allow it to accept additional commands or synthesis data.
The frequency of the polling operation should be optimized to the data rate of
the algorithm being used to synthesize speech. If the polling operation is too
frequent, the MSP53C392 spends too much time servicing the polling operation and the quality of the synthetic speech may be affected. If the polling operation is too infrequency , the internal buffer may run out of data and the synthesis process can become corrupted. Normally, a polling frequency of four
times the bit rates of the speech data provides optimal transfer characteristics.
Write Operation
Example:
For 6.2 kbps CELP the frequency of polling would be
6.2
4
n
n = the number of bits transfered at a time
1)The master processor should determine that the MSP53C392 is ready to
accept data by reading the BUSY signal as described previously.
2)The master microprocessor clears R/W low to indicate a write operation.
3)The master microprocessor presents valid data to the eight data pins
(DATA0 – DATA7).
4)The master microprocessor pulses the STROB
signal low and then high
to latch the data to the MSP53C392 input data latch.
5)The master microprocessor should do a read operation to determine that
the MSP53C392 is ready to accept additional data before attempting to
write more data.
MSP53C392 Hardware Description
3-5
Master Microprocessor Interface Description
If the EOS signal is asserted high during the read operation, the end-of-speech
has been reached and a reset operation should be performed prior to sending
new commands or speech data. The reset can be done in one of two ways:
Pulsing the INIT pin low and then waiting for the MSP53C392 to re-initialize
itself or by writing four dummy bytes as described in the following.
RESET Operation
1)Perform a read operation to determine that both the EOS and BUSY signals are high.
2)If both the EOS and BUSY signals are high, write four bytes of dummy data
to the MSP53C392 by repeating the write operation four times as described previously.
3-6
3.4Master Microprocessor Interface Timing
3.4.1Timing Method 1: Polling
Data Transfer
Master Microprocessor Interface Timing
STROB
R/W
DATA0 – 5
DATA7/BUSY
DATA6/EOS
NOTE A: State A: Polling the status by reading the BUSY
State B: Write operation
AAAAAAAB
End-of-Speech
STROB
R/W
DATA0 – 5
DATA7/BUSY
DATA6/EOS
NOTE A: State A: EOS detected by reading DATA 6/EOS
State B: Dummy write. A 4-byte dummy write resets the EOS for the next transfer.
State C: Wait until the part is ready to accept dummy data (BUSY
ABBBBCCCC
and EOS
high).
MSP53C392 Hardware Description
3-7
MSP53C392 Device Initialization
3.5MSP53C392 Device Initialization
For proper operation, the MSP53C392 device should be initialized by sending
the following command sequence of bytes:
FF,FF,FF,FF,0A,01,00,FF,FF,FF,FF,FF
Following this command sequence, the normal command sequence options
are available as described in Section 4.2 and onwards.
The function of this sequence is to properly initialize the synthesis engine by
speaking a short selection of LPC prior to speaking selections using other synthesis algorithms.
This initialization needs to be performed:
1)After you apply power to the device, or
2)When you reset the part by toggling the INIT pin.
The MSP53C391 and the MSP53C392 are controlled using a formatted communication sequence that passes commands and data from the master microprocessor to the slave.
4.2Command Sequence
There are two types of streams that can be sent to the slave.
Data streams transmit speech synthesis data.
Command streams control various features of the slave device such as
volume, the state of the two expansion pins, and other special features.
Each stream consists of:
1)A command header whose purpose is to synchronize the data stream.
2)A command code that indicates which command should be executed or
3)The data stream or optional command parameters.
4)After the termination code in the data stream, four nibbles (MSP53C391)
4.3Command Header
The command header is used to synchronize the data stream between the
master microprocessor and the MSP53C391 or MSP53C392. The command
header is the same for both data streams and command streams, but the command header used for the MSP53C391 is different from the command header
used for the MSP53C392 because of the different data bus widths.
The command header used for the MSP53C391 is a series of at least 5 nibbles
with all bits set high followed by a 0x0, 0xA sequence. The complete command
header sequence used for the MSP53C391 is therefore: 0xF, 0xF, 0xF, 0xF,
0xF, 0x0, 0xA.
which synthesis algorithm is to be used to process the data stream.
or four bytes (MSP53C392) of dummy data that resets the processor.
The command header used for the MSP53C392 is a series of at least 5 bytes
with all bits set high followed by a 0x0A sequence. The complete command
header sequence used for the MSP53C392 is therefore: 0xFF, 0xFF, 0xFF,
0xFF, 0FF, 0x0A.
4-2
4.4Data Streams
‡
Freq
Data Streams
To initiate speech, the master microprocessor transmits:
- The command header.
- The synthesis selection code. See Section 4.4.1,
Codes
- The synthesis data. This data must be matched to the command code that
, for valid selection codes.
was sent. The synthesis data contains an imbedded code that identifies
the end of the synthesis data. The synthesis process detects this imbedded code and responds by shutting down the synthesis process and
toggling the EOS signal. See Appendix A for more information regarding
the data preparation.
The synthesis selection code is a one-byte value that indicates the format and
sampling rate of the synthetic speech data that follows it. The valid codes are
shown in T able 4–2. The format of the data that follows
fied algorithm or the speech will not synthesize properly.
CELP 5.8 kbps is not a standard CELP rate. It can only be encoded and edited by selecting the CELP parameter manually in
SDS3000. The parameters for CELP 5.8 kbps are:
‡
Since the pitch table is based on a 10-kHz sampling rate, it is recommended the 10-kHz sampling rate option be used.
HSubframe Size = 60
HSubframes per Frame = 4
HPulses per Subframe = 4
Because the CELP 5.8 kbps is not a standard CELP rate, it is not recommended for less experienced users. The standard
CELP rates (4.2 kbps, 4.8 kbps, 6.2 kbps, 8.6 kbps, and 10.7 kbps) should be used instead.
LPCMELPCELP (Ver. 3.4) (kbps)
5220D6Ver. 4.14.24.85.8
8-BitFM II
†
6.28.610.7
MSP53C391 AND MSP53C392 Software Description
PCM(Ver. 2.08)
4-3
Command Sequences
4.5Command Sequences
A command sequence transmits controlling commands that instruct the
MSP53C391 or MSP53C392 to modify its function in some way. Available
commands are:
Set the two general-purpose output pins either high or low
(MSP53C391 only)
Place the MSP53C391 or MSP53C392 into a low-power sleep state
Adjust the output volume
Initiate a test mode in which a 4-kHz or 5-kHz square wave is generated
at the two general-purpose output pins (MSP53C391) or selected data
pins (MSP53C392)
Read the software version programmed into the MSP53C391 or
MSP53C392.
To send a command sequence, the master microprocessor transmits:
The command header
A valid command code. See Section 4.5.1,
The valid command codes are shown in Table 4–4. Due to the absence of the OUT1 and
OUT2 pins on the MSP53C392, not all of the functions are available on the MSP53C392.
Table 4–4. Command Codes
Command
Codes
0x20Program OUT1 and OUT2 both lowN/A
0x21Program OUT1 high and OUT2 lowN/A
0x22Program OUT1 low and OUT2 highN/A
0x23Program OUT1 and OUT2 both highN/A
0x2EScale output volumeScale output volume
0x2F
0xD1Request version informationRequest version information
0xE65DProduce 5-kHz signal on the OUT2 pinProduce 5-kHz signal on the DATA3 pin
0xE65CProduce 4-kHz signal on the OUT1 pinProduce 4-kHz signal on the DATA2 pin
0xE96DEcho modeN/A
Place MSP53C391 into a low-power sleep
state
MSP53C391MSP53C392
Place MSP53C392 into a low-power sleep
state
4.5.2Pin Expansion
The OUT1 and OUT2 pins are available on the MSP53C391 for pin expansion.
To program these pins to the desired state, transmit one of the command
codes as shown in Table 4–5:
Table 4–5. Pin Expansion Command Codes
Command CodeState of OUT1State of OUT2
0x20LowLow
0x21HighLow
0x22LowHigh
0x23HighHigh
MSP53C391 AND MSP53C392 Software Description
4-5
Command Sequences
4.5.3Volume Control
Transmit a command of 0x2E to scale the output volume of the synthesized
data. At power up the default volume is set to the maximum value (0x80). This
command can be transmitted to reduce the volume from this maximum. The
minimum permitted volume is 0x20.
Sending a command code of 0x2F places the MSP53C391 or MSP53C392
into a low-power sleep state. The MSP53C391 or MSP53C392 can be restarted by resetting the device (pulsing the INIT
the device to complete initialization.
Command
Header
Command
Code
pin low) and waiting 5 ms for
Volume Control
Code
4.5.5Request Software Version
The master processor can request the version number of the software programmed into the MSP53C391 or MSP53C392 by sending the command
code 0xD1. Following transmission of this command, the master processor
should poll the BUSY bit to verify that it is high (indicating that the data is available to be read).
The version information is then available on DA TA0, DA T A1, and DAT A2 on the
MSP53C391. It can be read from these pins using the READ protocol described in Chapter 2. The version number read from the MSP53C391 is 1.
On the MSP53C392, the version information is then available on DATA4,
DATA5, and DATA6. It can be read from these pins using the READ protocol
described in Chapter 3. The version number read from the MSP53C392 is 2.
4-6
4.5.6Generate Test Signal
The MSP53C391 has three test modes.
Generate 4-kHz signal on OUT1
Generate 5-kHz signal on OUT2
Echo input data
The MSP53C392 has two test modes. Echo input data is not available on
the MSP53C392.
Generate 4-kHz signal on DATA2
Generate 5-kHz signal on DATA3
Sending a command code of 0xE65D to the MSP53C391 generates a 5-kHz
signal on the OUT2 pin. This can be used to test the accuracy of the internal
oscillator when it is programmed to 19.2 MHz. The only way to exit this test
mode is to pulse the INIT
Command Sequences
pin low.
Sending a command code of 0xE65C to the MSP53C391 generates a 4-kHz
signal on the OUT1 pin. This can be used to test the accuracy of the internal
oscillator when it is programmed to 15.36 MHz. The only way to exit this test
mode is to pulse the INIT
pin low.
Sending a command code of 0xE65D to the MSP53C392 generates a 5-kHz
signal on the DA TA3 pin. Once the command code has been transmitted to the
MSP53C392, the STROB
must be set low and the R/W must be set high to
enable the generation of the 5-kHz signal. This can be used to test the accuracy of the internal oscillator when it is programmed to 19.2 MHz. The only way
to exit this test mode is to pulse the INIT pin low.
Sending a command code of 0xE65C to the MSP53C392 generates a 4-kHz
signal on the DA TA2 pin. Once the command code has been transmitted to the
MSP53C392, the STROB
must be set low and the R/W must be set high to
enable the generation of the 4-kHz signal. This can be used to test the accuracy of the internal oscillator when it is programmed to 15.36 MHz. The only way
to exit this test mode is to pulse the INIT
pin low.
Sending a command code of 0xE96D to the MSP53C391 causes it to enter a
special test mode in which the input data latched into the device is echoed out
to the OUT2, OUT1, EOS, and IRQ pins. This mode is for debugging the communications interface between the master microprocessor and the
MSP53C391. While in this mode, the MSP53C391 will not speak the voice
data. The only way to exit this mode is to pulse the INIT
TI provides several tools to support speech editing. The WINSDS is a tool for
LPC editing and the SDS3000 is a tool for MELP editing and CELP and MELP
encoding.
WINSDS (Windows interface speech development station) is a powerful tool
to produce high-quality LPC (linear predictive coding) speech and sound.
The Windows-based WINSDS is a successor to the SDS5000 speech development station designed to produce synthesized vocabulary. The WINSDS
system requires a personal computer running Windows 95/98 and requires
at least one available ISA slot.
SDS3000 is an integrated tool that accepts input sound files (sampled at either
8-kHz or 10-kHz) in either a .WA V format or a 16-bit raw binary format and converts the files into the CELP or MELP data format. It requires a personal computer running Windows 95/98 with at least one available ISA slot. SDS300
does MELP and CELP encoding as well as MELP editing.
Windows, Windows 95, and Windows 98 are a trademarks Microsoft Corporation.
A-2
A.2Data Preparation
The MSP53C391 and MSP53C392 slave synthesizers support several algorithms for speech synthesizing. The speech data sent to the slave device must
match the format defined by TI or generated from a TI tool (SDS3000 for MELP
or CELP and WINSDS for LPC). The data preparation for different algorithms
for MSP53C391 and MSP53C392 is discussed in the following paragraphs.
A.2.1LPC
LPC is processed and editing using the WINSDS station. Please refer to the
WINSDS User’s Guide
A.2.2MELP and CELP
The SDS3000 is used to convert an input audio data file into the MELP or
CELP data formats. The input data file can be either signed binary or .WA V format file. The audio data should be sampled at either 8 kHz or 10 kHz and
should have a precision of 16 bits.
Data Preparation
(literature number: SPSU010) for details.
The sound files should start and stop at a level close to zero, otherwise errors
may result. The volume of the sound files should also be adjusted to a level
with a peak-to-peak around +0.5 to –0.5 (assume full scale is +1 to –1). When
the sound file is too loud after the encoding, clipping will result. Additionally,
if the wave file is sampled at a higher rate (CD quality sound file 44.1-kHz sampling or DAT in 48-kHz), resampling to 8 kHz or 10 kHz is necessary for the
conversion. Filtering and renormalizing may be necessary during down-sampling to reduce aliasing and noise.
There are a number of software programs available to do this resampling function. Two commonly available examples are GoldWave and Cool Edit.
GoldWave is a shareware program that provides editing function on sound
files in a Windows environment. This software can be downloaded from the
web: http://www.goldwave.com
By using the GoldWave sound editor , the sound file can be cut to eliminate the
leading and the following silence. The volume can also be adjusted.
T o resample the original wave/sound file, we need to cut all the high-frequency
portion first to eliminate the error in resampling. All frequencies above one half
of the final sampling rate should be removed from the sound file. For example,
before converting the sampling rate to 8 kHz, the data should be filtered to remove all frequency components above 4 kHz.
GoldWave is a product of Goldwave Corporation
Cool Edit is a product of Syntrillium Software Corporation
Editing Tools and Data Preparation
A-3
Data Preparation
A.2.3PCM
The procedures for a low pass filter and resampling with GoldWave are listed
in the following:
1)Open the data file (44.1-kHz 16-bit mono signed).
2)In EFFECT MENU choose FILTER then LOW/HIGH PASS. Use the low
pass filer to cut the signal above 4 kHz for 8-kHz sampling and 5 kHz for
10-kHz sampling.
3)In EFFECT MENU Choose RESAMPLE and then choose 8k/10k to resample the file.
4)Save the file in 16-bit monaural signed data format. This file can then be
used for the MELP/CLEP encoding program SDS3000.
For the operation of SDS3000, please refer to the related documents.
The MSP53C391 and MSP53C392 can accept PCM data. The PCM data
should be sampled at either 8 kHz or 10 kHz and should be signed 8-bit data.
The data should be scaled so that the peak signal is close to the 8-bit maximum. As an example, to obtain a suitable PCM file from GOLDWAVE:
1)Open a .WAV file. The data in the .WAV file should be sampled at either
8 kHz or 10 kHz. The file should contain monaural data.
2)If the data in the file is not sampled at one of these two frequencies, it
should be resampled to one of these two frequencies. First low pass filter
the data to 4 kHz or 5 kHz to avoid sound degradation due to aliasing with
the command EFFECTS – FILTER – LOW/HIGH PASS, then resample
the data to the new sampling rate using the command EFFECTS –RESAMPLE.
3)Maximize the volume with the command EFFECTS – VOLUME –
MAXIMIZE
4)Save the resulting file using the command FILE – SAVE AS, In the
as type:
signed
field, select RAW. In the
.
File Attributes
field, select
8–bit, mono,
Save
5)Since the process of converting a sound file to 8 bit can introduce a quantization error, it is recommended that resulting file be processed to reduce
the noise. In EFFECT MENU choose NOISE REDUCTION. In PRESET
SHAPES use the Hiss shape to reduce the noise.
6)It is necessary to append a termination code to the end of the PCM data
to signal the end of the file to the MSP53C391 or MSP53C392. The proper
end code is the two byte sequence: 0x7F, 0x80.
A-4
A.2.4FM
Data Preparation
Music can be coded manually or can be converted from MIDI (musical instrument digital interface) files. For manual coding, please refer to Appendix B for
the data format of FM synthesis. If the song is composed in MIDI format (.mid),
it can be converted to FM by a DOS executable routine MD2FM.EXE. There
are several limitations on the MIDI files, which the MD2FM program processes.
1)The MSP53C391 and MSP53C392 support a maximum of two channels
of FM synthesis music. The MD2FM can convert only one track or channel
at a time. Two passes through the program are required to convert the two
channels into two separate output file. The two files are combined later into
a single file using the FM2MERGE program.
2)The timebase of the file should be 48.
3)The MD2FM program does not understand the instrument definition of the
MIDI file. The instruments will need to be added to the output file in a separate step.
As an example, assume that a MIDI file named midi_t1.mid contains two tracks
and each track contains a single channel. Execute the MD2FM program twice:
The first pass extracts channel 1 of track 1 from the file and stores it into the
file midi_t11.inc. The second pass extracts channel 1 of track 2 from the file
and stores it into the file midi_t12.inc.
The two files are combined into a single file using the program FM2MERGE
as follows:
>FM2MERGE midi_t11.inc midi_t12.inc midi_t1.inc
The FM2MERGE program combines the midi_t11.inc and the midi_t12.inc
files into a single output file called midi_t1.inc.
FM synthesis is a technique for creating harmonically rich musical tones in a
relatively simple manner. Generally speaking, the tones generated do not
closely correspond to the tonal texture of conventional instruments; but can be
used to generate interesting and pleasant music.
The MSP53C391 and MSP53C392 can generate two channels of FM synthesis. This means that a maximum of two notes can be played simultaneously.
This appendix describes the command formats used to describe the music.
B.2FM Synthesis Format and Commands
The song to be played is coded into a file in a specified format. This file is then
assembled and the binary result is transmitted by the master microprocessor
to the MSP53C391 and MSP53C392 to play the music.
The file contains a series of BYTE or DA T A statements as described in the following to specify the notes, instruments and other details of the music.
Each command is of the general form:
BYTE command, parameters,…
Where
command
indicates the action to be taken, followed by one or more modifying parameters. For example, to transpose a section of a song up by a
semitone, the following command would be written:
BYTE RTRNS,1
In this example, RTRNS is the command and 1 is the modifying parameter.
As another example, to play a note, the following command might be written:
BYTE C1,n4,n4,127
This example commands the synthesizer to play a ‘C’ note for a quarter note
duration at the maximum volume.
The formats and parameters for the different commands are described in the
following sections.
The various commands are defined in the file FMEQUM2.INC. The contents
of this file should either be copied into the start of the FM file or a copy command should be inserted at the start of the FM file to insert the values; for example:
COPY‘FMEQUM2.INC’
B-2
B.2.1Musical Notes
FM Synthesis Format and Commands
Musical notes are defined as:
BYTENotevalue, TimeValue,Duration,Velocity
Where:
Notevalue defines the pitch of the musical note. The valid values for Notevalue are defined in Appendix C. In general, they range from a minimum of
C1 to a maximum of C6. Within each octave, the sequence is: C, Cs or Db,
D, Ds or Eb, E, F , Fs or Gb, G, Gs or Ab, A, As or Bb, B. For example, the C
sharp in the first octave would be written Cs1. This is the same tone as
Db1.
TimeV alue defines the duration of the note that is played. The valid values
for TimeValue are defined in Appendix C. The more common values are:
N8 defines an eighth note. N4 defines a quarter note. N2 defines a half
note. N1 defines a whole note.
B.2.2Tempo Control
Duration defines the sum of the TimeV alue and any following rest. For example, if a quarter note is followed by a quarter note rest, then it would be
coded with a TimeValue=n4 and a Duration=n2.
V elocity is the relative volume of the note. Values range from 0 to 127.
The tempo of the music is defined as:
BYTETEMPO,BPM,TimeSig,EnvelopeLen
Where:
TEMPO is the command that indicates a tempo change is being defined.
BPM is the new tempo. The valid values for BPM are defined in Appendix
C. An example is bpm62, which indicates 62 beats per minute.
TimeSig defines the time signature of the songs. TS44 sets the time signa-
ture to 4/4 time.
EnvelopeLen defines the length of the note envelope. ENVOK sets the
envelope length to normal (i.e., lasting for a whole note).
Note:
The tempo should be set in the channel one stream only . The TEMPOSYNC
command should be placed in the same position in the channel two stream.
FM Synthesis
B-3
FM Synthesis Format and Commands
B.2.3Tempo Synchronization
The tempo of the two channels needs to be the same. If it changes, it needs
to change at the same point in the music for both channels. This is accomplished by placing the tempo change information in the channel one data
stream (using the TEMPO command) and by placing a synchronizing placeholder in the channel 2 data stream to ensure that the tempo change happens
at the same point in the music for both channels. This placeholder is the TEMPOSYNC command. The TEMPOSYNC channel should be placed in the
channel two data stream only.
BYTETEMPOSYNC
B.2.4LOADTIMBRE Command
The LOADTIMBRE is used to change the tonal quality of one of the two channels. It is followed by a 21 byte stream of data that defines the new instrument.
BYTELOADTIMBRE,XX,XX.........,XX
xx
Where
denotes a series of 21 bytes of data that defines the new instrument
sound. The data definitions are as follows:
The first three bytes define the frequencies of the modulator and carrier sinu-
soids. The first byte defines the carrier frequency.
The next two bytes define the initial amplitude of the carrier and the modulator
sinusoids. The valid values range from 0 to 127.
The remaining 16 bytes represent the change in values that define the enve-
lope of the carrier and multiplier during 8 uniform time slices. Each pair of values increments or decrements the carrier and modulator amplitude during the
next time slice. The cumulative value of both the carrier and modulator amplitude is limited to a range of 0 to 127. The carrier amplitude should taper to zero
at the end of the envelope.
For example:
BYTELOADTIMBRE;Load new instrument patch
BYTEX2;Carrier Fc = 2Fo
BYTEX2;Modulator Fm = 2Fo
BYTE16*4;Modulation Index Scaler
BYTE2,1;CarAmp, FmAmpInitial Values
BYTE124,46;CarAmp=126, FmAmp=47
BYTE–10,80;CarAmp=116, FmAmp=127
Two commands are available for transposing the music (i.e., uniformly shifting
the notes to higher or lower frequencies). The A TRNS command adds a specific amount to the note value. The RTRNS command adds a relative amount to
the note value.
BYTEATRNS, NUM
Shifts the music NUM semitones from the value as written, for example:
BYTEATRNS,12
Shifts the music one octave above the music as written.
The RTRNS command is used to shift the music by a cumulative amount, for
example in the following sequence:
BYTERTRNS,12;This will shift the music up by one octave
BYTERTRNS,12;This will shift the music up a second octave
B.2.6DETUNE
The DETUNE command shifts the frequency of notes on channel two with respect to the frequency of the notes on channel 1.
BYTEDETUNE,5;Add 5 to the frequency of channel 5
B.2.7Adjust Output Volume
The FADER command is used to scale the volume of the notes played.
BYTEFADER, InitialFaderValue,FaderInc
Where:
FADER is the signal that the command is to adjust the output volume
InitialFaderValue is the new sound volume
FM Synthesis
B-5
FM Synthesis Format and Commands
FaderInc allows a gradual transition to the new volume. It is a signed twobyte value that specifies the incremental amount to change the volume
during each interval.
For example:
BYTEFADER,f100p;Set volume to 100
DATANOFADER;Change is abrupt
B.2.8Modulation Index Adjustment
It is frequently desirable to incrementally change the texture of the sound quality in the song. This can be done by changing the modulation index to get a
more or less brighter tonal quality. This can be done by using the following
commands:
BYTEMIX1;Set the modulation index scale to 1
BYTEMIX2; Set the modulation index scale to 2
B.2.9End of Song
BYTEMIX3; Set the modulation index scale to 3
BYTEMIX4; Set the modulation index scale to 4
BYTEMIX5; Set the modulation index scale to 5
BYTEMIX6; Set the modulation index scale to 6
BYTEMIX7; Set the modulation index scale to 7
BYTEMIX8; Set the modulation index scale to 8
BYTEMIXUP; Increment the modulation index scale
BYTEMIXDN;Decrement the modulation index scale
The STOPSONG is used to signal the end of the song.
BYTESTOPSONG;Signal the end of song
B-6
FM Synthesis Format and Commands
B.2.10 Command Summary
Table B–1 summarizes the several valid commands.
Table B–1. Command Summary
Command and FormatDescription
Music Notes:Note: Is the music note that can range form C0 to C6
Format:
Note,TimeValue,Duration,Velocity
Example:C1, n4, n4, 127Duration: Length of tone generate
Tempo control the speed of music:TEMPO: Tempo command. Set the song tempo in
Format: TEMPO,BPM,TimeSig,EnvelopeLenBPM: Beats per minutes.
Example: TEMPO,BPM116,TS44,ENVOKTimeSig: Beats per measure. TS44 sets the time
TimeValue: Total length of the note. n4 is 1/4 note.
Velocity: Note volume from 0 to 127
channel 1 ONLY.
signature to 4/4 time.
Tempo control for channel 2:
Format: TEMPOSYNC
Example:TEMPOSYNC
(Add 7 Semitones to the channel’s transpose offset)
EnvelopLen: Envelop time. ENVOK sets the envelope
length to normal.
TEMPOSYNC: Use in channel 2 only. It must be
placed at the same bar # as the channel 1 TEMPO
command. This is to ensure that the Tempo change is
synchronous, with both channels changing at the
same time.
LOADTIMBRE: Load new timbre (instrument) parameters.
Parameters: Contains 21 bytes that define a musical
instrument.
ATRANS: Transpose command.
NUM: Set the channel’s transpose to a signed offset.
RTRNS: Transpose command.
NUM: Add a signed offset to the channel’s transpose
NUM: A signed offset to the channel 2’s frequency
value.
FADER: Fader command
InitalFaderValue: Set initial fader value from 0 to 63.
F100p is defined in FmequM2.inc
FadInc: Fader increment, which is a 16-bit value. Cal-
culate as follows:
(
End Fader Value* Start Fader Value) 16
#ofEvents
MixLevel: Set the modulation index value by table
lookup form MIX0 to MIX15
MIXUP: Increment the current modulation index as set
by MIXn.
Example:MIXUP
Mix control
Format: MIXDN
Example:MIXDN
End of the song:
Format: StopSong
Example:StopSong
MIXDN: Decrement the current modulation index as
set by MIXn.
StopSong: Stop playing the song.
B-8
B.3FM Synthesis Data Structure
As there are two channels data that are passed to the MSP53C391 or
MSP53C392 through a single data path; the note information needs to be interleaved to provide the correct sequencing.
1)The channel one setup information and the first note of channel one are
loaded first.
2)The channel 2 setup information and the first note of channel two will be
loaded following the first note of channel 1.
3)Then the note duration of channel 1 and channel 2 are compared. If the
total duration of the notes of channel 1 is less than or equal to channel 2,
channel 1 data is loaded. If the total duration of the notes of channel 1 is
larger than channel 2, channel 2 data is loaded. In this way, the channel
data are interleaved according to the accumulative duration of the notes.
The following example is in MSP50C3x syntax:
FM Synthesis Data Structure
*
* Example of FM synthesis
*
* define the Channel 1 and load first note
* Channel 1
; BYTE means define a byte data in C3x syntax
; ”;” and ”*” is comments
BYTETEMPO,BPM122,–48,ENVOK ; set the Tempo of channel 1
BYTEATRNS,0; define the Transpose
BYTEMIX3; set Mix Level
; DATA means define a word data
BYTEFADER,f100p; set No Fader
DATANOFADER
; load Piano tone 1 in channel 1
BYTELOADTIMBRE; Parameters of 21 bytes follows
byteX1
byteX1
byte38*4
byte126,108
byte–13,006
byte–25,013
byte–13,–19
BYTEC4,12,12,127; load first note of channel 1
* define Channel 2 and loading the first note
* Channel 2
BYTETEMPOSYNC; sync the Tempo of channel 2 with 1
BYTEATRNS,0; set Transpose of channel 2
BYTEMIX3; set Mix Level of channel 2
BYTEFADER,f100p; set No Fader of channel 2
DATANOFADER
; load timbre Flute tone 1 in channel 2
byteLOADTIMBRE; Parameters of 21 bytes follows
byteX2
byteX2
byte16*4
byte2,1
byte124,46
byte–10,80
byte–9,–8
byte–8,–7
byte–7,–6
byte–6,–5
byte–5,–4
byte–81,–3
BYTEA4,12,12,64; first note of channel 2
* Continue to play the rest data of channel 1&2
; interleaved the channel 1 and channel 2 data
; according to the accumulative duration in each channel
* Channel 1
BYTEE4,12,12,127
* Channel 2
BYTEA4,12,12,64
* Channel 1
B-10
FM Synthesis Data Structure
BYTEG4,12,12,127
* Channel 2
BYTEA4,12,12,64
* Channel 1
BYTEE4,12,12,127
* Channel 2
BYTEA4,12,12,64
* Channel 1
BYTEC5,12,12,127
* Channel 2
BYTEREST,48,2,OFF
* Channel 1
BYTEE5,12,12,127; the duration of channel 2 is still larger than 1
BYTEC5,12,12,127; by loading one note only
BYTEG4,12,12,127; thus, continue to load 1 until
BYTEREST,12,2,OFF; the duration of 1 is larger than 2
According to the discussion on FM data format and structure, a song can be
coded following the predefined command and formats. Alternatively , software
utilities are available for converting a song from MIDI (musical instrument digital interface) formatted files to a format accepted by MSP53C391 AND
MSP53C392. There are two utilities, MD2FM.exe and FM2MERGE.exe, for
the conversion. The process for the conversion is shown in Figure B–1:
By using the MD2FM, the channel 1 and channel 2 data of a MIDI file (.mid)
can be extracted and converted to FM format (.inc). Then, the two FM files
need to be combined according to the duration of each note in channel 1 and
2 by the utility FM2MERGE. The combined file can then be sent to the master
device and passed on to the slave for FM synthesis.
Channel 2 FM Data (songt1_2.inc)
fm2merge songt1_1.inc songt1_2.inc songt1.inc
asmx songd1.inc
Binary File
Once MD2FM has been used to merge the files, the merged file can be converted to a binary file using the ASMX or ASM10 assembly program.
B-12
B.4.1MD2FM Software
MD2FM converts a MIDI format file to a FM data accepted by MSP50C391/2.
With this routine, users can compose or translate music base on the MIDI format. This routine runs under the DOS environment and the syntax is as follows:
input : songt1.mid (MIDI format)
output : songt1_1.inc (FM format)
–c1: channel #1 to be decoded
–t1: track #1 to be decoded
†
Specify the number of tracks and channels to be extracted and converted. Only one channel
within one track can be converted on the MIDI file at any one time.
Assuming that the songt1.mid contains two tracks and each has one channel
music data, the FM data can be extracted as follows:
Data Preparation of FM Synthesis
md2fm songt1 songt1_1 –c1 –t1
†
†
md2fm songt1 songt1_1 –c1 –t1
and
md2fm songt1 songt1_2 –c1 –t2
The output file songt1_1.inc is the track 1 data and the songt1_2.inc is the track
2 data in FM format.
Since MD2FM does not support all the features of MIDI, the following must be
noted:
1)Due to the limitation of conversion program, the TIMEBASE of the .mid file
must be 48 and there must not be any TEMPO/METER changes after the
initial settings. Also, it does not recognize channel pressure, control.
2)This routine creates a .inc file for a single channel of a single trackonly
from a simple .mid file. To use this polyphonically , separate the MIDI file’s
chords into separate channels/tracks and run the md2fm program once
per each channel/track to generate individual .inc files. Thus, it will need
to separate the two overlapping notes into different channels/tracks and
generate two .inc files by the converter. Then, a maximum of two tones can
be generated simultaneously.
3)Since two files are generated for a song with two channels/tracks. The
TEMPO command exists on each file, which is not valid for channel 2. The
TEMPO command, which defines the tempo of the song, only applies to
channel 1 and the TEMPOSYNC command should be used on channel
2. Thus, the TEMPO command must be modified to TEMPOSYNC for the
file intended for channel 2.
FM Synthesis
B-13
Data Preparation of FM Synthesis
Modify from:
to:
on the channel 2 file.
4)For music with only one channel, a data stream with the following statement,
can be used for the channel 2 and the single channel music can be placed on
channel 1 for the synthesizing.
B.4.2FM2MERGE Software
FM2MERGE is a routine run on the DOS environment. The function of the program is to merge two FM data stream into one data file for the MSP53C391
and MSP53C392 slave synthesis. The two data streams are combined according to the accumulative duration of the notes on channel 1 and 2. Please
refer to the section B.2 for more information on the data structure of FM slave
synthesis. The following is the syntax of the fm2merge:
Assuming that there are two files, songt1_1.inc and songt1_2.inc, which is the
song data for channel 1 and channel 2 in FM format. The combined file can
be generated with the following command line:
fm2merge songt1_1.inc songt1_2.inc songt1.inc
The file songt1.inc can then be used for the slave FM synthesis.
The following points should be noted when using the FM2MERGE:
1)The instruments of FM II may not be compatible with the instruments selected in the MIDI file. It is also due to capability of downloading instruments in the slave device, it is necessary to replace the instrument define
statement after the merge process from:
B-14
Data Preparation of FM Synthesis
bytePatchMT6i ;Use instrument Metallic tone 6i
to,
*PatchMT6i: Metallic tone 6i, hard metallic sound 1
byteLOADTIMBRE
byteX1
byteX3
byte28*4
byte127,120
byte–24,7
byte–12,–20
byte–6,–10
byte–3,–5
byte–2,–3
B.4.3Assembler
byte–1,–1
byte–12,–6
byte–67,–12
which is the actual parameter for this instrument. All the PatchXXXX statements must be replaced with these parameters for the slave program to run
properly. All the instruments available are listed in the file fm2intr1.inc. The
instruments that match the applications can be selected.
2)For music with only one channel, a file with the following statement,
BYTEStopSong
can be created for the channel 2 file. Then, go through the same process to
create the FM II data for slave.
Once the FM2MERGE program has been used to merge the two channels into
one file, the file can be converted to a binary file by either the ASMX program
or the ASM10 program.
*Initialization defaults
*default gain value
MAXGAINequ24;default value, also MAX. do not exceed!
*default Master Modulation Index Scale values
DEFSCLMIXequ96;like a tone control...
*FM channel Automated Fader calculations
*Coded as:
*BYTEFADER, CurrFader, ((DestFader–CurrFader) * 16) / #Events
*Init Fader with Start Gain * 16 = 384
*So, when each new event comes along, Add FaderInc to Fader
C-2
Listing of FMequM2.inc
*(EXTSG ON) and Update Fader.
*When calculating Loudness, use Fader / 16 * Current Signal.
*My standard fader values
f100pequ63
f94pequ60
f87pequ56
f75pequ48
f62pequ40
f50pequ32
f37pequ24
f25pequ16
f18pequ12
f12pequ8
f9pequ6
f6pequ4
f4pequ3
f3pequ2
f2pequ1
f0pequ0
OFFequ0;use for REST event, set velocity = 0
NOFADERequ0;Fader Increment = 0.
*Musical note index definitions
*Lookup values for Instrument Sound tables
PatchFLT1equ128+0;FM Flute tone 1
PatchBRS1equ128+1;FM Brass tone 1, Medium slow attack
PatchBRS2equ128+2;FM Brass tone 2, Fast attack
PatchBRS3equ128+3;FM Brass tone 3, Slow attack
PatchTRM1equ128+4;FM Brass tone Trombone 1, Slow attack
PatchTRM2equ128+5;FM Brass tone Trombone 2, Med slow attack
PatchCLR1equ128+6;FM Clarinet Tone 1
PatchCLR2equ128+7;FM Clarinet Tone 2, brighter than CLR1
PatchMT1aequ128+8;FM Metallic tone 1a
PatchMT1bequ128+9;FM Metallic tone 1b
PatchMT1cequ128+10;FM Metallic tone 1c
PatchMT2aequ128+11;FM Metallic tone 2a
PatchMT2bequ128+12;FM Metallic tone 2b
Listing of FMequM2.inc
C-5
Listing of FMequM2.inc
PatchMT2cequ128+13;FM Metallic tone 2c
PatchMT3aequ128+14;FM Metallic tone 3a
PatchMT3bequ128+15;FM Metallic tone 3b
PatchMT3cequ128+16;FM Metallic tone 3c
PatchMT4aequ128+17;FM Metallic tone 4a
PatchMT4bequ128+18;FM Metallic tone 4b
PatchMT4cequ128+19;FM Metallic tone 4c
PatchMT5aequ128+20;FM Metallic tone 5a
PatchMT5bequ128+21;FM Metallic tone 5b
PatchMT5cequ128+22;FM Metallic tone 5c
PatchMT6aequ128+23;FM Metallic tone 6a, good BASS sound 1
PatchMT6bequ128+24;FM Metallic tone 6b, good BASS sound 2
PatchMT6cequ128+25;FM Metallic tone 6c, good BASS sound 3
PatchMT6dequ128+26;FM Metallic tone 6d
PatchMT6eequ128+27;FM Metallic tone 6e
PatchMT6fequ128+28;FM Metallic tone 6f
PatchMT6gequ128+29;FM Metallic tone 6g
PatchMT6hequ128+30;FM Metallic tone 6h
PatchMT6iequ128+31;FM Metallic tone 6i, hard metallic sound 1
PatchMT6jequ128+32;FM Metallic tone 6j, hard metallic sound 2
PatchMT6kequ128+33;FM Metallic tone 6k, hard metallic sound 3
PatchMT6lequ128+34;FM Metallic tone 6l, plucked string 1
PatchMT6mequ128+35;FM Metallic tone 6m, plucked string 2
PatchMT6nequ128+36;FM Metallic tone 6n
PatchMT6oequ128+37;FM Metallic tone 6o, plucked string 3
PatchMT6pequ128+38;FM Metallic tone 6p, plucked string 4
PatchCHM1equ128+39;FM Chimes tone 1
PatchCHM2equ128+40;FM Chimes tone 2
PatchCHM3equ128+41;FM Chimes tone 3
*Max # of patch codes is 64
CONTROLequ#80;< is NOTE data, >= are commands and controls
*Codes #80 to #BF are reserved for Patch Codes (packed BYTE)
PATCHequ#80;usage: BYTE PATCH+patchcode, ie 80+MT6o = B7
*Codes #C0 to #FF are reserved for Commands
CMDSequ#C0;192 to 255 are Commands
LOADTIMBREequ#d3
StopSongequ#D4;End of Song
GOTOequ#D5;Control code for GOTO a Label
RETURNequ#D6;Control code for Return from a Subroutine
GOSUBequ#D7;Control code for Play a Subroutine
DETUNEequ#D8;Control code for Ch2 Detune, Signed offset
TEMPOSYNCequ#D9;Control code for Sync Ch2/Ch1 Tempo change
MIXDNequ#DA;Control code for Shift MIX value DOWN
MIXUPequ#DB;Control code for Shift MIX value UP
RTRNSequ#DC;Control code for RELATIVE Transpose
C-6
Listing of FMequM2.inc
ATRNSequ#DD;Control code for ABSOLUTE Transpose
TEMPOequ#DE;Control code for Tempo
FADERequ#DF;Control code for Set Fader
MIX0equ#E0;Control code for Modix (Modulation Index)
MIX1equ#E1;isolate bits 0–3 for table lookup
MIX2equ#E2;
MIX3equ#E3;
MIX4equ#E4;
MIX5equ#E5;
MIX6equ#E6;
MIX7equ#E7;
MIX8equ#E8;
MIX9equ#E9;
MIX10equ#EA;
MIX11equ#EB;
MIX12equ#EC;
MIX13equ#ED;
MIX14equ#EE;
MIX15equ#EF;
ENDREPequ#F0;Control code for End Repeat
BEGREP2equ#F1;Control code for Start Repeat, Play 2X
BEGREP3equ#F2;Control code for Start Repeat, Play 3X
BEGREP4equ#F3;Control code for Start Repeat, Play 4X
BEGREP5equ#F4;Control code for Start Repeat, Play 5X
BEGREP6equ#F5;Control code for Start Repeat, Play 6X
BEGREP7equ#F6;Control code for Start Repeat, Play 7X
BEGREP8equ#F7;Control code for Start Repeat, Play 8X
ENDMULTIequ#F8;Control code for End MULTI Repeat
BEGMULTI2equ#F9;Control code for Start MULTI, Play 2X
BEGMULTI3equ#FA;Control code for Start MULTI, Play 3X
BEGMULTI4equ#FB;Control code for Start MULTI, Play 4X
BEGMULTI5equ#FC;Control code for Start MULTI, Play 5X
BEGMULTI6equ#FD;Control code for Start MULTI, Play 6X
BEGMULTI7equ#FE;Control code for Start MULTI, Play 7X
BEGMULTI8equ#FF;Control code for Start MULTI, Play 8X
*Time Signature constants as Negative UP Counter values.
Qnoteequ–12;–12 clocks per 1/4 note, 1/4 = 1 Beat
TS24equ2*Qnote;2 beats per Measure
TS34equ3*Qnote;3 beats per Measure
TS44equ4*Qnote;4 beats per Measure
TS54equ5*Qnote;5 beats per Measure
TS64equ6*Qnote;6 beats per Measure
TS74equ7*Qnote;7 beats per Measure
*SIGNED Offsets added to MyPsc to Shorten/Lengthen Envelope times
ENVOKequ0;No Envelope Length adjust
ENVS1equ1;make Envelope length Shorter by 1
ENVS2equ2;make Envelope length Shorter by 2
ENVS3equ3;make Envelope length Shorter by 3
ENVS4equ4;make Envelope length Shorter by 4
ENVS5equ5;make Envelope length Shorter by 5
ENVS6equ6;make Envelope length Shorter by 6
C-8
ENVS7equ7;make Envelope length Shorter by 7
ENVS8equ8;make Envelope length Shorter by 8
ENVS10equ10;make Envelope length Shorter by 10
ENVS12equ12;make Envelope length Shorter by 12
ENVS14equ14;make Envelope length Shorter by 14
ENVS16equ16;make Envelope length Shorter by 16
ENVS18equ18;make Envelope length Shorter by 18
ENVS20equ20;make Envelope length Shorter by 20
ENVL1equ–1;make Envelope length Longer by 1
ENVL2equ–2;make Envelope length Longer by 2
ENVL3equ–3;make Envelope length Longer by 3
ENVL4equ–4;make Envelope length Longer by 4
ENVL5equ–5;make Envelope length Longer by 5
ENVL6equ–6;make Envelope length Longer by 6
ENVL7equ–7;make Envelope length Longer by 7
ENVL8equ–8;make Envelope length Longer by 8
ENVL10equ–10;make Envelope length Longer by 10
ENVL12equ–12;make Envelope length Longer by 12
ENVL14equ–14;make Envelope length Longer by 14
ENVL16equ–16;make Envelope length Longer by 16
ENVL18equ–18;make Envelope length Longer by 18
ENVL20equ–20;make Envelope length Longer by 20
Listing of FMequM2.inc
*Musical Note Time value definitions (FM)
ngrcequ1;Grace Note, use with n8m etc
The sound quality of the speech produced by the MSP53C391 and
MSP53C392 is sensitive to the timing of the waveforms which transfer speech
data to the device from the master microprocessor. Depending upon the algorithm being used to synthesize the speech, the speech data is stored in a circular buffer either 16 or 32 bytes wide. If the data is written to the slave too infrequently, the buffer will empty and the synthesis process will stop or be corrupted. If the MSP53C391 or MSP53C392 is polled too frequently to determine
whether or not it is ready to accept new data, then too many of the internal
instruction cycles may be used servicing the polling process and the sound
quality can be degraded.
Each of the synthesis algorithms tends to use the data in the buffer in
bursts
followed by a period of time in which the data is being utilized before more data
is read from the buffer . Once the MSP53C391 or MSP53C392 has been polled
and determined to be ready to accept new data, the data should be loaded
quickly until the buffer is again full. The read pulses should subsequently be
spaced more widely until it is again determined that the buffer is not full and
the device is ready to accept new data.
The spacing of the read pulses while the buffer is an important determinant of
the synthesized speech quality, but is difficult to specify precisely due to the
different data throughput requirements of the different algorithms. In general,
the optimal polling frequency will increase with the bit rate of the synthesis algorithm being used. In the sections below are some timing waveforms which
we have found to work with the datasets that we have tested. In many cases
it will be difficult for the system designer to exactly replicate the timing shown
in these sections. The timing should be adjusted to optimize the sound quality
for the specific system being designed.
The following general considerations should be observed:
Keep the STROBE pulses as short as possible, but they should not be
shorter than that shown in the waveforms below.
Once it is determined that the buffer is not full, load new data quickly.
Once it is determined that the buffer is full, read the status of the BUSY
signal periodically , but not as frequently as when refreshing the buffer with
new data.
D-2
D.2MSP53C391 Timing Waveforms
The following waveforms have been found to provide good synthesis results
with a variety of data.
The master microprocessor transfers data to the MSP53C391 slave code
through 4 bit interface. The master microprocessor also samples two of the
data lines to determine the status of the slave. The detailed description about
how to transfer data and read back the status of the slave is described in chapter 2. The typical range of the read strobe pulse is 1 µs – 3 µs and the same
for write strobe pulse is 1 µs – 2 µs. It is advisable to restrict the strobe pulse
widths within the recommended range. The typical range of timing between
the rising edge of a read pulse and the falling edge of a write pulse if the slave
is not busy is 19 µs – 22 µs. Since the slave expects data from the master
bursts
be less than 19 µs but it is advisable not to stretch the higher limit. The typical
range of timing between the rising edge of the write strobe pulse and the falling
edge of the read strobe pulse if the slave is not busy is 30 µs – 34 µs. The typical range of timing between the rising edge of the read strobe pulse and the
falling edge of the write strobe pulse if the slave is busy is 38 µs – 58 µs. This
timing could be stretched depending upon the synthesis algorithm, but polling
the slave too frequently if the slave is busy would unnecessarily waste timecritical instruction cycles in the MSP53C391 which might affect the quality of
the speech. At the same time, polling the slave less frequently would lengthen
the response time of the master when the slave needs speech data, which
might eventually lead into the exhaustion of the buffer for the new and refreshed speech data.
to fill up the buffer, the lower limit of this part of the specification could
MSP53C391 Timing Waveforms
in
If the slave is not busy
Read Strobe
1 – 3 µs
If the slave is busy
Read Strobe
1 – 3 µs
19 or less – 22 µs
38 – 58 µs
Write StrobeRead Strobe
1 – 2 µs
30 – 34 µs
Read Strobe
1 – 3 µs1 – 3 µs
MSP53C391/392 Timing Considerations
38 – 58 µs
1 – 3 µs
Read Strobe
D-3
MSP53C391 Timing Waveforms
In both cases, it is advisable to follow the timing window for the width of the
strobe pulse and also to provide speech data to the slave in response to the
interrupt as soon as possible. It is also advisable to keep any interrupt service
routine small so that a new Interrupt service request does not occur while the
master is processing the previous request.
It is advisable to follow the typical timing window as much as possible for any
synthesis algorithm; but if difficulties are found, you can try changing any of
those timing windows (except the width of the read and write strobe pulses)
to correct the problem for your particular system.
D-4
D.3MSP53C392 Timing Waveforms
The master microprocessor transfers data to the MSP53C392 slave code
through 8-bit interface. The master microprocessor also samples two of the
data lines to determine the status of the slave. The detailed description about
how to transfer data and read back the status of the slave is described in chapter 3. The typical range of the read strobe pulse is 3 µs – 10 µs and the same
for write strobe pulse is 1 µs – 10 µs. It is advisable to restrict the strobe pulse
widths within the recommended range. The typical range of timing between
the rising edge of a read pulse and the falling edge of a write pulse if the slave
is NOT BUSY is 20 µs – 32 µs. The typical range of timing between the rising
edge of the write strobe pulse and the falling edge of the read strobe pulse if
the slave is not busy is 77 µs – 156 µs. The typical range of timing between
the rising edge of the read strobe pulse and the falling edge of the write strobe
pulse if the slave is BUSY is 19 µs – 606 µs. This timing could be stretched
depending upon the synthesis algorithm, but polling the slave too frequently
if the slave is BUSY would unnecessarily waste time-critical MSP53C392
instruction cycles which might affect the quality of the speech. At the same
time, polling the slave less frequently would lengthen the response time of the
master when the slave needs speech data which might eventually lead into the
exhaustion of the buffer for the new and refreshed speech data. The length of
the timing between two read strobe pulses when the slave is busy is dependent
on the length of the timing between the write and read strobe pulse to some
extent. Lowering the lower limit of the timing between the strobe pulse between
the write and read would lower the higher limit of the length of the timing window between the the two READ strobe pulses when the slave is busy.
MSP53C392 Timing Waveforms
If the slave is not busy
Read Strobe
1 – 10 µs
If the slave is busy
Read Strobe
3 – 10 µs
20 – 32 µs
19 – 606 µs
Write StrobeRead Strobe
1 – 10 µs
77 – 156 µs
Read Strobe
3 – 10 µs
19 – 606 µs
MSP53C391/392 Timing Considerations
3 – 10 µs
Read Strobe
3 – 10 µs
D-5
MSP53C392 Timing Waveforms
In both cases, it is advisable to follow the timing window for the width of the
strobe pulse and also to provide speech data to the slave in response to the
interrupt as soon as possible.
It is advisable to follow the typical timing window as much as possible for any
synthesis algorithm; but if difficulties are found, you can try changing any of
those timing window (except the width of the read and write strobe pulses) to
correct the problem for your particular system.
Two Channel FM Synthesis, PCM
8-Bit Microprocessor With 61 instructions
3.3V to 6.5V CMOS Technology for Low
Power Dissipation
Direct Speaker Drive Capability
Internal Clock Generator That Requires No
External Components
Two Software-Selectable Clock Speeds
10-kHz or 8-kHz Speech Sample Rate
description
The MSP53C391 and MSP53C392 are catalog
MSP50C3x codes which implements the functionality of a slave speech synthesizer. They
communicate with a master microprocessor using
two control lines (R/W
4-bit data bus (MSP53C391) or an 8-bit data bus
(MSP53C392).
Either the MSP53C391 or the MSP53C392 can
synthesize speech using several different compression algorithms; LPC, MELP, or CELP. They
also can synthesize two-channel music using FM
synthesis.
and STROBE) and either a
DATA2/EOS
DATA1
DATA0
OUT2
OUT1
EOS
R/W
OSC IN
DATA6/EOS
DATA5
DATA4
DATA3
DATA2
DATA1
R/W
OSC IN
MSP53C391
N PACKAGE
(TOP VIEW)
1
2
3
4
5
6
7
8
MSP53C392
N PACKAGE
(TOP VIEW)
1
2
3
4
5
6
7
8
16
15
14
13
12
11
10
16
15
14
13
12
11
10
9
9
DATA3/BUSY
STROB
IRQ
DAC+
DAC–
V
DD
V
SS
INIT
DATA7/BUSY
STROB
DATA0
DAC+
DAC–
V
DD
V
SS
INIT
See the MSP50C3x User’s Guide (literature
number: SLOU006B) for more information about
the MSP50C3x family.
Table 1. MSP53C39x Family
DEVICEFEATURES
MSP53C3914-bit data bus
MSP53C3928-bit data bus
Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of
Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
PRODUCTION DATA information is current as of publication date.
Products conform to specifications per the terms of Texas Instruments
standard warranty. Production processing does not necessarily include
testing of all parameters.
POST OFFICE BOX 655303 • DALLAS, TEXAS 75265
Copyright 1999, Texas Instruments Incorporated
F–3
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.