版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、生日快生日快樂(lè)歌曲歌曲#include#defineuintunsignedint#defineuunsignedsbitbeep=P1^5ucodeSONG_TONE[]=2122121902121591692122121902121421592122121061261591691901191191261591421590ucodeSONG_LONG[]=9312121224931212122493121212121293121212
2、240延時(shí)voidDelayMS(uintx)utwhile(x)f(t=0t120t)voidPlayMusic()uinti=0jkwhile(SONG_LONG[i]!=0||SONG_TONE[i]!=0)播放各個(gè)音符,SONG_LONG為拍子長(zhǎng)度f(wàn)(j=0jSONG_LONG[i]20j)beep=~beepSONG_TONE延時(shí)表決定了每個(gè)音符的頻率f(k=0kSONG_TONE[i]3k)DelayMS(10)ivoidm
3、ain()beep=0while(1)PlayMusic()播放生日快樂(lè)DelayMS(500)播放完后暫停一段時(shí)間beepIO=!beepIOTH0=T[m][0]TL0=T[m][1]voidmain()ui=0TMOD=0x01EA=1ET0=1while(1)m=music[i][0]n=music[i][1]if(m==0x00)TR0=0delay(n)ielseif(m==0xFF)TR0=0delay(30)i=0els
4、eif(m==music[i1][0])TR0=1delay(n)TR0=0pause()ielseTR0=1delay(n)i祝你平安:#include“reg52.h“unsignedCountsbit_Speak=P1^5unsignedcodeSONG[]=祝你平安0x260x200x200x200x200x200x260x100x200x100x200x800x260x200x300x200x300x200x390x100x3
5、00x100x300x800x260x200x200x200x200x200x1c0x200x200x800x2b0x200x260x200x200x200x2b0x100x260x100x2b0x800x260x200x300x200x300x200x390x100x260x100x260x600x400x100x390x100x260x200x300x200x300x200x390x100x260x100x260x800x260x2
6、00x2b0x100x2b0x100x2b0x200x300x100x390x100x260x100x2b0x100x2b0x200x2b0x400x400x200x200x100x200x100x2b0x100x260x300x300x800x180x200x180x200x260x200x200x200x200x400x260x200x2b0x200x300x200x300x200x1c0x200x200x200x200x800x1
7、c0x200x1c0x200x1c0x200x300x200x300x600x390x100x300x100x200x200x2b0x100x260x100x2b0x100x260x100x260x100x2b0x100x2b0x800x180x200x180x200x260x200x200x200x200x600x260x100x2b0x200x300x200x300x200x1c0x200x200x200x200x800x260x2
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 單片機(jī)課程設(shè)計(jì)報(bào)告(利用蜂鳴器播放音樂(lè))
- 單片機(jī)控制蜂鳴器鳴奏音樂(lè)
- 【冬至祝福語(yǔ)】祝你平安如意
- 基于51單片機(jī)的音樂(lè)播放器設(shè)計(jì)
- 生日快樂(lè)藏頭詩(shī)大全 生日快樂(lè)藏頭詩(shī)有哪些
- 生日快樂(lè)藏頭詩(shī)
- 生日快樂(lè)券
- (湖南工業(yè)大學(xué)單片機(jī)課程設(shè)計(jì)-)基于51單片機(jī)的音樂(lè)播放器
- 基于c51單片機(jī)矩陣鍵盤(pán)控制蜂鳴器的應(yīng)用
- 生日快樂(lè)祝福圖片大全_朋友生日快樂(lè)祝福大全
- 生日快樂(lè)祝福圖片大全_朋友生日快樂(lè)祝福大全
- 生日快樂(lè),祖國(guó)(組詩(shī))
- 硬件課程設(shè)計(jì)報(bào)告--基于51單片機(jī)音樂(lè)播放器設(shè)計(jì)
- silverlight播放音樂(lè)、視頻
- 單片機(jī)課程設(shè)計(jì)--基于單片機(jī)的音樂(lè)播放器
- 祝自己生日快樂(lè)圖片
- 兒子生日快樂(lè)的句子
- 祝福生日快樂(lè)的詩(shī)句
- 單片機(jī)課程設(shè)計(jì)報(bào)告蜂鳴器
- 兩只老鼠
評(píng)論
0/150
提交評(píng)論