找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5561|回复: 3
收起左侧

单片机数字音乐盒课程设计说明书

[复制链接]
ID:330903 发表于 2018-5-16 14:24 | 显示全部楼层 |阅读模式
《单片机原理与应用课程设计》说明书
  • 摘要
本设计是以AT89C51芯片的电路为基础,利用keil和proteus仿真软件,设计出一个多功能音乐盒。音乐盒主要由五大模块构成,包括AT89C51芯片、4*4矩阵键盘、蜂鸣器、晶振复位电路和12864液晶显示器。有开机键(开机时显示welcom),暂停键、播放键、上一曲、下一曲以及10个用来选择歌曲的键。此外用户可以按照自己的喜好选择音乐并将其转化成机器码存入单片机的存储器中。对于不同型号的单片机只需要相应的改变一下地址即可。该软、硬件系统具有很好的通用性,很高的实际使用价值。

  • 原理描述
  2.1芯片AT89C51的介绍
AT89C51是一种带4K字节闪存可编程可擦除只读存储器(FPEROM—Flash Programmable and Erasable Read Only Memory)的低电压,高性能CMOS 8位微处理器,俗称单片机。AT89C2051是一种带2K字节闪存可编程可擦除只读存储器的单片机。单片机的可擦除只读存储器可以反复擦除100次。该器件采用ATMEL高密度非易失存储器制造技术制造,与工业标准的MCS-51指令集和输出管脚相兼容。由于将多功能8位CPU和闪烁存储器组合在单个芯片中,ATMEL的AT89C51是一种高效微控制器,AT89C2051是它的一种精简版本。AT89C51单片机为很多嵌入式控制系统提供了一种灵活性高且价廉的方案。外形及引脚排列如图2.1所示
图3.2 AT89C51引脚排列图
    2.2 LCD12864的显示
12864是一种图形点阵液晶显示器,它主要由行驱动器/列驱动器及128×64全点阵液晶显示器组成。它有8页(8行一页)、128列,可完成图形显示,也可以显示8×4个汉字。
12864硬件模块说明:
图2.2中,IC1为行驱动器,IC2、IC3为行驱动器,外部的CPU通过13根线对模块进行控制。其中DB7—DB0为并行数据总线,E、R/W、D均为控制信号线,CSA、CSB则为选屏信号,分别控制左、右半屏。
图2.2  12864的硬件模块图
2.3 音调的产生
频率的高低决定了音调的高低。音乐的十二平均率规定:每两个八度音(如简谱中的中音1和高音1)之间的频率相差一倍。在两个八度音之间又分为十二个半音。另外,音名A(简谱中的低音6)的频率为440Hz,音名B到C之间、E到F之间为半音,其余为全音。由此可以计算出简谱中从低音1到高音1之间每个音名对应的频率,所有不同频率的信号都是从同一个基准频率分频得到的。
1、要产生音频脉冲,只要算出某一音频的周期(1/频率),然后将此周期除以2,即为半周期的时间。利用定时器计时这半个周期时间,每当计时到后就将输出脉冲的I/O反相,然后重复计时此半周期时间再对I/O反相,就可在I/O脚上得到此频率的脉冲。
              2、利用AT89C51的内部定时器使其工作在计数器模式MODE1下,改变计数值TH0及TL0以产生不同频率的方法。
              此外结束符和休止符可以分别用代码00H和FFH来表示,若查表结果为00H,则表示曲子终了;若查表结果为FFH,则产生相应的停顿效果。
              3、例如频率为523Hz,其周期T=1/523=1912us,因此只要令计数器计时956us/1us=956,在每次技术956次时将I/O反相,就可得到中音DO(523Hz)。
              计数脉冲值与频率的关系公式如下:
              N=Fi2Fr                                                      
N:计算值;                            Fi:内部计时一次为1us,故其频率为1MHz;      
4、其计数值的求法如下:
初值T=65536-N=65536-Fi2Fr
例如:设K=65536,F=1000000=Fi=1MHz,球低音DO(261Hz)。中音DO(523Hz)。高音的DO(1046Hz)的计算值
T=65536-N=65536-Fi2Fr=65536-10000002Fr=65536-500000/Fr
低音DO的T=65536-500000/262=63627
低音DO的T=65536-500000/523=64580
低音DO的T=65536-500000/1047=65059
  • C调各音符频率与计数值T的对照表如表4.1所示。
表2.3  C调各音符频率与计数值T的对照表
低音
频率
N
参数
中音
频率
N
参数
高音
频率
N
参数
Do
262
1908
229
Do
523
956
115
Do
1046
57
57
Do#
277
1805
217
Do﹟
554
903
108
Do﹟
1109
54
54
Re3
294
1701
204
Re
587
852
102
Re
1175
51
51
Re﹟
311
1608
193
Re﹟
622
804
97
Re﹟
1245
48
48
Mi
330
1515
182
Mi
659
759
91
Mi
1318
45
45
Fa
349
1433
172
Fa
698
716
86
Fa
1397
43
43
Fa﹟
370
1351
162
Fa﹟
740
676
81
Fa﹟
1480
41
41
So
392
1276
153
So
784
638
77
So
1568
38
38
So﹟
415
1205
145
So﹟
831
602
72
So﹟
1661
36
36
La
440
1136
136
La
880
568
68
La
1760
34
34
La﹟
464
1078
129
La﹟
932
536
64
La﹟
1865
32
32
Si
494
1012
121
Si
988
506
61
Si
1976
30
30

2.4 节拍的确定
若要构成音乐,光有音调是不够的,还需要节拍,让音乐具有旋律(固定的律动),而且可以调节各个音的快满度。“节拍”,即Beat,简单说就是打拍子,就像我们听音乐不自主的随之拍手或跺脚。若1拍实0.5s,则1/4 拍为0.125s。至于1拍多少s,并没有严格规定,就像人的心跳一样,大部分人的心跳是每分钟72下,有些人快一点,有些人慢一点,只要听的悦耳就好。音持续时间的长短即时值,一般用拍数表示。休止符表示暂停发音。
一首音乐是由许多不同的音符组成的,而每个音符对应着不同频率,这样就可以利用不同的频率的组合,加以与拍数对应的延时,构成音乐。了解音乐的一些基础知识,我们可知产生不同频率的音频脉冲即能产生音乐。对于单片机来说,产生不同频率的脉冲是非常方便的,利用单片机的定时/计数器来产生这样的方波频率信号。因此,需要弄清楚音乐中的音符和对应的频率,以及单片机定时计数的关系。
表2.41节拍与节拍码对照
节拍码
节拍数
节拍码
节拍数
1
1/4拍
1
1/8拍
2
2/4拍
2
1/4拍
3
3/4拍
3
3/8拍
4
1拍
4
2/1拍
5
1又1/4拍
5
5/8拍
6
1又1/2拍
6
3/4拍
8
2拍
8
1拍
A
2又1/2拍
A
1又1/4拍
C
3拍
C
1又1/2拍
F
3又3/4拍

每个音符使用1个字节,字节的高4位代表音符的高低,低4位代表音符的节拍,表2.41为节拍码的对照。如果1拍为0.4秒,1/4拍实0.1秒,只要设定延迟时间就可求得节拍的时间。假设1/4拍为1DELAY,则1拍应为4DELAY,以此类推。所以只要求得1/4拍的DELAY时间,其余的节拍就是它的倍数,如图5.3为1/4和1/8节拍的时间设定。
表2.42 1/4和1/8节拍的时间设定
曲调值
DELAY
曲调值
DELAY
调4/4
125毫秒
调4/4
62毫秒
调3/4
187毫秒
调3/4
94毫秒
调2/4
250毫秒
调2/4
125毫秒

2.5 音符的编码
do re mi fa so la si分别编码为1~7,重音do编为8,重音re编为9,停顿编为0。播放长度以十六分音符为单位(在本程序中为165ms),一拍即四分音符等于4个十六分音符,编为4,其它的播放时间以此类推。音调作为编码的高4位,而播放时间作为低4位,如此音调和节拍就构成了一个编码。以0xff作为曲谱的结束标志。
举例1:音调do,发音长度为两拍,即二分音符,将其编码为0x18
举例2:音调re,发音长度为半拍,即八分音符,将其编码为0x22
歌曲播放的设计。先将歌曲的简谱进行编码,储存在一个数据类型为unsigned char 的数组中。程序从数组中取出一个数,然后分离出高4位得到音调,接着找出相应的值赋给定时器0,使之定时操作蜂鸣器,得出相应的音调;接着分离出该数的低4位,得到延时时间,接着调用软件延时。
  • 程序设计与硬件电路
3.1设计思路
程序设计部分主要有:字模部分、LCD12864显示、简谱音调及节拍、计时、键盘扫描部分。硬件设计部分见下图3.11:
设计思路见如下实验控制流程图3.12:
3.2 设计程序见附件
  • 仿真调试及操作说明
1、按下开机键ON/C
2、按下歌曲键0播放第一首歌
3、操作说明
4×4键盘共16个键,操作说明如下:
“0”:歌曲0,《母亲》
“1”:歌曲1,《世上只有妈妈好》
“2”:歌曲2,《儿行千里》
“3”:歌曲3,《感恩的心》
“4”:歌曲4,《七子之歌》
“5”:歌曲5,《小青蛙》
“6”:歌曲6,《找朋友》
“7”:歌曲7,《千年之恋》
“8”:歌曲8,《两只老虎》
“9”:歌曲9,《寂寞沙洲冷》
“ON/C”:开机键
“=”:暂停键,此时音乐和播放时间都暂停
“×”(乘号):播放键
“+”:下一曲,播放下一首歌曲
“-”:上一曲,播放上一首歌曲
  • 心得体会
参考资料
[1] 谭浩强.C语言程序设计(第二版)[M],北京:清华大学出版社,1991.
[2] 曾屹.单片机原理与应用(第一版)[M],中南大学出版社,2009.

单片机源程序如下:
  1. /* C语言音乐盒源程序设计 */
  2. #include <reg51.h>
  3. #include <intrins.h>
  4. #define uchar unsigned char
  5. #define uint  unsigned int
  6. uchar count=0,count1=0;              //count1 歌曲标志
  7. uchar key,count2,h=1,i;     
  8. uchar  temp;     //temp歌调
  9. uchar s1,s2,m1,m2;
  10. uchar second,minute,j=0;
  11. void delay1(uint z);              //延时1ms
  12. sbit key2=P3^2;              // 按key2可切换歌曲
  13. sbit key1=P3^3;
  14. sbit fm=P3^7;//蜂鸣器连续的IO口
  15. sbit rs=P2^2;
  16. sbit rw=P2^1;  
  17. sbit e=P2^0;   
  18. sbit busy=P0^0;            
  19. sbit CS1=P2^4;  
  20. sbit CS2=P2^3;  
  21. //==================字模====================//
  22. char code shu[22][8]={
  23. {0xFF,0x1F,0xEF,0xF7,0xF7,0xEF,0x1F,0xFF},
  24. {0xFF,0xF0,0xEF,0xDF,0xDF,0xEF,0xF0,0xFF},/*"0",0*/
  25. {0xFF,0xEF,0xEF,0x07,0xFF,0xFF,0xFF,0xFF},
  26. {0xFF,0xDF,0xDF,0xC0,0xDF,0xDF,0xFF,0xFF},/*"1",1*/
  27. {0xFF,0x8F,0xF7,0xF7,0xF7,0x77,0x8F,0xFF},
  28. {0xFF,0xCF,0xD7,0xDB,0xDD,0xDE,0xCF,0xFF},/*"2",2*/
  29. {0xFF,0xCF,0xF7,0x77,0x77,0xB7,0xCF,0xFF},
  30. {0xFF,0xE7,0xDF,0xDF,0xDF,0xEE,0xF1,0xFF},/*"3",3*/
  31. {0xFF,0xFF,0x3F,0xDF,0xEF,0x07,0xFF,0xFF},
  32. {0xFF,0xF8,0xFB,0xDB,0xDB,0xC0,0xDB,0xFF},/*"4",4*/
  33. {0xFF,0x07,0xF7,0x77,0x77,0xF7,0xF7,0xFF},
  34. {0xFF,0xE6,0xDE,0xDF,0xDF,0xEE,0xF1,0xFF},/*"5",5*/
  35. {0xFF,0x1F,0xEF,0x77,0x77,0xE7,0xFF,0xFF},
  36. {0xFF,0xF0,0xEE,0xDF,0xDF,0xEE,0xF1,0xFF},/*"6",6*/
  37. {0xFF,0xC7,0x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,0xEF,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0xDF,0xC0,0xDF,0xDF,0xFF,0xFF},/*"1",8*/
  81. {0xFF,0xFF,0x3F,0xDF,0xEF,0x07,0xFF,0xFF,0xFF,0xF8,0xFB,0xDB,0xDB,0xC0,0xDB,0xFF},/*"4",9*/
  82. };
  83. char code _muqin[15][16]={
  84. {0xBF,0xBF,0xBF,0x01,0xBD,0xBD,0xB5,0x8D,0xBD,0xBD,0xBD,0x01,0xBF,0xBF,0xBF,0xFF},
  85. {0xFF,0xFF,0xFF,0xF0,0xF7,0xF7,0xF6,0xF1,0xF7,0xB7,0x77,0x80,0xF7,0xF7,0xFF,0xFF},/*"母",0*/
  86. {0xFF,0xBF,0xBB,0xBB,0xB3,0x8B,0xBA,0x39,0xBB,0x9B,0xA3,0xAB,0xBB,0xBB,0xBF,0xFF},
  87. {0xFF,0xBF,0xDD,0xE5,0xED,0xBD,0x7D,0x80,0xFD,0xFD,0xF5,0xED,0x8D,0xDD,0xFF,0xFF},/*"亲",1*/
  88. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",0*/
  89. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",1*/
  90. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",0*/                              
  91. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",1*/
  92. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",2*/
  93. {0xFF,0xFF,0x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E7,0xF1,0xFB,0xFF,0xFF,0xFF,0xFD,0xFB,0xE6,0x8F,0xDF,0xFF},/*"只",2*/
  107. {0xFF,0xFB,0x7B,0xBB,0x1B,0xCB,0xD3,0xD8,0xDB,0xDB,0xDB,0x1B,0xFB,0xFB,0xFB,0xFF},
  108. {0xFD,0xFE,0xFF,0xFF,0x00,0xF6,0xF6,0xF6,0xD6,0xB6,0x36,0x80,0xFF,0xFF,0xFF,0xFF},/*"有",3*/
  109. {0xEF,0xEF,0x0F,0xE0,0xEF,0x0F,0xFF,0xFD,0x05,0x7D,0x7D,0x7D,0x01,0x7F,0x7F,0xFF},
  110. {0xBF,0xDD,0xEA,0xF3,0xF4,0x8F,0xDB,0xFB,0xFB,0xFB,0xFB,0xBB,0x7B,0xBF,0xC0,0xFF},/*"妈",4*/
  111. {0xEF,0xEF,0x0F,0xE0,0xEF,0x0F,0xFF,0xFD,0x05,0x7D,0x7D,0x7D,0x01,0x7F,0x7F,0xFF},
  112. {0xBF,0xDD,0xEA,0xF3,0xF4,0x8F,0xDB,0xFB,0xFB,0xFB,0xFB,0xBB,0x7B,0xBF,0xC0,0xFF},/*"妈",5*/
  113. {0xEF,0xEF,0x0F,0xE0,0xEF,0x0F,0x7F,0x7D,0x7D,0x7D,0x0D,0x75,0x79,0x7D,0x7F,0xFF},
  114. {0x7F,0xBC,0xDD,0xEB,0xF3,0x8C,0xDF,0xFF,0xBF,0x7F,0x80,0xFF,0xFF,0xFF,0xFF,0xFF},/*"好",6*/
  115. };
  116. char code _exql[14][16]={{0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0xFF,0xFF,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
  117. {0xFF,0x7F,0xBF,0xCF,0xF3,0xFC,0xFF,0xFF,0xFF,0xC0,0xBF,0xBF,0xBF,0xBF,0x87,0xFF},/*"儿",0*/
  118. {0xEF,0xF7,0x7B,0x39,0x8C,0xDD,0xBF,0xBB,0xBB,0xBB,0x3B,0xB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. };
  131. char code _ganen[14][16]={
  132. {0xFF,0xFF,0x03,0xEB,0x2B,0xAB,0xAB,0x2B,0xFB,0xC0,0x3B,0xBA,0xC9,0xFB,0xFF,0xFF},
  133. {0xFB,0xBC,0x8F,0xFF,0xC6,0xBE,0xBE,0xB6,0xAF,0xBD,0xBE,0x9E,0xF5,0xCB,0xD8,0xFF},/*"感",0*/
  134. {0xFF,0xFF,0xFF,0x00,0x7E,0x76,0x36,0x56,0x60,0x56,0x36,0x76,0x00,0xFF,0xFF,0xFF},
  135. {0xFF,0xCF,0xF3,0xFF,0xC3,0xBF,0xBF,0xBD,0xB3,0xBF,0xBF,0x8F,0xFB,0xC7,0xEF,0xFF},/*"恩",1*/
  136. {0xFF,0x07,0x73,0x74,0x77,0x07,0xBF,0xCF,0x70,0xF7,0xF7,0xF7,0xF7,0x07,0xFF,0xFF},
  137. {0xFF,0x80,0xEF,0xEF,0xEF,0xC0,0xFF,0xFF,0xFF,0xFC,0xD9,0xBF,0xDF,0xE0,0xFF,0xFF},/*"的",2*/
  138. {0xFF,0x7F,0xFF,0xFF,0x0F,0xFF,0xFE,0xFD,0xE3,0xF7,0xFF,0xBF,0x7F,0xFF,0xFF,0xFF},
  139. {0xFB,0xFC,0xFF,0xFF,0xC0,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0x87,0xFF,0xF8,0xFD,0xFF},/*"心",3*/
  140. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",0*/
  141. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",1*/
  142. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",2*/
  143. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",3*/
  144. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",4*/
  145. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",5*/
  146. };
  147. char code _jmszl[14][16]={
  148. {0xFF,0xE7,0xFB,0xFB,0x03,0xDB,0xDB,0xDA,0x39,0xDB,0xDB,0xDB,0x1B,0xF3,0xFB,0xFF},
  149. {0xDF,0xEE,0xB2,0x7E,0x80,0xFA,0x46,0xAE,0xDF,0xEC,0xF3,0xED,0xDE,0x3F,0xBF,0xFF},/*"寂",0*/
  150. {0xEF,0xF3,0xEB,0x2B,0xAB,0x83,0xAA,0xA9,0xAB,0x83,0xAB,0x2B,0xEB,0xF3,0xFB,0xFF},
  151. {0xFF,0x6F,0x6F,0xA8,0xAA,0xCA,0xCA,0xE2,0xCA,0xAA,0xAA,0x68,0x6F,0x7F,0xFF,0xFF},/*"寞",1*/
  152. {0xFF,0xEF,0xDE,0x79,0x9F,0x7F,0x9F,0xE7,0xFF,0x00,0xFF,0xF7,0xEF,0xDF,0xBF,0xFF},
  153. {0xFB,0xFB,0x01,0xFE,0x7F,0x7F,0xBF,0xBF,0xDF,0xDC,0xEF,0xF7,0xFB,0xFC,0xFF,0xFF},/*"沙",2*/
  154. {0xEF,0x9E,0x79,0x8F,0xDF,0xBF,0x00,0xDF,0xBF,0xFF,0x01,0xDF,0xBF,0x00,0xFF,0xFF},
  155. {0xFB,0x03,0xFC,0xBF,0xDF,0xE7,0xF8,0xFF,0xFF,0xFF,0x80,0xFF,0xFF,0x00,0xFF,0xFF},/*"洲",3*/
  156. {0xFD,0xE3,0x37,0xCF,0xBF,0xDF,0xEF,0xF3,0xDC,0x3B,0xF7,0xEF,0xCF,0x9F,0xDF,0xFF},
  157. {0xFD,0x81,0xFE,0xFF,0xFE,0xFE,0xFE,0xF6,0xEE,0x8E,0xD6,0xF8,0xFE,0xFF,0xFF,0xFF},/*"冷",4*/
  158. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",0*/
  159. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",1*/
  160. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",2*/
  161. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",3*/
  162. };
  163. char code _tiger[14][16]={
  164. {0xFD,0x0D,0xED,0xED,0xED,0x01,0x6D,0xED,0xED,0x01,0xED,0xED,0xED,0x04,0xED,0xFF},
  165. {0xFF,0x80,0xF7,0xFB,0xFC,0xFF,0xEF,0xF6,0xF9,0xFE,0xFE,0xD9,0xBF,0xC0,0xFF,0xFF},/*"两",0*/
  166. {0xFF,0xFF,0xFF,0x01,0x7D,0x7D,0x7D,0x7D,0x7D,0x7D,0x7D,0x7D,0x01,0xFF,0xFF,0xFF},
  167. {0xFF,0xBF,0xDF,0xCE,0xE7,0xF1,0xFB,0xFF,0xFF,0xFF,0xFD,0xFB,0xE6,0x8F,0xDF,0xFF},/*"只",1*/
  168. {0xBF,0xBB,0xBB,0xBB,0xBB,0xBB,0x80,0x3B,0x3B,0xBB,0x9B,0xAB,0xB1,0xBB,0xBF,0xFF},
  169. {0xF7,0xF7,0xFB,0xFB,0xFD,0xC1,0xB6,0xB7,0xBB,0xBB,0xBD,0xBD,0xBF,0x8F,0xFF,0xFF},/*"老",2*/
  170. {0xFF,0xFF,0x07,0xF7,0xB7,0xB7,0xB7,0x00,0x55,0x55,0x55,0x75,0x27,0xF7,0xFF,0xFF},
  171. {0x7F,0x9F,0xE0,0x7F,0xBF,0xC1,0xFD,0xFD,0xFD,0xC1,0xBF,0xBF,0xBF,0x87,0xDF,0xFF},/*"虎",3*/
  172. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",0*/
  173. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",1*/
  174. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",2*/
  175. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",3*/
  176. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",4*/
  177. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",5*/
  178. };
  179. char code _qnzl[14][16]={
  180. {0xBF,0xBF,0xBB,0xBB,0xBB,0xBB,0xBB,0x03,0xBD,0xBD,0xBD,0xBC,0xBD,0x9F,0xBF,0xFF},
  181. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*"千",0*/
  182. {0xBF,0xDF,0xEF,0xF3,0x1C,0xDD,0xDD,0xDD,0x01,0xDD,0xDD,0xDD,0xDD,0xFD,0xFF,0xFF},
  183. {0x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0xFF},/*"友",2*/
  234. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",0*/
  235. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",1*/
  236. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",2*/
  237. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",3*/
  238. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",4*/
  239. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",5*/
  240. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",6*/
  241. {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},/*" ",7*/
  242. };

  243. /* 于键消抖的延时函数 */
  244. void delay5()
  245. { uint t;
  246. for (t=400;t>0;t--);                              
  247. }

  248. /*======音乐按键扫描函数======= */
  249. uchar keyscan(void)      //键盘扫描
  250. { {unsigned char key_l,key,s;
  251.      key_l=P1&0x0f;
  252.      if(key_l!=0x0f)    // 判断是否有按键按下
  253.     {  delay5() ;      //消抖
  254.      if(key_l!=0x0f)       //再次判断是否有按键按下
  255.     {
  256.      key_l=P1&0x0f;       //扫描列  得到列值
  257.      P1=0X7f;                                          //0111 1111
  258.               if(P1!=0x7f)  key=P1;
  259.               P1=0Xbf;                               //1011 1111
  260.               if(P1!=0xbf)  key=P1;
  261.               P1=0Xdf;
  262.               if(P1!=0xdf)  key=P1;
  263.               P1=0Xef;
  264.               if(P1!=0xef)  key=P1;
  265.               P1=0x0f;
  266.      } delay1(1000);
  267.       }               
  268.                                 switch(key)
  269.                   {
  270.                    case 0xeb:              count1=1;i=0; TR1=1;second=0;s1=0;s2=0;              break;            
  271.                    case 0xd7:              count1=2;i=0; TR1=1;second=0;s1=0;s2=0;              break;            
  272.                             case 0xdb:              count1=3;i=0; TR1=1;second=0;s1=0;s2=0;              break;            
  273.                                case 0xdd:              count1=4;i=0; TR1=1;second=0;s1=0;s2=0;              break;            
  274.                    case 0xb7:              count1=5;i=0; TR1=1;second=0;s1=0;s2=0;   break;                  
  275.                             case 0xbb:              count1=6;i=0; TR1=1;second=0;s1=0;s2=0;              break;            
  276.                               case 0xbd:              count1=7;i=0; TR1=1;second=0;s1=0;s2=0;   break;            
  277.                             case 0x77:              count1=8;i=0; TR1=1;second=0;s1=0;s2=0;              break;            
  278.                             case 0x7b:              count1=9;i=0;              second=0;s1=0;s2=0; TR1=1;              break;                  
  279.                             case 0x7d:              count1=10;i=0;              second=0;s1=0;s2=0; TR1=1;              break;                             
  280.                             case 0xe7:              count2=1;              break;                              //开机键ON/C
  281.                             case 0xed:              count2=2;h=0; s=second;break;                              //暂停键 =                 
  282.                             case 0xee:  count1=count1+1;i=0; delay1(100);  TR1=1;second=0;s1=0;s2=0; break;        //下一曲 +  
  283.                             case 0xde:    count1=count1-1;i=0;  delay1(100); TR1=1; second=0;s1=0;s2=0; break;  //上一曲 -
  284.                             case 0xbe:  count2=5;h=1; TR0=1; s=second;  break;   TR1=1;   //播放键
  285.                             default:break;
  286.                   }                                                                                         
  287.        P1 = 0x0f;  
  288.                 }   
  289. }
  290. //=======外部中断INT0==========//   
  291. void ZD() interrupt 0
  292. {
  293.               keyscan();
  294. }
  295. //===========显示延迟=======================//
  296. delay2(int a)
  297. {int b;
  298. for(;a>0;a--)
  299.   for(b=0;b<255;b++);
  300. }
  301. check()                            //查忙            
  302. {e=1;
  303. rw=1;
  304. rs=0;
  305. P0=0xff;                 
  306. if(busy);                              
  307. }
  308. /*写指令程序*/
  309. wc(unsigned char dat)
  310. {check();
  311. e=0;
  312. rw=0;
  313. rs=0;           
  314. P0=dat;
  315. e=1;                             
  316. e=0;
  317. }
  318. /* 写数据程序*/
  319. wd(unsigned char dat)            
  320. {check();
  321. e=0;
  322. rw=0;  
  323. rs=1;
  324. P0=dat;
  325. e=1;
  326. e=0;
  327. }

  328. void zifu(unsigned char page,unsigned char lineadd,int n,int a, unsigned char table[][8])
  329. {              int j,k,i;                                                                                    
  330. unsigned char  temp[16];
  331.    if(lineadd<0X80)       //128列
  332.   {CS1=0;        
  333.   CS2=1;}                //左半屏left
  334. for(j=2*a;j<n+2*a;j++)            
  335.     {
  336.      if(lineadd>=0X80)               
  337.      {
  338.      CS1=1;               //right
  339.      CS2=0;
  340.       lineadd=lineadd-0X40;
  341.      }
  342.    for(k=0;k<8;k++)                                                         
  343.        {temp[k]=table[j][k];}
  344.         j+=1;
  345.    for(k=0;k<8;k++)
  346.    {temp[8+k]=table[j][k];}
  347.     wc(page);
  348.         wc(lineadd);
  349.        for(i=0;i<8;i++)
  350.          { wd(temp[i]);}
  351.        wc(page+1);
  352.        wc(lineadd);
  353.        for(i=8;i<16;i++)
  354.         { wd(temp[i]);}
  355. lineadd+=8;
  356.   }  }
  357. void hanzi(unsigned char page,unsigned char lineadd,int n,unsigned char table[][16])
  358. {unsigned char  temp[32];
  359. int j,k,i;
  360.    if(lineadd<0X80)
  361.   {CS1=0;
  362.    CS2=1;}          //left
  363. for(j=0;j<n;j++)
  364.     {
  365.      if(lineadd>=0X80)
  366.      {
  367.       CS1=1;       //right
  368.       CS2=0;
  369.       lineadd=lineadd-0X40;
  370.      }
  371.    for(k=0;k<16;k++)                 
  372.        {temp[k]=table[j][k];}
  373.    j+=1;
  374.    for(k=0;k<16;k++)
  375.    {temp[16+k]=table[j][k];}
  376.         wc(page);
  377.         wc(lineadd);
  378.        for(i=0;i<16;i++)
  379.          { wd(temp[i]);}
  380.        wc(page+1);
  381.        wc(lineadd);
  382.        for(i=16;i<32;i++)
  383.         { wd(temp[i]);}
  384.   lineadd+=16;
  385.               }
  386. }

  387. //------------------简谱音调对应的定时器初值--------//
  388. //适合11.0592M的晶振
  389. uchar code cuzhi[]={
  390.               0xff,0xff,//占位 停顿
  391.               0xFC,0x8E,//中音1-7            
  392.               0xFC,0xED,            
  393.               0xFD,0x43,            
  394.               0xFD,0x6A,            
  395.               0xFD,0xB3,            
  396.               0xFD,0xF3,            
  397.               0xFE,0x2D,
  398.               0xFE,0x47,              //高音1-7               
  399.               0xFE,0x76,
  400.               0xFE,0xA1,
  401.               0xFE,0xC7,            
  402.               0xFE,0xD9,
  403.               0xFE,0xF9,
  404.               0xFF,0x16
  405.               };
  406. /* 函数声明*/
  407. void delay1(uint z);//延时1mS
  408. void delay(uint z);              //延时165ms,即十六分音符
  409. void song();
  410. void beep(); //蜂鸣器叫一声
  411. /* 初始化程序 */
  412. void inti()
  413. {   wc(0X3f);//显示开关关 0011 1111
  414.     wc(0XC0);//修改显示起始行  1100 0000
  415.     wc(0XB8);//修改页地址,x地址  1011 1000
  416.     wc(0X40);//修改列地址,y地址  0100 0000
  417. }

  418. uchar timeh,timel,i;
  419. //---------------------------简谱---------------------------------------
  420. //编程规则:字节高位是简谱,低位是节拍持续时间,
  421. //代表多少个十六分音符
  422. //1-7代表中音,8-E代表高音,0代表停顿
  423. //最后的0是结束标志
  424. //=====================   歌曲     ============//
  425. uchar code muqin[]={ //母亲
  426. 0x52,0x51,0x61,0x82,0x71,0x62,0x31,0x21,0x14,0x32,0x92,0x91,0x71,0x61,0x31,0x58,
  427. //你入学的新书包有人给你拿
  428. 0x52,0x51,0x61,0x82,0x71,0x62,0x51,0x61,0x34,0x62,0x61,0x51,0x51,0x31,0x28,
  429. //你雨中的花折伞有人给你打
  430. 0x32,0x31,0x21,0x52,0x51,0x31,0x22,0x31,0x21,0x12,0x21,0x32,0x51,0x71,0x61,0x52,0x68,
  431. //你爱吃的(那)三鲜馅有人(他)给你包
  432. 0x82,0x81,0x61,0x82,0x81,0x62,0x51,0x31,0x24,0x62,0x51,0x31,0x31,0x21,0x14,
  433. //你委屈的泪花有人给你擦
  434. 0x81,0x91,0xa1,0xa2,0xa1,0x92,0xa1,0x91,0x84,
  435. //啊,这个人就是娘
  436. 0x61,0x81,0x91,0x92,0xa1,0x91,0x71,0x61,0x71,0x61,0x58,
  437. //啊,这个人就是妈
  438. 0x61,0x82,0x61,0x82,0x81,0x61,0x52,0x61,0x51,0x64,
  439. //这个人给了我生命
  440. 0x62,0x81,0xa1,0x91,0x82,0x94,
  441. //给我一个家
  442. 0x81,0x91,0xa1,0xa2,0xa1,0x92,0xa1,0x91,0x84,
  443. //啊,不管你走多远
  444. 0x61,0x81,0x92,0x71,0x61,0x71,0x61,0x58,
  445. //无论你在干啥
  446. 0x61,0x81,0x81,0x61,0x82,0x81,0x61,0x52,0x61,0x51,0x34,
  447. //到什么时候也离不开
  448. 0x62,0xa2,0x91,0x81,0x62,0x88,
  449. //咱的妈
  450. 0x62,0xa2,0x91,0x81,0x62,0x84,
  451. //咱的妈
  452. 0x81,0x91,0x62,0xf2,0x91,0x81,0x62,0x88,
  453. 0XFF,
  454. } ;
  455. uchar code mamahao[]={              //世上只有妈妈好
  456. //世上只有妈妈好
  457. 0x68,0x52,0x34,0x54,0x84,0x62,0x52,0x68,
  458. //世上只有妈妈好
  459. 0x34,0x52,0x62,0x54,0x34,0x12,0xc2,0x52,0x32,0x28,
  460. //有妈的孩子像个宝
  461. 0x24,0x32,0x54,0x52,0x62,0x34,0x24,0x18,
  462. //投进了妈妈的怀抱
  463. 0x54,0x32,0x22,0x12,0xc2,0x12,0xb8,0x04,0xff,
  464. //幸福享不了
  465. };
  466. uchar code exql[]={ //儿行千里
  467. // 儿行千里
  468. 0x62,0x61,0x61,0x61,0x72,0x51,0x68,
  469. //衣裳在添几件,
  470. 0x62,0x61,0x61,0x61,0x71,0x51,0x38,
  471. //饭菜多吃几口,
  472. 0x32,0x31,0x62,0x31,0x21,0x31,0x14,0x22,0x21,0x21,0x12,0x61,0x38,
  473. //出门在外没有妈熬的小米粥,
  474. 0x62,0x62,0x61,0x72,0x51,0x68,
  475. //一会儿看看脸,
  476. 0x62,0x62,0x61,0x72,0x51,0x38,
  477. //一会儿摸摸手,
  478. 0x34,0x62,0x61,0x31,0x22,0x21,0x31,0x14,
  479. //一会儿又把嘱咐的话,
  480. 0x22,0x21,0x31,0x12,0x61,0x68,
  481. //装进儿的兜;
  482. 0x62,0x84,0x62,0x92,0x84,0x72,0x61,0x71,0x51,0x32,0x31,0x52,0x64,
  483. //如今要到了,离开家的时候,
  484. 0x62,0x84,0x62,0x91,0xa1,0x84,0x72,0x61,0x71,0x62,0x52,0x51,0x61,0x34,
  485. //才理解儿行千里母担忧,
  486. 0x32,0x62,0x62,0x31,0x21,0x32,0x34,0x02,0x32,0x62,0x62,0x31,0x21,0x12,0x14,0x02,
  487. //千里的路啊,我还一步没走,
  488. 0x71,0x72,0x61,0x22,0x31,0x31,0x52,0x31,0x52,0x62,
  489. //就看见泪水在妈妈眼里,
  490. 0x82,0x81,0x71,0x61,0x62,0x28,0x62,0x61,0x71,0x52,0x31,0x68,0x68,0xff,
  491. //妈妈眼里流,妈妈眼里流;
  492. };

  493. uchar code ganen[]={//感恩的心
  494. 0x12,0x14,0x22,0x32,0x54,
  495. //我来自偶然,
  496. 0x32,0x84,0x72,0x62,0x54,
  497. //像一颗尘土,
  498. 0x02,0x62,0x62,0x52,0x54,0x12,0x22,0x32,0x28,
  499. //有谁看出我的脆弱,
  500. 0x12,0x14,0x22,0x32,0x54,
  501. //我来自何方,
  502. 0x32,0x84,0x92,0x82,0x54,
  503. //我情归何处,
  504. 0x32,0x24,0x21,0x61,0x54,0x22,0x32,0x12,0x18,
  505. //谁在下一刻呼唤我,
  506. 0x22,0x24,0x12,0x24,0x11,0x21,0x34,0x32,0x21,0x31,0x34,
  507. //天地虽宽 这条路却难走
  508. 0x12,0x22,0x22,0x22,0x11,0x21,0x22,0x64,0x52,0x52,0x32,0x38,
  509. //我看遍这人间坎坷辛苦
  510. 0x31,0x52,0x51,0x52,0x31,0x51,0x58,
  511. //我还有多少爱
  512. 0x31,0x82,0x81,0x82,0x31,0x61,0x68,
  513. //我还有多少泪
  514. 0x62,0x62,0x62,0x51,0x61,0x64,0x61,0x82,0x61,0x9c,
  515. //要苍天知道 我不认输
  516. 0x52,0xa4,0x92,0xa4,0x32,0x84,0x72,0x64,
  517. //感恩的心 感谢有你
  518. 0x62,0x94,0x82,0x94,
  519. //伴我一生
  520. 0x61,0x81,0x92,0x91,0x91,0x92,0x81,0xa1,0xa2,0x92,0x94,
  521. //让我有勇气做我自己
  522. 0x52,0xa4,0x92,0xa4,0x32,0x84,0x72,0x64,
  523. //感恩的心 感谢命运
  524. 0x52,0x62,0x81,0x81,0x82,0x92,0xa2,0x94,0x82,0x72,0x82,0x88,
  525. //花开花落我一样会珍惜
  526. };
  527. uchar code tiger[]={//两只老虎
  528. 0x14,0x24,0x34,0x14,0x14,0x24,0x34,0x14,
  529. //两只老虎两只老虎
  530. 0x34,0x44,0x58,0x34,0x44,0x58,
  531. //跑得快跑得快
  532. 0x52,0x61,0x52,0x41,0x34,0x14,0x52,0x61,0x52,0x41,0x34,0x14,
  533. //一只没有眼睛一只没有尾巴
  534. 0x14,0xb4,0x18,0x14,0xb4,0x18,0xff,
  535. //真奇怪真奇怪
  536. };

  537. uchar code qnzl[]={              //千年之恋
  538. 0x12,0x22,0x34,0x84,0x74,0x54,0x38,0x42,0x32,0x22,0x42,0x34,0x84,0x72,0x82,0x94,0xA8,0x08,
  539. //前奏
  540. 0x32,0x31,0x21,0x32,0x52,0x32,0x31,0x21,0x32,0x62,
  541. //竹林的灯火 到过的沙漠
  542. 0x32,0x31,0x21,0x32,0x82,0x71,0x81,0x71,0x51,0x32,0x22,
  543. //七色的国度 不断飘逸风中
  544. 0x32,0x31,0x21,0x32,0x52,0x32,0x31,0x21,0x32,0x62,
  545. //有一种神秘 灰色的旋涡
  546. 0x32,0x31,0x21,0x32,0x83,0x82,0x71,0x72,0x02,
  547. //将我卷入了迷雾中
  548. 0x63,0xA1,0xA2,0x62,0x92,0x82,0x52,
  549. //看不清的双手
  550. 0x31,0x51,0x63,0x51,0x63,0x51,0x63,0x51,0x62,0x82,0x7C,0x02,
  551. //一朵花传来谁经过的温柔
  552. 0x61,0x71,0x82,0x71,0x62,0xA2,0x71,0x76,
  553. //穿越千年的伤痛
  554. 0x61,0x71,0x82,0x71,0x62,0x52,0x31,0x36,
  555. //只为求一个结果
  556. 0x61,0x71,0x82,0x71,0x62,0xA3,0x73,0x62,0x53,
  557. //你留下的轮廓 指引我
  558. 0x42,0x63,0x83,0x83,0x91,0x91,
  559. //黑夜中不寂寞
  560. 0x61,0x71,0x82,0x71,0x62,0x0A2,0x71,0x76,
  561. //穿越千年的哀愁
  562. 0x61,0x71,0x82,0x71,0x62,0x52,0x31,0x36,
  563. //是你在尽头等我
  564. 0x61,0x71,0x82,0x71,0x62,0xA3,0x73,0x62,0x53,
  565. //最美丽的感动 会值得
  566. 0x42,0x82,0x88,0x02,0x74,0x93,0x89,0xff//结束标志
  567. //用一生守候
  568. };
  569. uchar code jmszl[]={ //寂寞沙洲冷
  570. 0x12,0x12,0x22,0x32,0x31,0x22,0x21,0x22,
  571. //自你走后心憔悴
  572. 0x21,0x31,0x51,0x52,0x31,0x52,0x61,0x15,0x14,
  573. //白色油桐风中纷飞
  574. 0x51,0x52,0x31,0x52,0x62,0x13,0x11,0x13,0x32,0x28,0x08,0x28,
  575. //落花似人有情 这个季节
  576. 0x31,0x32,0x31,0x32,0x11,0x21,0x51,0x52,0x51,0x52,
  577. //河畔的风放肆拼命地吹
  578. 0x51,0x51,0x31,0x32,0x31,0x32,0x81,0x72,0x63,
  579. //不断拨弄离人的眼泪
  580. 0x62,0x71,0x81,0x72,0x61,0x61,0x52,0x31,0x21,0x32,0x51,0x54,
  581. //那样浓烈的爱再也无法给
  582. 0x22,0x12,0x11,0x12,0x11,0x12,0x12,0x14,0x26,0x32,0x26,
  583. //伤感一夜一夜
  584. 0x32,0x61,0x51,0x51,0x31,0x31,0x21,0x31,0x51,0x61,0x51,0x31,0x51,
  585. //当记忆的线缠绕过往支离破碎
  586. 0x02,0x32,0x81,0x81,0x81,0x81,0x62,0x52,0x34,
  587. //是慌乱占据了心扉                                                                                                                                                                                                                 
  588. 0x31,0x81,0x81,0x81,0x61,0x91,0x82,
  589. //有花儿伴着蝴蝶
  590. 0x51,0x51,0x51,0x51,0x31,0x61,0x53,
  591. //孤雁可以双飞            
  592. 0x21,0x11,0x21,0x11,0x22,0x11,0x21,0x26,
  593. //夜深人静独徘徊
  594. 0x32,0x61,0x51,0x51,0x31,0x31,0x21,0x31,0x51,0x61,0x51,0x31,0x51,0x52,
  595. //当幸福恋人寄来红色分享喜悦
  596. 0x31,0x31,0x81,0x81,0x81,0x61,0x91,0x81,0x61,0x31,0x56,
  597. //闭上双眼难过头也不敢回
  598. 0x32,0x32,0x81,0x81,0x81,0x81,0x91,0x81,0x61,0x81,0x61,0x51,0x31,0x51,0x34,
  599. //仍然捡尽寒枝不肯安歇微带着后悔
  600. 0x21,0x31,0x51,0x31,0x21,0x11,0x61,0x21,0x16,
  601. //寂寞沙洲我该思念谁
  602. 0xff};
  603. uchar code qizige[]={ //七子之歌
  604. 0x54,0x32,0x52,0x32,0x54,
  605. //你可知MACAU
  606. 0x62,0x52,0x32,0x62,0x54,
  607. //不是我真姓
  608. 0x14,0x12,0x22,0x34,0x52,0x32,
  609. //我离开你太久了
  610. 0x02,0x32,0x58,
  611. //母亲
  612. 0x52,0x52,0x62,0x52,0x32,0x54,0x52,0x62,0x52,0x82,0x62,0x58,
  613. //但是他们掳去的是我的肉体
  614. 0x14,0x52,0x32,0x22,0x12,0x24,0x32,0x54,0x2,0x22,0x34,0x1f,0x18,
  615. //你依然保管我内心的灵魂
  616. 0x04,0x54,0xa4,0x92,0x81,0x62,0x52,0x54,0x62,0x64,0x52,0x62,0x81,0xa2,0x82,0x9c,
  617. //那三百年来梦寐不忘的生母啊
  618. 0x02,0x52,0xa4,0x92,0x81,0x62,0x52,0x54,
  619. //请叫儿的乳名:
  620. 0x62,0x64,0x52,0x64,0xa2,0x92,0x9f,
  621. //叫我一声--澳门
  622. 0xa4,0x92,0x81,0x62,0x52,0x54,
  623. //母亲!母亲!
  624. 0x84,0x62,0x52,0x32,0x22,0x14,
  625. //我要回来
  626. 0x04,0x22,0x32,0x58,0x58,0x04,0x52,0x62,0x8f,0xff,
  627. //母亲!母亲!
  628.   };
  629. uchar code xqw[]={//小青蛙
  630. 0x52,0x32,0x32,0x32,0x52,0x32,0x32,0x32,0x54,0x61,0x52,0x32,0x42,0x24,
  631. //小青蛙呀 小青蛙呀 在池塘里玩耍
  632. 0x42,0x22,0x22,0x22,0x42,0x22,0x22,0x22,0x44,0x51,0x42,0x22,0x32,0x18,
  633. //东边跳跳 西边跳跳 多么快乐 逍遥
  634. };
  635. char code zpy[]={//找朋友
  636. 0x14,0x14,0x14,0x24,0x34,0x54,0x58,0x54,0x64,0x54,0x34,0x24,0x34,0x24,
  637. //找找找 找朋友   找到一个好朋友
  638. 0x34,0x14,0x18,0x54,0x34,0x28,0x14,0x24,0x34,0x54,0x24,0x34,0x14,
  639. //敬个礼 握握手 我是你的好朋友
  640. };

  641. //===========计时程序=========//
  642. void jishi()
  643. { s1=s2=m1=m2=0;
  644.   s1=second/10;              //秒十位
  645.   s2=second%10;              //秒个位
  646.   m1=minute/10;
  647.   m2=minute%10;
  648. }
  649. void timer() interrupt 3 //T1分秒计时
  650. { TH1=15536/256;
  651.   TL1=15536%256;
  652.   j++;
  653.   if(j==20)
  654.   {j=0;
  655.   if(second++>=60)
  656.   {second=0;
  657.   minute++;
  658.   }
  659.     }
  660. }
  661. void show()
  662. {jishi();
  663. zifu(0xba,0x40,2,m1,&shu);
  664. zifu(0xba,0x48,2,m2,&shu);
  665. zifu(0xba,0x50,2,0x0a,&shu);
  666. zifu(0xba,0x58,2,s1,&shu);
  667. zifu(0xba,0x60,2,s2,&shu);

  668. }

  669. //=========唱歌显示歌名============//
  670. void song()            
  671. {
  672.               uint temp;              //temp歌调         
  673.               uchar jp;  //jp是简谱
  674.     while(1)
  675.               {              if(h==0)
  676.                   { do{TR0=0;              //停止T0工作
  677.                             fm=1;}while(h==0);}
  678. ……………………

  679. …………限于本文篇幅 余下代码请从51黑下载附件…………
复制代码

所有资料51hei提供下载:
单片机课程设计-数字音乐盒设计.doc (338 KB, 下载次数: 105)

评分

参与人数 1黑币 +50 收起 理由
admin + 50 共享资料的黑币奖励!

查看全部评分

回复

使用道具 举报

ID:552200 发表于 2019-5-31 23:33 | 显示全部楼层
请问介绍的是AT89C51单片机,电路图却用的AT89C52,若使用AT89C51单片机连电路图,会对仿真有影响吗?
回复

使用道具 举报

ID:330903 发表于 2020-3-1 17:45 | 显示全部楼层
梨屿咲 发表于 2019-5-31 23:33
请问介绍的是AT89C51单片机,电路图却用的AT89C52,若使用AT89C51单片机连电路图,会对仿真有影响吗?

这个设计不精细,没有影响的
回复

使用道具 举报

ID:941608 发表于 2021-6-23 10:45 | 显示全部楼层
我想问下一下出现这些问题
0101.c(292): warning C173: missing return-expression
0101.c(292): warning C290: missing return value
0101.c(303): warning C290: missing return value
0101.c(310): warning C290: missing return value
0101.c(320): warning C290: missing return value
0101.c(330): warning C290: missing return value

该怎么改啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表