收藏 分享(赏)

单片机程序设计之歌曲:天空之城.doc

上传人:精品资料 文档编号:10646013 上传时间:2019-12-13 格式:DOC 页数:5 大小:12.51KB
下载 相关 举报
单片机程序设计之歌曲:天空之城.doc_第1页
第1页 / 共5页
单片机程序设计之歌曲:天空之城.doc_第2页
第2页 / 共5页
单片机程序设计之歌曲:天空之城.doc_第3页
第3页 / 共5页
单片机程序设计之歌曲:天空之城.doc_第4页
第4页 / 共5页
单片机程序设计之歌曲:天空之城.doc_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

1、#include#include #define uchar unsigned char#define uint unsigned intsbit sound=P37; unsigned char n=0; unsigned char code music =0x83,0x14,0x75,0x14,0x6E,0x28,0x75,0x28,0x6E,0x28,0x57,0x28,0x75,0x28,0x75,0x28,0x75,0x28,0xAF,0x14,0xAF,0x14,0x83,0x28,0x93,0x28,0x83,0x28,0x6E,0x28,0x93,0x28,0x93,0x28,

2、0x00,0x28,0xAF,0x14,0xAF,0x14,0xA5,0x28,0xAF,0x28,0xA5,0x28,0x6E,0x14,0xAF,0x28,0xAF,0x28,0x00,0x14,0x6E,0x14,0x6E,0x28,0x75,0x28,0xA5,0x28,0xA5,0x28,0x75,0x28,0x75,0x50,0x00,0x28,0x83,0x14,0x75,0x14,0x6E,0x28,0x75,0x28,0x6E,0x28,0x57,0x28,0x75,0x50,0x00,0x28,0xAF,0x14,0xAF,0x14,0x83,0x28,0x93,0x28,

3、0x83,0x28,0x6E,0x28,0x93,0x28,0x93,0x50,0x00,0x14,0xAF,0x14,0xA5,0x28,0x6E,0x14,0x75,0x14,0x75,0x28,0x6E,0x28,0x62,0x14,0x62,0x14,0x57,0x14,0x6E,0x28,0x00,0x28,0x6E,0x28,0x75,0x28,0x83,0x14,0x83,0x14,0x75,0x28,0x93,0x28,0x83,0x50,0x00,0x28,0x6E,0x14,0x62,0x14,0x57,0x28,0x62,0x28,0x57,0x28,0x49,0x28,

4、0x62,0x50,0x00,0x28,0x49,0x14,0x49,0x14,0x6E,0x14,0x75,0x14,0x6E,0x28,0x57,0x28,0x57,0x50,0x00,0x14,0x00,0x14,0x83,0x14,0x75,0x14,0x6E,0x28,0x75,0x28,0x62,0x14,0x62,0x14,0x6E,0x28,0x93,0x28,0x93,0x28,0x00,0x28,0x52,0x28,0x57,0x28,0x62,0x28,0x6E,0x28,0x57,0x50,0x57,0x50,0x57,0x50,0x00,0x28,0x57,0x28,

5、0x41,0x50,0x49,0x50,0x57,0x14,0x62,0x14,0x6E,0x28,0x00,0x14,0x6E,0x14,0x62,0x28,0x6E,0x14,0x62,0x14,0x62,0x28,0x49,0x28,0x57,0x50,0x00,0x28,0x57,0x28,0x41,0x50,0x49,0x50,0x57,0x14,0x62,0x14,0x6E,0x50,0x00,0x28,0x6E,0x14,0x62,0x28,0x6E,0x14,0x62,0x14,0x62,0x28,0x75,0x28,0x41,0x50,0x00,0x28,0x83,0x14,

6、0x75,0x14,0x83,0x50,0x83,0x50,0xff,0x28;void int0() interrupt 1 TH0=0xd8;TL0=0x60;n-;void delay (unsigned char m) for(m=m;m0;m-) ;void delayms(unsigned char a) while(-a); void main() unsigned char p,m; unsigned char i=0;TMOD=0x01;TH0=0xd8;TL0=0x60;EA=1;ET0=1;while(1)p=musici;if(p=0xff) i=0;sound=0; delayms(5000);continue; else if(p=0x00) i=i+2;delayms(400); else m=musici+, n=musici+;TR0=1; while(n!=0) sound=sound,delay(m); TR0=0;

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报