基于单片机的电子八音盒设计.docVIP

  • 36
  • 0
  • 约1.07万字
  • 约 32页
  • 2018-03-27 发布于重庆
  • 举报
基于单片机的电子八音盒设计

摘 要 近年来随着科技的飞速发展,单片机的应用正在不断地走向深入。当今,利用单片机控制音乐播放举不胜举,而利用单片机存储音乐,控制播放最为广泛。它具有功能多﹑价格优﹑外围电路简单等特点,很受音乐爱好者及音乐芯片制造商的青睐。 本应用单片机原理和控制理论设计音乐器的硬件电路,并利用汇编语言进行程序设计。通过控制单片机内部的定时器产生不同频率的方波,驱动发出不同音调的音乐,再利用延迟来控制发音时间的长短。把乐谱转化成相应的定时常数就可以从发音设备中演奏出悦耳动听的音乐KeilC51和仿真软件PROTEUS对该音乐播放器进行仿真,完全实现所需功能。 关键词:单片机;蜂鸣器;音调;乐曲 Abstract In recent years, with the rapid development of science and technology, the application of SCM is continuously toward deeper. Today, using single-chip microcomputer control to play music examples are countless, but using single chip computer to storage music and control is the most widely used. It has the features of multi-function, optimal price, simple peripheral circuitry, very popular music lovers and music chip makers favor. This design is mainly applies single-chip principle and control theory to design the hardware circuit, and use assembly languages program design. Through the control of microcontroller timer to produce internal of different frequency, drive differ torque-current buzzer tones of music, reuse delay to control the pronunciation time length. My music into the corresponding time constant of pronunciation equipment can be playing in an euphonic hit music. Paper finally, using the KeilC51 and simulation software programming software for this music player PROTEUS simulation, complete implementation required functions. Keywords: SCM; Buzzer; Tones; music 目 录 引言 1 1 总体设计 2 1.1 设计意义和目的 2 1.2 设计功能要求 2 1.3 设计方案 2 1.4 设计原理 2 1.5 总体设计框图 3 2 硬件设计 4 2.1 电路组成及工作原理 4 2.1.1 电路组成 4 2.1.2 电路工作原理 4 2.2 AT89C51的简介 5 2.2.1 AT89C51功能概述 5 2.2.2 AT89C51的管脚图 5 2.2.3 AT89C51单片机的引脚介绍 5 2.3 晶振电路 6 2.4 扬声器电路 7 2.4.1 蜂鸣器简介 7 2.4.2 扬声器电路 7 2.5 显示电路 8 2.6 更换歌曲电路 9 2.7 复位电路 9 3 软件设计 10 3.1 软件系统介绍 10 3.2 编程语言的选择 10 3.3 演奏原理 10 3.3.1 如何产生音乐频率 10 3.3.2 如何产生节拍 12 3.4 歌谱 12 3.5 建立步骤 13 3.6 程序流程图 14 4 仿真和调试 15 4.1 常用调试工具 15 4.1.1 Keil C软件 15 4.1.2 PROTEUS软件 15 4.2系统调试及性能分析 16 4.3仿真结果 16 结束语 17 参考文献 18 谢 辞 19 附录1 元件明细表 20 附录2 源程序 21 引言 音乐盒的起源,可追溯至中世纪欧洲文艺复兴时期。

文档评论(0)

1亿VIP精品文档

相关文档