1、 毕毕 业业 设设 计计 题目 模拟电子琴 系别 电气工程系 I 设计任务书 设计题目设计题目 模拟电子琴 设计要求设计要求 1.设计一个简单 8 按键的模拟电子琴,要求该电子琴具有自动播放乐曲的功 能; 2. 要求在电子琴按键和音乐之间有一个控制键来实现两者之间的转换; 3. 设计模拟电子琴的硬件电路及相应软件; 4. 接实验箱能正确显示设计结果。 设计进度要求设计进度要求 第一周:和老师联系分组分题目; 第二周:到图书馆,电子阅览室及相关地方查找资料; 第三周:继续查找资料并开始写设计思路; 第四周: 画相关的电路图及流程图; 第五周: 进行硬件设计; 第六周: 根据流程图及电路图进行软件
2、设计; 第七周: 调试修改交由老师检查并开始写毕业论文 第八周: 进行毕业答辩。 指导教师(签名) :指导教师(签名) : II 摘 要 本设计主要是通过对电子琴主体部分的电路进行模仿设计,利用 LM386 和中 断决定输出音调。达到电子琴固有的基本功能。 音节有不同频率的方波产生,利用定时器控制方波的频率。定时器记数溢出 后,产生中断,将 P1.0 借口取反即得周期方波。音的节拍有延时子程序来实现。 延时子程序实现基本延时时间。节拍值只是它的整数倍。本设计主要是通过对电 子琴主体部分的电路进行模仿设计,达到电子琴固有的基本功能。利用定时器可 发出不同频率的脉冲,不同频率的脉冲经喇叭驱动电路放
3、大滤波后,就会发出不 同音调。 具有成本低,维护方便,软件功能强,运行稳定可靠等优点。 关键词:单片机,电子琴,定时器 III Abstract The design of the flower mainly through the main part of the circuit design imitation, using LM386 and interrupt output decision pitch. Inherent to the basic functions of the flower. Syllable with a different frequency square w
4、ave, square wave of the frequency control timer. Hutchison few overflow timer, interrupt, will take anti-P1.0 pretext that a square wave cycle. Music beat delayed subroutine to achieve. Delay subroutine basically delay time. It just beats the whole value several times. The design of the flower mainly through the main part of the circuit design imitation, inherent to the basic functions of the flower. Timer can use a different