1、I 摘要 本次课程设计的主要目的是制作一个基于单片机的数码录音和播放系统。选用凌 阳 16 位单片机 SPCE061A 和外部存储器 W29C040 来实现。 其具有体积小、 集成度高、 功耗低、结构简单、中断处理能力强等特点,特别适用于数字语音录放和语音识别等 数字应用领域。SPCE061A 是台湾凌阳公司生产的十六位单片机,该单片机内置有 2 路 DA 转换,8 路 AD 转换及在线仿真等丰富的功能,W29C040 是台湾华邦公司生产 的 4M 位的 FLASH 存储芯片, 利用它存储凌阳格式的语音资源, 可以长达 4 分钟的语 音录放。该系统可以广泛应用于需求的录音较长的场合。如检测温度
2、的存储播放系统, 自录语音提示等应用方案。 关键词:SPCE061A,闪存,W29C040,语音输入/录放 II ABSTRACT This course design of the main purpose is to make a based on SCM digital recording and playback system. Choose Sunplus SPCE061A and 16-bit single chip external memory W29C040 to achieve. Its integration with small size, high, low powe
3、r consumption, simple structure, interrupt handling ability strong wait for a characteristic, especially suitable for digital voice recording and digital applications speech recognition, etc. Sunplus SPCE061A is Taiwan company produces the 16 microcontroller, the microcontroller built-in have 2 DA c
4、onversion, no.8 AD transform and online simulation and so on the function,W29C040 is of Taiwan Winbond corp. Production 4M bits FLASH memory chips, and use it to store the voice of Sunplus format for four minutes resource can the voice recording. This system can be widely used in demand recording lo
5、nger occasion. If the test temperature broadcast system, self-records stored voice prompt etc application solutions. KEYWORDS:SPCE061A ;flash memory;W29C040;voice record III 目录 第 1章 绪论. 1 第 2章 录音笔设计方案与论证 . 3 2.1 引言 . 3 2.2 录音笔设计方案的提出 3 2.3 录音笔设计方案的确定 4 第 3章 硬件设计 6 3.1 系统总体方案介绍 . 6 3.2 SPCE061A 最小系统设
6、计. 6 3.3 音频电路 8 3.3.1 音频输入电路 . 8 3.3.2 A/D 转换接口 9 3.3.3 D/A 转换模块 11 3.3.4 音频输出电路 . 11 3.4 W29C040 存储芯片 12 3.5 串行设备输入输出口(SIO) . 13 3.6 通用串行通信接口 UART 模块 . 14 第 4章 软件设计 16 4.1 凌阳音频介绍 16 4.1.1 音频概述 16 4.1.2 数字音频的采样和量化及格式介绍 . 16 4.1.3 语音压缩编码基础 16 4.2 软件设计流程图 17 4.3 程序代码 18 4.3.1 语音的录入 19 4.3.2 语音的播放 19 4.3.3 SACM-DVR 相关的 API 函数 19 参考文献 22 致谢. 23 附录. 24 1 第 1 章 绪论 随着计算机技术的发展和在控制系统中的广泛应用,以及设备向小型化、智能化 的发展,作为高新技术之一的单片机以其体积小,功能强,价格低,使用灵活等特点, 显示出很强的生命力。1可以认为,单片机技术已经成为现代电子技术的十分重要的 技术之一,可以使设计的电子产品更具智能化和