2023年全國碩士研究生考試考研英語一試題真題(含答案詳解+作文范文)_第1頁
已閱讀1頁,還剩4頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、生日快生日快樂歌曲歌曲#include#defineuintunsignedint#defineuunsignedsbitbeep=P1^5ucodeSONG_TONE[]=2122121902121591692122121902121421592122121061261591691901191191261591421590ucodeSONG_LONG[]=9312121224931212122493121212121293121212

2、240延時voidDelayMS(uintx)utwhile(x)f(t=0t120t)voidPlayMusic()uinti=0jkwhile(SONG_LONG[i]!=0||SONG_TONE[i]!=0)播放各個音符,SONG_LONG為拍子長度f(j=0jSONG_LONG[i]20j)beep=~beepSONG_TONE延時表決定了每個音符的頻率f(k=0kSONG_TONE[i]3k)DelayMS(10)ivoidm

3、ain()beep=0while(1)PlayMusic()播放生日快樂DelayMS(500)播放完后暫停一段時間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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論