综 合 设 计 任 务 书
学生班级:
学生姓名:
学号:
设计名称:
电子琴的设计与实现
起止日期:
2013.11.18—2013.12.15
指导教师:
设计要求:
利用单片机设计一简易电子琴。
功能要求:
(1) 按下不同按键,发出不同1 、2 、3、4 、5 、6 、7 七个音符;
(2) 用LED 或LCD显示当前按键。
总体要求:给出电路原理图、电路调试结果、程序源代码;提交设计报告。
综 合 设 计 学 生 日 志
时间
设计内容
2013.11.19-2013.11.22
相关资料的查找;
2013.11.23-2013.11.25
搭建硬件电路;
2013.11.26-2013.11.29
单片机基本知识的复习以及软件系统框架的搭建;
2013.11.30-2013.12.06
软件程序的编写和完善;
2013.12.07
软硬件结合调试,优化;
2013.12.08-2013.12.14
设计材料的整理和设计报告的书写。
电子琴的设计与实现
摘要
:
本次设计是xx专业专业方向设计,利用单片机设计简易电子琴。 其主要功能为:按下不同按键,发出不同1 、2 、3、4 、5 、6 、7 七个音符并且用LED 或LCD显示当前按键。选用stm32f103C8T6,它有8个定时器,部分定时器有多达4个用于输入捕获/输出比较/PWM或脉冲计数的通道和增量编码器输入。利用芯片内部相关定时器来输出PWM,从而来驱动蜂鸣器。通过读取外部按键输入的值来相应改变定时器相关寄存器的值,从而来改变PWM的输出频率来达到发出不同音调。
关键词:
STM32f103C8T6;PWM;定时器
The Design of the
Keyboard
Abstract
:
This design is the professional direction of biomedical engineering design
. U
sing Single Chip Microcomputer
to achieve a simple Keyboard. Its main function is: While a user
press
the different
keys, it will
make different sound
s from the
buzzer
and display
different
number
s which
correspond
ed
to the sounds. Using
stm32f103
- -
C8T6
as
control
chip. It has
16-bit timers
. Some of them with up to 4
IC/OC/PWM or pulse counter
. Making use of the Timers to
generat
e
driving signal
.
By reading the
state of the
external key to change the
frequency
of
output
.
D
ifferent frequency
of the
PWM
will
control
buzzer makes
different sounds
.
Key words:
STM32f103C8T6; PWM; Timer
一