欢迎来到天天文库
浏览记录
ID:314793
大小:531.50 KB
页数:0页
时间:2017-07-22
《毕业设计论文:基于51单片机的音乐发生器设计》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、本文是应用MCS-51单片机原理和控制理论技术设计音乐发生器的硬件电路,并利用C语言进行软件开发和程序设计。通过控制单片机内部的定时器产生不同频率的方波,驱动喇叭发出不同音调的音乐,再利用延迟控制发音时间的长短。把乐谱转化成相应的定时常数,从而达到从发音设备中演奏出悦耳动听的音乐的效果。该音乐盒主要由按键电路、复位电路、时钟电路以及蜂鸣器组成。使用两个按键控制音乐盒,一个用来切换歌曲,另一个用来切换8路LED的变化花样,本音乐盒共有两首歌曲,花样灯花样共计3种。播放歌曲时,蜂鸣器发出某个音调,与之对应的LED亮起。本设计利用KEIL编程软件对音乐盒源程序进行编程并调试
2、,配合PROTEUS仿真软件对硬件进行仿真调试,节约了设计时间。本系统采用C语言进行软件设计。正文中首先简单描述系统硬件工作原理,且附以系统硬件设计框图,论述了本次毕业设计所应用的各硬件接口技术和各个接口模块的功能及工作过程。其次阐述了程序的流程和实现过程。本文撰写的主导思想是软、硬件相结合,以硬件为基础,来进行各功能模块的编写。关键词单片机;音乐;C语言;STC89C51;KEIL;PROTEUSAbstractInthispaper,ThemusicgeneratoranditshardwarecircuitisdesignedbyMCS-51single-chi
3、pmicrocomputerprincipleandcontroltheory,andtheSoftwaredevelopmentandprogrammingarebasedonClanguageprogramming.AccordingtocontroltheMCUinternaltimertoproducedifferentfrequencySquarewavetodrivethehornsoundsofdifferenttonesofmusic,thenusethedelaytocontrolthelengthoftime.ThemusicTransformat
4、ionedintothetimingconstantscorrespondingsothatthesoundequipmentcanplayMelodiousmusic.Themusicboxismainlycomposedofkeypadcircuit,resetcircuit,clockcircuitandabuzzer.Twobuttonsareusedtocontrolthemusicbox,onetoswitchsongs,anotherisusedtoswitchthe8LEDpattern,themusicboxhastwosongs,atotalof3
5、kindsofpatternlightpattern.Whilethemusicisplaying,thebuzzersoundedatone,andthecorrespondingLEDlightsup.ThedesignofprogrammingthemusicboxanddebugsourcecodeusingKEILprogrammingsoftware,andtosavethedesigntimethePROTEUSsimulationsoftwareisusedtosimulatethehardwaredebugging.ThesystemusesClan
6、guageforsoftwaredesign.Firstly,inthetextdescribestheworkingprincipleofthesystemhardware,andattachedtothesystemblockdiagramofhardwaredesigntodiscussethefunctionandworkingprocessofthegraduationdesignandtheapplicationofthehardwareinterfacetechnologyandtheinterfacemodule.Secondly,expoundthe
7、proceduresandprocessestoachieveprocess.Themainideaofthiswritingisacombinationofsoftwareandhardware,onthebaseofhardware,writetoeachfunctionmodule.KeywordsSinglechip;music;Clanguage;STC89C51;KEIL;PROTEUS目录前言-1-1概述-3-1.1课题意义-3-1.2国内外研究的现状及发展趋势-3-1.3音乐发生器的扩展-4-1.3.1设计方案-4-251单片机介绍-
此文档下载收益归作者所有