Design electronic voice guide machine with MSP50C30

This article refers to the address: http://

Abstract: Based on the brief introduction of the structure and characteristics of MSP50C30, the hardware circuit and software programming method of designing electronic voice guide machine using MSP50C30 are given.
Keywords: MSP50C30 MELP algorithm speech synthesis electronic tour guide

1 Overview

With the development of China's economy, the tourism industry has also achieved considerable development. Traveling out on holidays has become the first choice for people. For most scattered tourists, it is hoped that there will be a kind of auxiliary guides that are not subject to people. An electronic voice guide machine (referred to as a tour guide machine) with large storage capacity and no mechanical wear, but the guide machine already in use on the market has a large private volume and is not easy to carry; or the capacity is insufficient, and the playback time is limited, thus restricting Its application and promotion. There are two ways to achieve digital playback over a long period of time: one is to expand the storage space, but the infinite expansion of the storage space must increase the system cost, and the second is to use voice compression to reduce the amount of data. In the above two methods, the author selected TI's newly introduced speech synthesis chip MSP50C30 and adopted the MELP speech compression algorithm, and compressed and stored the speech signal through the external 64M bit memory. After this processing, the synthesized speech sound quality is good, the playback time can be as long as about 6 hours, and the machine is small in size, which better solves the above mentioned problems.

2 Structural features of MSP50C30

The MSP50C30 is a powerful speech synthesis chip introduced by TI in 1998. It integrates 8-bit microprocessor, dual-channel speech synthesizer, RAM, ROM, I/O port and other functional modules. The microprocessor uses its dedicated 61 instructions to perform digital operations, logic functions, and control functions; the speech synthesizer uses its internally integrated 12-order lattice filter to synthesize high-quality speech using the LPC compression algorithm. During speech synthesis, the microprocessor reads the speech data from the internal RAM or the external ROM for decoding, and then sends the decoded speech data to the speech synthesizer, and the speech synthesizer interpolates and synthesizes the decoded data. The voice is then sent to the amplifier through the D/A conversion to directly drive the speaker to sound.

Table 1 MSP50C30 pin description

Pin name Pin description
DAC+ D/A output
DAC- D/A output
ID0ID7 Data input port
INIT Initialization input (reset)
OSC IN Clock input, grounded using internal clock
OSC OUT Clock return, when using the internal clock, the PBI I / O port
OA0OA22 23-bit external memory address line 64M bit
PA0PA7 8-bit bidirectional I/O port
PB0PB7 8-bit bidirectional I/O port
PC0PC7 8-bit bidirectional I/O port
PD0PD3 4-digit bidirectional I/O port
VDD 5V voltage input
VSS Ground

In addition, the MSP50C30 integrates a crystal oscillator inside to provide the clock required by the system.

The pin diagram of MSP50C30 is shown in Figure 1, and the pin descriptions are listed in Table 1. The main features of the MSP50C30 are as follows:

●With dual channel programmable LPC-12 speech synthesizer for stereo effects;

● Includes 8-bit microprocessor and can execute 1.2M instructions per second;

● There are 61 instructions and have a single-cycle multiplication instruction;

● With ROM interface, 23 address lines can be addressed to 8M bytes;

●With 28 software programmable bidirectional I/O ports;

● With two flexible clock modes, embedded and external;

●Inline D/A, there are 2 kinds of output modes;

● 7-level stack with externally controlled interrupt function;

● Can support 10kHz or 8kHz voice sampling rate;

● It can be configured to enter a low power sleep state by software configuration;

● Supports multiple compression algorithms such as LPC, MELP, CELP, FM, and PCM.

Compared with the synchronous chip, the MSP50C30 has the advantages of rich I/O interface and external addressing capability of up to 64M bits, making it ideal for long-term playback systems.

3 hardware circuit design

The hardware schematic diagram of the voice guide machine designed by the author is shown in Figure 2. The system takes MSP50C30 as the core, external storage circuit, keyboard interface circuit, display circuit, power amplifier circuit and DC-DC conversion circuit. MSP50C30 completes the voice synthesis and control function. The memory uses 64M bit FLASH ROM 28F640J5 produced by INTEL, and its address line and data are directly connected with the address lines (A0~A22) and data lines (ID0~ID7) of MSP50C30 respectively. The voice data has been specially provided by TI company beforehand. Compress and burn to the FLASH ROM through the programmer. In order to facilitate data replacement, the interface between the memory and the programmer is also designed in the circuit, so the 28F640J5 can be separated from the speech synthesis circuit by programming and switching. Therefore, the replacement of voice data can be conveniently realized. The keyboard of the tour guide adopts a 4×4 matrix keyboard, and a total of 16 buttons are set, among which 10 (0-9) number keys are used for digital selection; 6 function keys are used for playing, pausing, fast forwarding, Rewind and other functions. The keyboard matrix is ​​connected to the MSP50C30 ports PA0~PA7, and the system reads the button status through the key value scanning program. The liquid crystal display adopts a 3-digit LCD digital display; the ED-S812 uses the PB0-PB7 of the MSP50C30 as the I/O port for controlling the digital display, and the driving chip adopts the MC14543 to realize the BCD decoding, and the AC-driven square wave (80 Hz to 100 Hz) passes the 74HC14. The oscillation circuit is generated.

In order to facilitate the carrying of the tour guide, the system uses two 5# batteries to supply power. Since the system needs 5V power supply, it is necessary to design a DC-DC conversion circuit. Designed with MAXIM's MAX756, the device's input voltage can be as low as 0.7V, and the pin 2 can be selected to output both 3V and 5V.


When the system is reset, the MSP50C30 starts the key value scanning program to read the key value from the PA port and send the key value through the PB port. After decoding by MC14543, the corresponding number can be displayed on the liquid crystal display. Then MSP50C30 is sent to the speech synthesizer through the internal program look-up table. The synthesized speech is sent out from the DAC+ and DAC- pins, and the speaker is sounded through the external power amplifier circuit. The clock required by the system is provided by the internal crystal.

4 software circuit design

4.1 Speech synthesis program design

MSP50C30 uses MELP algorithm to synthesize speech. It is an improved algorithm of LPC. Its advantage is that MELP algorithm does not need professional sound repair equipment, voice data is completed by dedicated compression software, and the synthesized voice quality is good. It is an ideal compression algorithm for voice real-time storage systems. The frame format of the MELP algorithm is similar to the LPC frame format, except that the pitch jitter parameter and the opacity intensity parameter are introduced in the voiced frame to correct the pitch period of the voiced frame. If each frame is calculated in 20 ms, the maximum compression ratio of the MELP algorithm is 62 × 50 = 3100 bit / s (each frame is quantized to 62 bits). Due to the variable rate coding method, the average compression ratio is made lower. In addition, the user can also design the frame format according to his own algorithm according to the requirements of his own voice quality to produce better sound quality. The flow chart of the speech synthesis subroutine is shown in Figure 3.

4.2 Voice Control Software Design

The voice control software is mainly used to complete the following functions: (1) detecting the number of key presses and calculating the corresponding key value; (2) displaying the key value on the liquid crystal display; (3) selecting the corresponding voice segment according to the calculated key value, The read data is transmitted from the external 28F640J5 to the MSP50C30, and is supplied to the speech subroutine to synthesize the speech; (4) in the speech synthesis process, it is detected whether the function key is pressed, and if pressed, the corresponding function key control subroutine is executed. The voice control software flow chart is shown in Figure 4.

The keyboard scanning adopts the line inversion method, and the implementation method is as follows: first, the row line is programmed as an output line, and the column line is programmed as an input line, so that the output is all zero level, then the level in the column line is changed from high to low. The column where the button is located; then the row line is programmed as the input line, and the column line is programmed as the output line, so that the output is all zero level, then the level of the line from high to low is the line where the button is located; Determine the key value. In the key-value scanning subroutine, the delay of 10ms by software is to eliminate the jitter caused by the button to avoid misjudgment. The key value detection subroutine flow chart is shown in Figure 5.

The flow of displaying the pressed numeric keys at the same time as the key value scanning is as shown in FIG. 6.

5 Conclusion

The whole circuit design described in this paper is simple in design and reliable in performance. All devices use patch components, which are small in size and easy to carry. After listening tests, the whole machine has good speech quality, and the synthesized speech maintains high definition, intelligibility and naturalness.

USB Flash Drive

We are manufacturer/supplier of USB flash drive from China,who offer 100% real original capacity to the world buyers.You can get high quality of USB flash drive from us with custom logo,and also help you build your own brand of USB flash drive 2.0 3.0 with reputation.Capacity from 2MB,8MB,64MB,128MB to 8GB 16GB 32GB 64GB 128GB and 256GB(Biggest real capacity can be 512GB).We mainly offer OEM /ODM service,and offer USB flash drive without logo or with your logos.

Usb Flash Memory,Usb Flash Drive 32Gb,Usb Flash Drive Custom,Usb Flash Drive 3.0,USB Disk,Pendrive,USB key

Shenzhen Konchang Electronic Technology Co.,Ltd , https://www.konchang.com