一种单片机语音录入和播放系统设计英文文献3 - 副本.doc_第1页
一种单片机语音录入和播放系统设计英文文献3 - 副本.doc_第2页
一种单片机语音录入和播放系统设计英文文献3 - 副本.doc_第3页
一种单片机语音录入和播放系统设计英文文献3 - 副本.doc_第4页
一种单片机语音录入和播放系统设计英文文献3 - 副本.doc_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

A single-chip voice input and playback systemApplication of SCM for Embedded System Experimental test of modern electronic technology is an important direction of development. To the system as development platform for voice processing technology can experiment, including voice recording and playback, voice compression coding and decoding, voice recognition and other content designed experiment. There are two general ways to design: one is the Microprocessor Design; the other is by means of specialized voice processing chips. SCM is often not achieve such a common complex process and algorithms, even if we manage to achieve a lot of peripheral devices also increases. Although specialized voice processing chips have more, but the specific function of voice processing chips relatively simple, other than in the application of speech is very difficult。1 IntroductionThrough the full use of processor features its own characteristics and development boards provide a wealth of peripheral circuits, constructed the corresponding test and tested system, integrated electronic technology to improve the analysis of experimental ability and practical ability of positive significance. Articles for voice input and playback system is proposed based on the application of experimental SPCE061A SCM solutions, hardware and software design based on the completed SPR4096 PDIUSBD12 chip external memory and external USB devices and expansion, and USB between SCM and SPR4096 communication, to achieve a system of voice input and playback functions.Sunplus Technology Company introduced a voice playback chip SPCE061A hardware conditions, software algorithms on Sunplus offers a large number of voice function library available, which makes the voice playback is very easy to implement. But SPCE061A-chip FLASH memory is only 32K, a large number of voice resources in the broadcast the needs of expanding memory. This paper discusses the use of Sunplus Technology, Inc. SPR4096 as external memory expansion, combined with SPCE061A Play voice. When we use SPR4096 Sunplus Education Center through the new ResWriter on SPR4096 reading and writing.SPCE061A is sunplus technology r&d and production of high performance to price ratio of a site, use it can be very convenient and flexible realization of voice recording system,the chip has 8 10-bit precision ADC, which transform the way for the audio channel, and built-in automatic gain circuit. This provides a convenient voice entry hardware conditions. Two 10-accuracy DAC, only need an external power amplifier (SPY0030A) to complete the voice of the play. Does not require specialized voice processing chip, to simplify circuit design and improve work efficiency is very effective. Also Sunplus 16 MCU with easy-efficient instruction set and integrated development environment. In this environment, support the standard C language, can achieve C language and assembly language Sunplus call each other and provide a voice record of the library function, as long as the understanding of the use of library function, you can easily complete voice recorders, which are software development provides convenient conditions.Features: 16 位 nSP microprocessor; Operating voltage: core operating voltage VDD is 3.0 3.6V (CPU), I / O port voltage VDDH to VDD 5.5V (I / O); CPU clock : 0.32MHz 49.152MHz; Built-2K words SRAM; Built-in 32K Flash ROM; programmable audio processing; crystal oscillator; system is in standby mode (the clock is stopped), power consumption is less than 2A 3.6V; 2 16-bit programmable timer / counter (automatically preset the initial count); 2 10-bit DAC (Digital - analog conversion) output channels; 32-bit general purpose programmable input / output port; 14 interrupt sources can be from the timer A / B, time base, two external clock source input, key wake-up; wake-up functions with the touch; use of audio coding SACM_S240 Sunplus way (2.4K bits / seconds), which can hold 210 seconds of voice data; oscillator phase-locked loop PLL system clock signal; 32768Hz Real Time Clock; 7-channel 10-bit voltage-mode - digital converter (ADC) and single-channel audio module - digital conversion device; sound module - digital converter input channels built-in microphone amplifier and automatic gain control (AGC) function; have a serial device interface; Low voltage reset (LVR) and low-voltage monitoring function (LVD) function; within Purchase Online Simulation board (ICE, In-Circuit Emulator) interfaces2 Structure and principle of the hardware systemSystem hardware includes: SPCE061A development board, SPR4096 memory modules, USBD12 module, EZ-Probe download cable, PC machine.System uses the offline mode of voice playback system. Voice recorders set by SPCE061A key to achieve the development board. At the same time, the system can realize the basic functions USB: USB devices through memory chips in the audio files uploaded to the PC machine, the software will convert the WAV files sound files and play them in the PC machine; USB devices can also be the PC, the audio files downloaded to the memory module by key select Play.Voice Input System institutions part of the speech acoustic signal through the microphone and amplifier into a certain range of the analog signal, and then transform the computer to store, handle the digital signal. Voice broadcast system is voice data stored in memory the order of removal, through the MCU for D / A converter output, after filtering through the capacitor, to restore the original audio waveform, by driving the speaker playback. System for speech signal processing is the discrete analog (continuous) number of element of the sound waveform (discrete), to facilitate digital computer for processing. The digital audio processing includes sampling and quantization of two parts. As the system uses own A / D, D / A circuits for analog signal and microcontroller SPCE061A conversion between digital signals, so the main work on the development of voice input and playback system program design, microprocessor and memory modules to connect and function and the MCU and USB module to achieve connectivity and functionality to achieve.System hardware consists of the following three components: (1) voice recorders circuit; (2) SPR4096 (memory) module; (3) PDIUSBD12 (USB) module.Audio circuit from the audio output and audio input of two parts. The experiment with the audio output circuit is built-in 2-way 10-bit precision DAC, only an external amplifier circuit to complete the voice of the play, the maximum output power up to 700 mW. Some have integrated audio input Audio input dedicated ADC and AGC amplifier, A / D converter with 8 channels, one of which is the MIC-IN input, it is dedicated to the voice signal is sampled.SPR4096 circuit in the main by the ResWriter on the programming circuit and SPR4096 SPR4096 working circuit. SPR module reserved for the two interfaces, an interface is the EZ-probe, which is in use ResWriter SPR4096/1024 to the programming tool used to connect the other 10PIN emission lines, mainly to provide power and connection with the use of SPCE061A . Support SPR4096 SPR module circuit and SPR1024, but only one chip at the same time use. SPR module has two basic configurations, one for the board plus SPR4096 chip, another chip for the board plus SPR1024, and when in use must be equipped with download cable to use.SPR4096 is Sunplus Technology R & D cost-effective production of high performance 512K * 8-bit FLASH memory, and built-in 4K * 8-bit SRAM. With BMI (Bus Memory Interface) interface SIO (Serial Interface) interfaces. SPR4096 offers two power supply VDDI and VDDQ. VDDI power supply range of 2.25V to 2.75V, is the internal FLASH and logic controller power. VDDQ power supply range of 2.25V to 3.6V, only the I / O port power supply. SPR4096 maximum operating frequency of 5.0MHz, the maximum read current is 2mA maximum erase, burn current of 6mA.Characteristics: 512K * 8 bit FLASH, 256 sectors, each sector can be repeated for the 2K-byte Can be repeated 20,000 times rewrit Under natural conditions, the data retained for 10 years 4K * 8-bit SRAM Power requirements : VDDI: 2.25V-2.75V VDDQ: 2.25V-3.6V Maximum operating frequency: 5.0MHz maximum erase, programming current: 6.0mA maximum read current: 2.0mASPR module Caution: use the 3.3V power supply module, be careful not to take anti-power; modules must meet the download cable to use; in the use ResWriter the programming tool SPR4096/SPR1024 chip modules when the need for SPR power supply; not at the same time SPR4096 SPR1024 to the programming with.ResWriter tool main function: SPR1024/4096 Flash Memory recorder: The PC printer port programming through Easy Probe SPR1024/4096, basic operations including Blank Check (blank check), Erase (delete data), Read (read data) , Program (burn, write data), Verify (check, check is written is correct); document integration: the number of small documents into one big document, as the burning of data Flash.In order to facilitate the use of data, time to burn data files to index, so that you can know when to use the data stored in the address which you can manipulate files.Voice resources, taking into account the actual storage usage, the index table includes four bytes of a specific code, integrated document the start address, end address, the total number of pre-integration, integration of each file before starting address end of the address. These items in order of priority. 4 bytes of a specific code for the SPRW (Sunplus Read Write) the ASCII code. The main function of a specific code is read from the chip, save the data back into the file, tool use ResWriter opened for testing. Code if the file exists in a particular note is the use of the data chip burning ResWriter tools, so files can be displayed correctly in ResWriter tool.USB module circuit functions: (1) W indows system configuration, enumeration of USB peripherals, SPCE061A send, receive relevant information on USB devices; (2) W indows system configuration, enumeration of USB peripherals is successful, the receiving to the ID, make the appropriate operation from the control action.3 System SoftwareSystem software modules from the voice recorders, SPR4096 reading and writing module, USB module operation and key operation module. Voice recorders program flow diagram shown in Figure 3. The program consists of two parts to achieve: (1) keyboard scanning processing. Mainly to solve the key operation detection according to what key. In the system, provides for the Key1 recording key 0x01, 0xx2 to Key2 stop button, 0x04 for the Key3 Play button. Access key is to determine what operators want to operate. If you press the Record button on the home state for the record; If you press the stop button, you judge the current state is the state to stop recording or playback mode stop; if you press the play button, it is set to playback mode. (2) (2) the current state judgments. Judgement in the keyboard scanning process based on the current state of response, this part of the need to consider the recording, playback and stop the three kinds of state. System through the keyboard scanning process to determine the current status, and on the recording, playback or stop the three kinds of state of real-time control. System programming process, development environment provided by unSP IDE debugger for software debugging.Based on IDE2 software engineering through the compile, link after the end of the output in the OutPut window information includes the works of the memory occupancy information, the simulation results to verify the correctness.4 ConclusionThrough the system operation, in SPCE061A development board basis, through three key K1, K2, K3, and completed by extending the SPR4096 module voice input and playback system to achieve, and realized through the USB module development board and SPCE061A PC, voice and data communications between the. Development of MCU-based voice input and playback system, involving systems analysis, SPCE061A MCU hardware structure, MCU programming language, USB device communication, audio compression algorithms, such as integrated test subjects, on the analog and digital integrated circuits and embedded with a microcontroller system design ability of positive significance.一种单片机语音录入和播放系统设计应用单片机进行嵌入式系统实验是现代电子技术实验的一个重要发展方向。以该系统为开发平台,可以进行语音处理技术实验,包括语音的录制和播放、语音的压缩编码和解码、语音的识别等设计型实验内容。设计一般有两个途径:一种是单片机扩展设计;另一种是借助于专门的语音处理芯片。普通的单片机往往不能实现这么复杂的过程和算法,即使勉强实现也要加很多外围器件。专门的语音处理芯片虽比较多,但是专门的语音处理芯片功能比较单一,在语音之外的其他方面应用难度很大。1 引言 通过充分利用处理器本身的功能特点和开发板所提供的丰富的外围电路,构造相应的测试和被测系统,对于提高电子技术综合实验的分析能力和动手能力具有积极意义。文章针对语音录入和播放系统,提出了基于SPCE061A单片机的应用实验解决方案,在硬软件设计的基础上,完成了SPR4096外置存储器和PDIUSBD12芯片外置USB设备的扩展以及单片机与SPR4096和USB之间的通信,实现了系统的语音录入和播放功能。凌阳科技公司推出的SPCE061A芯片具有语音播放的硬件条件,在软件算法上凌阳科技公司提供了大量的语音函数库可供使用,这使得语音播放很容易实现。但是SPCE061A片内的FLASH存储器只有32K,在播放大量语音资源时需要外扩存储器。本论文讨论使用凌阳科技公司的SPR4096作为外扩存储器,与SPCE061A结合播放语音。在使用SPR4096时我们通过凌阳教育推广中心新推出的ResWriter对SPR4096进行读写操作。SPCE061A是凌阳科技研发生产的性价比很高的一款十六位单片机,使用它可以非常方便灵活的实现语音的录放系统,该芯片拥有8路10位精度的ADC,其中一路为音频转换通道,并且内置有自动增益电路。这为实现语音录入提供了方便的硬件条件。两路10精度的DAC,只需要外接功放(SPY0030A)即可完成语音的播放。不需要专门的语音处理芯片,对于简化电路设计,提高工作效率十分有效。另外凌阳十六位单片机具有易学易用的效率较高的一套指令系统和集成开发环境。在此环境中,支持标准C语言,可以实现C语言与凌阳汇编语言的互相调用,并且,提供了语音录放的库函数,只要了解库函数的使用,就会很容易完成语音录放,这些都为软件开发提供了方便的条件.特性: 16位nSP微处理器; 工作电压:内核工作电压VDD为3.03.6V(CPU),I/O口工作电压VDDH为VDD5.5V(I/O); CPU时钟:0.32MHz49.152MHz; 内置2K字SRAM; 内置32K闪存ROM; 可编程音频处理; 晶体振荡器; 系统处于备用状态下(时钟处于停止状态),耗电小于2A3.6V; 2个16位可编程定时器/计数器(可自动预置初始计数值); 2个10位DAC(数-模转换)输出通道; 32位通用可编程输入/输出端口; 14个中断源可来自定时器A / B,时基,2个外部时钟源输入,键唤醒; 具备触键唤醒的功能; 使用凌阳音频编码SACM_S240方式(2.4K位/秒),能容纳210秒的语音数据; 锁相环PLL振荡器提供系统时钟信号; 32768Hz实时时钟; 7通道10位电压模-数转换器(ADC)和单通道声音模-数转换器; 声音模-数转换器输入通道内置麦克风放大器和自动增益控制(AGC)功能; 具备串行设备接口; 低电压复位(LVR)功和低电压监测(LVD)功能; 内置在线仿真板(ICE,In- Circuit Emulator)接口。2 硬件系统结构与原理系统硬件包括: SPCE061A开发板, SPR4096存储器模组, USBD12模组, EZ-Probe下载线,PC机。系统采用脱机工作模式下的语音录放系统。语音录放通过SPCE061A开发板上的设置按键实现。同时,系统可以实现USB的基本功能:通过USB设备将存储芯片中的语音文件上传到PC机中,通过软件将语音文件转换成WAV文件,并在PC机中播放出来;也可以通过USB设备将PC机中的语音文件下载到存储器模组中,通过按键选择播放。系统机构中语音录入部分是把语音声波信号经过话筒和放大器转换成具有一定幅度的模拟电信号,再转换成计算机能够存贮、处理的数字量信号。系统语音播放是将存储器中存储的语音数据顺序取出,通过MCU进行D/A转换输出,经过电容滤波后,恢复原始语音波形,通过驱动扬声器放音。系统中对于语音信号的离散处理是将模拟(连续)的声音波形数字元化(离散化),便于数字计算机进行处理。而数字音频的处理主要包括采样和量化两个部分。由于系统采用自带A/D、D/A电路单片机SPCE061A实现模拟信号与数字信号之间的相互转换,所以开发的主要工作放在语音录入和播放系统程序设计、单片机与存储器模组连接和功能实现以及单片机与USB模组的连接和功能实现。系统的硬件电路由以下3部分组成:(1)语音录放电路; (2) SPR4096(存储器)模组; (3) PDIUSBD12(USB)模组。音频电路由音频输出和音频输入两部分组成。实验中采用的音频输出电路为内置2路10位精度的DAC,只需要外接功放电路即可完成语音的播放,最大输出功率可达700 mW。音频输入部分已经集成了音频输入专用ADC以及AGC放大电路, A/D转换器有8个通道,其中一个是MIC-IN输入,它专门用于对语音信号进行采样。SPR4096模组电路主要由ResWriter对SPR4096烧写电路和SPR4096的工作电路组成。SPR模组预留两个接口,一个接口是EZ-probe,这是在使用ResWriter工具对SPR4096/1024进行烧写时连接使用的,另一个是10PIN的排线,主要提供电源以及与SPCE061A连接使用。SPR模组电路支持SPR4096和SPR1024,但只能同时对其中一种芯片进行使用。SPR模组有两种基本配置,一种为电路板加SPR4096芯片,另一种为电路板加SPR1024芯片,而且在使用时必须配备下载线使用。SPR4096是凌阳科技公司研发生产的性价比很高的512K*8位的高性能FLASH存储器,同时内嵌4K*8位的SRAM。具有BMI(Bus Memory Interface)接口与SIO(Serial Interface)接口。SPR4096提供两种电源供电VDDI与VDDQ。VDDI供

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论