各种版本的《生日快乐》歌

各种版本的《生日快乐》歌

ID:34750434

大小:51.03 KB

页数:9页

时间:2019-03-10

各种版本的《生日快乐》歌_第1页
各种版本的《生日快乐》歌_第2页
各种版本的《生日快乐》歌_第3页
各种版本的《生日快乐》歌_第4页
各种版本的《生日快乐》歌_第5页
资源描述:

《各种版本的《生日快乐》歌》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、#include#defineucharunsignedchar#defineuintunsignedintsbitBEEP=P2^6;voidMusic(ucharnumber);voiddelay10us(uchartime);voiddelay50us(uchartime);ucharcodeSOUNDLONG[]=//控制音调{18,6,24,24,24,48,18,6,24,24,24,48,18,6,24,24,24,24,24,18,6,24,24,24,48,0};ucharcodeSOUNDTONE[]=//控制

2、音色{212,212,190,212,159,169,212,212,190,212,142,159,212,212,106,126,159,169,190,119,119,126,159,142,159,0//生日快乐end};voidPlay_Music(){uintk,n;uintSoundLong,SoundTone;uinti,j,m;do{if(i>=25)i=0;SoundLong=SOUNDLONG[i];SoundTone=SOUNDTONE[i];i++;for(n=0;n

3、;k++){BEEP=0;for(m=0;m

4、

5、(SOUNDTONE[j]!=0));}//延时程序voiddelay10us(uchartime){uchara,c;for(a=0;a

6、+);}voidmain(){while(1){Play_Music();//生日快乐delay10us(250);}}//-----------------------------------------------------//<<12*12点阵+音乐产生>>//MCU:89C51晶振:12M//编写日期:2010。12。25//编写人:李春起#include#defineucharunsignedchar#defineuintunsignedintuinta=0,a1=0,a2=0;uintmiusfla,miust,mi

7、us=64536;uintdisfla1,sta=0;charflag=0,mdflag=0;sbitk1=P3^2;sbitk2=P3^3;sbitYY=P3^1;ucharcodetabfas[]={//==============笑脸===================================//P0口0xFF,0xFF,0xFF,0xFF,0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x

8、7F,//P1口0x8E,0x4D,0xAB,0x57,0x5F,0x9F,0x9F,0x5F,0x5F,0xAF,0x4F,0x8F,0x8E,0x4D,0xAB,0x97,0x9F,0x9F,0x9F,0x9F,0x9F,0xAF,0x4F,0x8F,//P2口0x87,0x88,0x50,0x20,0xA4,0x68,0x68,0xA4,0x20,0x50,0x88,0x87,0x87,0x88,0x50,0x20,0xA4,0x68,0x68,0xA4,0x20,0x50,0x88,0x87,//P0口0xFF,0xFF,0xFF,0xFF

9、,0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0

10、x7F,0xFF,0xFF,0xFF,0xFF,0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。