摘 要:电子琴是信贷电子科技与古典乐器的完美结合,是一类新型的键盘乐器。它在 现今各类音乐领域中都扮演着重要的角色,而我们知道单片机因其具有强大的控制功 能和敏捷的编程特点,使它成为现代电子技术的聚光点。本论文的主要内容是以单片 机 AT89C52 为主控元件,设计一个 16 键简易电子琴。以单片机作为主控芯片,与键盘、 音频放大器等模块组成控制模块,设有 16 个按键和扬声器。该设计能够实现 16 种不 同的音阶,以及一首音乐的播放。本设计实现了在实现简单,价格便宜与性价比高, 系统稳定性好几个指标间平衡,因此具有很高的实用意义和开发前景。75644
毕业论文关键词:AT89C52,电子琴,单片机,音乐发生器
Abstact: Electronic organ is the perfect combination of credit electronic technology and classical musical instruments, and it is a new type of keyboard instruments。 It plays an important role in the field of modern music, and we know that the single chip has a strong control function and agile programming features, making it a focus of modern electronic technology。 The main content of this paper is based on SCM AT89C52 as the main control component, the design of a 16 key simple keyboard。 With single chip microcomputer as the main control chip, with the keyboard, audio amplifier module composed of control module, with 16 buttons and speakers。 The design is able to achieve 16 different scales, as well as a piece of music playback。 The realization of this design is simple, the price is cheap and cost-effective, and the system stability of several indicators of balance, so it has a very high practical significance and development prospects。
Key words: AT89C52, Electronic organ, Eingle chip microcomputer, Music generator
目 录
1 引言 4
1。1 设计电子琴的作用与目的 4
1。2 电子琴设计的要求 5
2 电子琴设计方案 5
2。1 设计框图 5
2。2 元件清单 6
3 硬件设计 7
3。1 AT89C52 单片机 7
3。2 音频功率放大器 LM386 10
3。3 4×4 矩阵键盘 10
3。4 时钟电路 11
3。5 复位电路 11
4 软件设计 12
4。1 程序流程图 12
5 工作原理 15
5。1 电子发声原理 16
5。2 音调产生 17
5。3 键盘功能实现 18
6 系统仿真及调试 18