{$cfg_webname}
主页 > 电子信息 > 单片机 >

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

来源:wenku163.com  资料编号:WK16314113 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9AWK16314113
资料介绍

基于51单片机的简易电子琴设计(任务书,开题报告,论文15000字)
摘  要
从国内古时宫商角徽羽到西方七声音阶,世界的不同国家对于音乐有着自己的发展进步,这样也就形成了音乐的多样性,也促进了音乐的交流融合。电子琴是现代科学技术与音乐相融的产物,它可以产生多种多样的音色的特点使它在现代音乐中越来越普及。单片机的体积小,功能强大,价格低廉,单片机在许许多多的领域得到了充分的应用。
本次设计是利用单片机STC89C52芯片为核心芯片,拓展外电路包括数码管,蜂鸣器,键盘电路共同实现设计。一首乐曲是由不同的音符组成的,每个音发出都有它独一无二的振动频率,根据这一特点利用单片机定时器\计数器来产生不同频率的脉冲的原理,通过驱动蜂鸣器使单片机发出旋律。在程序设计方面通过Keil软件给电子琴系统编程,在硬件电路设计方面通过Proteus软件仿真电路,测试电子琴系统的功能。
在仿真能够完美运行的基础上焊接了实物电路,从而实现电子琴的基本功能:①在初始中音状态下,按下音调功能切换按键可进行高低两个八度的变换。②按下音符切换按键可实现从do到si的21个音符显示播放。③存储歌曲,并能自动播放。最后完成系统实物电路,达到设计目标。
关键词:电子琴;STC89C52;定时器

Abstract
    From the ancient ancient palace to the emblem of the emblem to the Western seven sound scale, the world's different countries for music has its own development and progress, which also formed a variety of music, but also to promote the exchange of music integration. The electronic organ is the product of modern science and technology and music, it can produce a variety of characteristics of the sound so that it is more and more popular in modern music. Single-chip small size, powerful, low price, single-chip in many areas have been fully applied.
    This design is the use of single-chip STC89C52 chip as the core chip, to expand the external circuit, including digital control, buzzer, keyboard circuit to achieve the common design. A piece of music is composed of different notes, each tone has its unique vibration frequency, according to this feature using the microcontroller timer \ counter to generate the principle of different frequency pulse, by driving the buzzer to make the microcontroller melody. In the program design through the Keil software to the keyboard system programming, hardware circuit design through the Proteus software simulation circuit, test the function of the keyboard system.
    In the simulation can be run on the basis of the perfect operation of the physical circuit, in order to achieve the basic functions of the keyboard: ①in the initial midrange state, press the tone function switch button can be high and low two octave transformation.②Press the note switch button to achieve from DO to Si 21 note display playback.③storage songs, and can automatically play. Finally complete the system physical circuit, to achieve the design goals.
Key words: keyboard; STC89C52; timer
 

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


目  录
第1章 绪论    1
1.1 目的及意义    1
1.2 电子琴及单片机国内外现状    2
1.3 论文主要内容    3
1.4 章节安排    3
1.5 电子琴系统所用软件介绍    4
1.5.1 Keil    4
1.5.2 Proteus    4
1.6 本章小结    4
第2章 电子琴系统总体方案及硬件设计    5
2.1总体设计    5
2.2 系统各硬件模块介绍    6
2.2.1 时钟模块    6
2.2.2 复位模块    7
2.2.3 数码显示模块    8
2.2.4 按键模块    9
2.2.5 发音模块    11
2.3 本章小结    12
第3章 电子琴系统软件设计    12
3.1电子琴系统程序分析    12
3.2 电子琴系统发音设计    13
3.2.1发音原理    13
3.2.2 音阶频率对应单片机定时器初值计算    14
3.3音阶程序以及播放音乐程序设计    17
3.3.1 判断音阶(高中低音)子程序设计    17
3.3.2 播放子程序(包括自动播放存储音乐和按键发音)设计    18
3.4 本章小结    19
第4章 PROTEUS仿真以及电子琴系统实物展示    19
4.1仿真结果    19
4.2仿真中出现的问题    20
4.3实物展示    21
4.3实物电路中出现的问题    23
4.4程序编写中存在的问题    23
4.5 本章小结    23
第5章 总结与展望    24
5.1 总结    24
5.2 展望    25
参考文献    25
致  谢    26

推荐资料