题目基于单片机的音乐电子琴设计摘要电子琴的出现可以追溯到几百年前,在这个几百年的过程中,它已经从庙堂之高飞入寻常百姓家,成为再普通不过的商品了。作为最受大众喜爱的微型电子琴,功能齐全人性化,价格也是非常令人满意,喜爱最深的当属初学者。嵌入式电子技术的大步迈进也间接带动了微型电子琴技术的向前发展,单片机、PLC还有FGPA各有各自的长处。一般说来,好的产品优势之处总是不谋而合,音色效果极佳;技术成熟,系统不会紊乱;价格低;接口齐全等都是优势之处。本次设计以STC89C52单片机为核心,除了单片机以外,系统还有三个模块:分别为键盘扫描模块,扬声器模块,和液晶显示模块。本设计综合运用了硬件和软件,在这些基础上设计了一款简易的音乐电子琴,可以通过该设计实现对音乐的演奏。关键词:音乐电子琴;单片机;演奏ABSTRACTFromtheinventionoftheelectricpianoseveralhundredyearsagotonow,ithasenteredmillionsofhouseholdsandbecomeapopularcommodity.Especiallytheminiatureelectronickeyboard,althoughitischeap,butitispowerful,itisdeeplylovedbycustomers,especiallythosewhojuststartedtolearnpiano.Withthedevelopmentofembeddedelectronictechnology,thedevelopmentoftheminiatureelectronickeyboardhasbecomemoreandmoremature,andtheuseofsingle-chipmicrocomputers,PLCs,andFGPAhavetheirmerits.Butoverall,theoutstandingproductsaresimilar,thefirsttoproducehigh-qualitysoundeffects,thesecondismaturetechnology,thesystemisstable,thethirdislowcost,andthefourthisgoodscalability.ThisdesigntakestheSTC89C52MCUasthecore.BesidestheMCU,thesystemhasthreemodules:thekeyboardscanningmodule,thespeakermodule,andtheliquidcrystaldisplaymodule.Thedesignusesacombinationofhardwareandsoftware.Basedonthesedesigns,asimplemusickeyboardisdesignedtoenablemusictobeplayedthroughthedesign.Keywords:MusicElectronicorgan;Single-chipcomputer;Play目录第一章绪论............................................................................................................................11.1研究现状........................................................................................................................11.2课题研究的目的和意义.............................................................................................21.3国内外概况....................................................................................................................2第二章硬件部分.................................................................................................................42.1STC89C52单片机概述................................................................................................42.1.1晶振电路............................................................................................................72.1.2复位电路............................................................................................................82.2按键部分电路概述......................................................................................................82.3音阶设计原理............................................................................................................102.4Nokia5110显示简介................................................................................................122.5miniplay音乐模块概述.........................................................................................122.5.1主要功能及参数............................................................................................132.5.2实际应用................................................