下载此文档

基于AT89S51单片机酒精浓度探测仪的设计与实现.doc


文档分类:办公文档 | 页数:约14页 举报非法文档有奖
1/ 14
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/ 14 下载此文档
文档列表 文档介绍
音乐播放器的制作
摘要
作为单片机的重要硬件资源之一,利用定时器可以产生各种固定频率的方波信号,也可以产生包括“Do“、“Re“、“Me“--等音阶在内的各种频率声音。在此设计中我们采用12MHz的晶振,,信号经过放大后由喇叭发出声音。
乐曲中,每一音符对应着确定的频率,我们可以参照给出的各音符频率及其相应的时间常数来编写程序,根据表中所提供的常数,将其16进制代码送入芯片里,可以奏出音符。音符的节拍我们可以用定时器T0来控制,送入不同的初值,就可以产生不同的定时时间。便如某歌曲的节奏为每分钟94拍,。其它节拍与时间的对应关系也可以从两者关系表中得到。
定时器T0工作在定时方式1,改变TH0及TL0,产生不同的音频频率。要编写的乐谱按要求以音符字节数据表的形式存放在程序中,改变乐曲就是通过改变该数据表的内容来实现的。主程序的任务是按顺序读取数据表中的字节,根据情况调用音级子程序和音长子程序,启动定时器T0进行工作。
关键词: 音乐播放器、节拍、音频频率
Abstract
SCM as important resources of the hardware, using the timer could have a variety of fixed-frequency square-wave signal,and also could have included "Do", "Re" and "Me" -- such as scale, the frequency sound ,In this design, we used 12 MHz oscillator, the frequency signal that the music signal output from mouth, After signal amplified by the loudspeaker to make their voices heard.
Music, each note corresponds to determine the frequency, We can refer to the notes given to the frequency and time constant corresponding to the preparation to the table provided by the constant, 16 to 229 of its code into the chip, and then the music can be celebrate the rhythms T0 timer can be used to control and to different initial value, it can have different timing exaple,some songs to the rhythm of each 94-minute film, a film of seconds. Other rhythms and the time relationship can also relations between the two tables.
Timer T0 work in a regular manner, cytokines and TL0 change, the different audio frequencies. To prepare the scores required to note byte data table in the form of stored procedures, change is the music of the data by changing the content to achieve main program is a sequential read data byte table, according to the sound level of the subroutine call and audio eldest son procedures, start timer T0 work.
Keywords:music player, beats, audio frequency
一、方案选择
利用AT89C2051和芯片LM386构成的音乐播放器
利用AT89C2051和芯片LM386构成的音乐播放器的电路图比较简单,而且LM386的放大和滤波效

基于AT89S51单片机酒精浓度探测仪的设计与实现 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数 14
  • 收藏数 1 收藏
  • 顶次数 0
  • 上传人 策划大师
  • 文件大小 0 KB
  • 时间2011-11-13
最近更新