基于单片机的简易电子琴设计

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

摘要随着科学技术的不断发展,单片机的应用日益成熟。单片机集成度高、处理功能强大、价格低廉使其在各个领域得到广泛应用。同时电子琴作科学技术与音乐共同发展的产物,在这个电子信息化的时代,为音乐的大众化做出了不可代替的贡献。本文主要介绍一种基于51单片机的简易电子琴设计方案。它采用了STC公司出品的一款低功耗、高性能单片机STC89C52芯片作为主控单元,与4*4矩阵键盘、复位电路、LED双位数码显示器、扬声器等组成主控核心模块。文章详细论述了电子琴硬件设计和软件结构设计流程,采用了AltiumDesigner09画出原理图、PCB图,通过Keil编程软件对电子琴进行软件编程,然后进行软硬件的调试运行并将程序烧录到STC89C52芯片中。此系统运行比较稳定,具有硬件设计电路简单、清晰,成本低,软件功能完善,控制系统牢靠,性价比高等优点,具有一定的实用和参考价值。关键词:STC89C52;电子琴;矩阵键盘基于单片机的简易电子琴设计IIAbstractAlongwiththedevelopmentofscienceandtechnology,theapplicationofSCMincreasinglymature.Singlechipmicrocomputerhighlevelofintegration,processingpowerful,lowpricesmakeitiswidelyusedinvariousfields.Atthesametimethekeyboardsforscienceandtechnologyandmusiccommondevelopmentoftheproduct,intheelectronicinformationera,formusic'spopulardocan'treplacecontribution.Thispapermainlyintroducesakindofsimplekeyboardbasedon51SCMdesignscheme.ItUSEStheSTCproductofourcompanyalowpowerconsumption,highperformancemicroprocessorSTC89C52chipsasthemasterunit,and4*4matrixkeyboardandresetcircuit,LEDdigitaldisplay,adoublemastercoremoduleandothercomponentsofthespeaker.Thispaperdiscussesthedesignofhardwareandsoftwarestructurekeyboarddesignprocess,theuseofaAltiumDesigner09drawadiagram,PCBfigure,throughtheKeilsoftwarekeyboardtosoftwareprogramming,thenthesoftwareandhardwaredebuggingrunandwillburntoSTC89C52chipprogram.Operationofthesystemisstableandhasthehardwarecircuitdesignsimple,clear,andthecostislow,thesoftwareperfectfunction,controlsystemfirm,pricehigheradvantages,hascertainpracticalandreferencevalue.Keywords:stc89c52;keyboard;matrixkeyboard基于单片机的简易电子琴设计目录摘要..........................................................................................................................................IAbstract..................................................................................................................................II1绪论.....................................................................................................................................11.1设计的目的和意义.......................................................................................................11.2设计的主要内容...........................................................................................................12系统概述.............................................................................................................................22.1系统工作原理...............................................................................................................22.2系统结构组成...............................................................................................................22.2.1电源电路................................................................................................................22.2.2控制部分................................................................................................................32.2.3显示部分................................................................................................................32.2.4发声部分................................................................................................................32.3主要芯片及元件的介绍...............................................................................................32.3.1STC89C52单片机简介..........................................................................................32.3.2芯片引脚介绍........................................................................................................42.3.3STC89C52时钟介绍..............................................................................................62.3.4双位LED数码显示器简介..................................................................................73硬件电路的设计.................................................................................................................93.1电源电路的设计...........................................................................................................93.2复位电路的设计.........................................................................................................103.2.1复位操作..............................................................................................................103.2.2复位信号及其产生..............................................................................................103.3键盘控制电路.............................................................................................................113.3.1矩阵式键盘的概述..............................................................................................113.3.2矩阵式键盘按键识别原理及方法......................................................................123.4显示电路.....................................................................................................................134系统软件设计...................................................................................................................144.1如何利用单片机实现音乐节拍.................................................................................144.2如何用单片机产生音频脉冲.....................................................................................144.2.1音符和频率的关系......

1 / 30
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功