1、 共 页 第 页 摘摘 要要 随着社会的发展进步,音乐逐渐成为我们生活中很重要的一部分,有人曾说喜欢音乐 的人不会向恶。我们都会抽空欣赏世界名曲,作为对精神的洗礼。本论文设计一个基于单 片机的简易电子琴。我们对于电子琴如何实现其功能,如音色选择、自动放音功能等等也 很好奇。 电子琴是现代电子科技与音乐结合的产物,是一种新型的键盘乐器。它在现代音乐扮 演着重要的角色,单片机具有强大的控制功能和灵活的编程实现特性,它已经溶入现代人 们的生活中,成为不可替代的一部分。本文的主要内容是用 STC89C51 单片机为核心控制 元件,设计一个电子琴。以单片机作为主控核心,与键盘、扬声器等模块组成核心主控制
2、 模块,在主控模块上设有 12 个按键和一个扬声器。本系统运行稳定,其优点是硬件电路简 单,软件功能完善,控制系统可靠,性价比较高等,具有一定的实用和参考价值。 关键词:关键词:STC89C51,电子琴,数码管 共 页 第 页 ABSTRACT With the development and progress of society, music has become an important part of life, it was said that people do not like the music to the evil. We will find time to enjoy t
3、he world music, as the baptism of the spirit. This thesis developed a simple microcontroller-based electronic key board. Electronic organ is a modern electronic music technology and the product is a new type of keyboard instruments. It modern music played an important role in single chip is a powerf
4、ul control functions and flexible programming characteristics, It has converged with modern peoples lives, become an irreplaceable part. The main content is STC89C51 control of the core components, Design of an electronic organ, single chip as a host to the core, with the keyboard, speakers and othe
5、r core modules main control module, in the main control module has 16 keys and speakers. Stability of the system, its advantages are simple hardware circuits, software functions, control system reliability, high cost performance and have certain practical and reference value. Key words: STC89C51, el
6、ectronic organ,led display 共 页 第 页 目目 录录 摘 要 . 1 ABSTRACT 2 目 录 . 3 第一章 绪论 . 5 1.1 电子琴设计的背景及意义 . 5 1.2 电子琴设计的目标 5 1.3 方案的比较和选择 . 6 第二章 硬件设计及说明 . 6 2.1 系统组成及总体框图 . 6 2.2 元件简介 . 7 2.2.1 STC89C51 . 7 2.2.2 9013 . 10 2.2.3 LED 数码管 11 2.3 各功能模块原理图 12 2.3.1 STC89C51 模块电路原理图 12 2.3.2 键盘扫描模块电路原理图 . 13 2.3.3 数码管显示模块电路原理图 . 13 2.3.4 音频处理模块电路原理图 . 14 第三章 软件设计 . 14 3.1 音乐相关知识 14 3.2 如何用单片机产生音频脉冲 . 14 3.3 系统总体功能流程图 . 15 第四章 系统调试 . 15 4.1 硬件调试 . 15 4.2 软件调试 16 第五章 课程设计总结以及心得体会 . 16 共