您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 基于单片机的简易电子琴设计
湖南文理学院课程设计报告课程名称:单片机课程设计专业班级:自动化10102班17号学生姓名:肖葵指导教师:王南兰完成时间:2013年6月13日报告成绩:湖南文理学院制评阅意见:评阅教师日期2013.6.20I摘要随着社会的发展进步,音乐逐渐成为人们生活中很重要的一部分,有人曾说喜欢音乐的人不会向恶。我们都会抽空欣赏世界名曲,作为对精神的洗礼。本论文设计一个基于单片机的简易电子琴。人们对于电子琴如何实现其功能,如音色选择、声音强弱控制、节拍器、自动放音功能等等也很好奇。电子琴是现代电子科技与音乐结合的产物,是一种新型的键盘乐器。它在现代音乐扮演着重要的角色,单片机具有强大的控制功能和灵活的编程实现特性,它已经溶入现代人们的生活中,成为不可替代的一部分。本文的主要内容是用AT89S52单片机为核心控制元件,设计一个电子琴。以单片机作为主控核心,与键盘、扬声器等模块组成核心主控制模块,在主控模块上设有16个按键和扬声器。本系统运行稳定,其优点是硬件电路简单,软件功能完善,控制系统可靠,性价比较高等,具有一定的实用和参考价值。关键词:AT89S51;音色节拍器;电子琴IIABSTRACTWiththedevelopmentofoursociety,musichasbecomeanimportantpartoflife.There’sasayinggoesthatpeoplewholikesmusiccannotbeanevil.Duringourlife,weoftenenjoyallkindsofmusicintheworldtobaptizeourspirits.Thisthesishasdesignedasimplemicrocontroller-basedelectronickeyboard.Wearecuriousaboutthefoundationofelectronickeyboard,suchasthechoiceoftimber,thecontrolofvolume,themetrononmeandautomaticplayback.Thekeyboardisaproductofmodernelectronictechnologycombinedwithmusic,itisanewtypeofkeyboardinstruments.Anditplaysanimportantroleinmodernmusic.Singlechiphasapowerfulcontrolfunctionsandflexibleprogrammingcharacteristics.Ithasconvergedwithmodernpeople'slives,becomeanirreplaceablepart.ThemaincontentisAT89S51controlofthecorecomponents,Designofanelectronicorgan,singlechipasahosttothecore,withthekeyboard,speakersandothercoremodulesmaincontrolmodule,inthemaincontrolmodulehas16keysandspeakers.Stabilityofthesystem,itsadvantagesaresimplehardwarecircuits,softwarefunctions,controlsystemreliability,highcostperformanceandhavecertainpracticalandreferencevalue.Keywords:singlechipMCUkeyboardspeakerelectronicorgan基于单片机的电子琴设计目录第一章设计方案分析..............................................................................................................11.1设计背景............................................................................................................................11.2设计任务...........................................................................................................................12.1总体设计............................................................................................................................1第二章电子琴总体电路图设计..............................................................................................32.1单片机最小系统................................................................................................................32.1.1AT89S52简介..........................................................................................................32.1.2时钟电路与复位电路.............................................................................................72.2显示部分设计....................................................................................................................72.2.1数码显示方式..........................................................................................................72.2.2八位数码管的结构..................................................................................................82.3按键模块设计....................................................................................................................82.3.1按键选取..................................................................................................................92.3.2键盘设计..................................................................................................................92.4发音模块设计.................................................................................................................10第三章程序设计....................................................................................................................123.1系统总体功能流程图.....................................................................................................123.2参数计算.........................................................................................................................123.3判断音阶(高中低音)子程序......................................................................................143.4播放子程序.....................................................................................................................15第四章Proteus软件仿真.....................................................................................................174.1编程环境PROTEUS.......................................................................................................174.2用PROTEUSISIS进行硬件电路绘制..........................................................................174.3下载HEX文件................................................................................................................194.4软件调试..........................................................................................................................20心得体会..................................................................................................................................22参考文献..................................................................................................................................23附录一原理图....................................................................................................
本文标题:基于单片机的简易电子琴设计
链接地址:https://www.777doc.com/doc-5589920 .html