本科毕业论文---电子音乐播放器的设计和制作正文.docVIP

  • 0
  • 0
  • 约2.64万字
  • 约 53页
  • 2016-12-16 发布于辽宁
  • 举报

本科毕业论文---电子音乐播放器的设计和制作正文.doc

摘要 本文是应用AT89S51单片机原理和控制理论设计音乐演奏控制器的硬件电路,并利用进行程序设计。通过控制单片机内部的定时器来产生不同频率的方波,驱动喇叭发出不同音调的音乐,再利用延迟来控制发音时间的长短。把乐谱转化成相应的定时常数就可以从发音设备中演奏出悦耳动听的音乐。性高,应用性强;软件程序适应范围广,对于不同的音乐只需要改变相应的定时常数即可。对单片机和音乐爱好者有一定的借鉴价值。Abstract This is the application AT89S51 microcontroller theory and control theory, music performance controller hardware, and using C51 microcontroller programming language. By controlling the MCU’s internal timer to generate square waves of different frequencies to drive speakers make different musical tones, and then use delay to control the length of pronunciation. The music into the corresponding time constants can be played from the sound equipment out of melodious music. In addition, the circuit can be easily added to the buttons control music playback, a simple display circuit and the corresponding keys, can clearly play order. This control circuit is simple, high reliability and strong applicability; software program to adapt to a wide range of different music just for the appropriate time constant change can be. MCU is used keil software more convenient. As the hardware design is simple, it is not easy to go wrong when welding, and convenient debugging. On the MCU and music lovers have some reference value. Keywords: microcontroller; control;music player; 目录 摘要 I Abstract II 1绪论 1 1.1立题背景 1 1.2音乐与音乐播放器 2 1.2.1音乐 2 1.2.2音乐播放器 3 2硬件的电路设计 3 2.1单片机的复位电路的设计 3 2.2显示电路设计 4 2.2.1 LED基本理论知识 4 2.2.2发光二极管的检测 6 2.2.3数码管与单片机的简单接口实验 7 2.3单片机的振荡电路的设计 8 2.4 控制电路设计 9 2.5 LM386音频功率放大器 10 3软件实现 12 3.1音乐产生的方法 12 3.2程序设计流程图 17 3.3定时器/计数器的选择 18 3.3.1定时器的选择 18 3.3.2 89S51定时功能及工作方式选择 18 3.3.3 计数器 19 3.4定时器/计数器的控制寄存器 19 3.5中断 21 3.5.1定时中断源 21 3.5.2中断控制 21 3.5.3中断初始化与中断控制寄存器状态设置 23 3.6本章小结 24 4程序的调试及测试 25 4.1检测有无键按下 25 4.2程序编译 25 4.3调试过程 27 4.3.1软件的调试 27 4.3.2硬件的调试 29 4.4本章小结 31 5结束语 32 致 谢 33 参考文献 34 附录A 程序清单 35 附录B 设计总电路图 47 附录C 硬件实物 48 1绪论 1.1立题背景 随着信息技术革命的深入和计算机技术的飞速发展,单片机的应用越来越广泛,并逐渐发展成为一门关键的技术学科。单片机具有一些突出优点:体积小、重量轻、耗电少、电源单一、功能强、价格低、运行速度快、抗干扰能力强、可靠性高,所以在通信、家电、工业控制、仪器

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档