单片机电子琴系统程序设计
电 子 琴 的 设 计
摘 要:随着电子技术的迅速发展,特别是随大规模集成电路出现,给人类生活带来了根本性的改变。由其是单片机技术的应用产品已经走进了千家万户。
本文首先描述系统硬件工作原理,并附以系统结构框图加以说明,着重介绍了本系统所应用的各硬件接口技术和各个接口模块的功能及工作过程,其次,详细阐述了程序的各个模块和实现过程。本设计以数字集成电路技术为基础,单片机技术为核心。本文编写的主导思想是软硬件相结合,以硬件为基础,来进行各功能模块的编写。
本系统以单片机的汇编语言进行软件设计,增加了程序的可读性和可移植性,为了便于扩展和更改,软件的设计采用模块化结构,使程序设计的逻辑关系更加简洁明了。系统通过扬声器为载体发出声音,所以具有人性化的操作和悦耳的歌声。
关键词: 单片机; 电子琴; 音乐
Abstract:Along with the technical and quick development in electronics, appear with the large-scale integrated circuit especially, give mankind the life brought the changes of the root. From its is a single technical and applied product in a machine to has walked into the 10000 doors : thousand.
This text discusses to report to the police the design of the system primarily with realizes. Make use of the electric potential machine replace the air spreads to feel machine, change its electric resistance value to change electric voltage, again with solid hour input of the air density proceeds the comparison, distinguishing the light that produce the harmony controls the different reaction controls, notify the each customer unit.
The so-called water supply design handles the post-the waters according to the floor number, unit number, water supply type sum stanza the number display come out, and the amalgamation realizes water supply consumer of employment. The system passes loud speaker as to carry produces a sound, so have the humanized operation with the pleasing singing.
Key words: MCU Electronic organ Music
目 录
摘 要 1
第一章 绪 论 3
1.1 设计任务与要求: 3
1.2 设计目的 3
第二章 硬件设计 3
2.1 音乐的基本知识 3
2.2 音乐产生原理 4
2.3 硬件设计原理框图 7
2.4 流程图 8
2.5 基本功能介绍 11
第三章 单片机系统程序设计 15
3.1 发出七个音符程序 15
3.2 演奏“生日快乐歌”程序 17
第四章 软件与硬件的调试 20
4.1 Keil 工程的建立 20
4.2 工程文件建立 21
4.3 编译、连接 22
参 考 文 献: 747