文件名称:electric-piano
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.47kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
This example describes how to implement a scanning keyboard and then from the pressed key generate a corresponding defined sound frequency. Each time a key is pressed the corresponding frequency value is placed into the timer/counter register. When this counter counts to its maximum value an internal interrupt is generated and the interrupt routine is run. At this point the timer/counter register value is reloaded and the counting continues. In this way, by programming different values into the timer/counter register, different values of frequency can be generated. The internal interrupt routine contains code to change the state of the output port and thus generate the required frequency on a corresponding pin and create the desired note. By adding a suitable amplifier and speaker the system is complete. The important point of the software is to use the timer/counter as a counter to control the output frequency. This frequency has to be calculated.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
electric piano/piano.c
electric piano/piano.OPT
electric piano/piano.PRJ
electric piano
electric piano/piano.OPT
electric piano/piano.PRJ
electric piano
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.