freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

單片機(jī)課程設(shè)計——紅外遙控音樂播放器(存儲版)

2025-02-17 14:09上一頁面

下一頁面
  

【正文】 始化 while(1) { if(irreceok) //接收完成 { irproc()。 bitnum++。其中每個音符使用兩個字節(jié)表示:低位字節(jié)(偶地址)代表音級,表示的音級為c、﹟c、d、﹟d、e、f、……a﹟ab3;高位字節(jié)(奇地址)代表音符的時值(節(jié)拍),表示拍數(shù)為1/8拍()~8拍()。 for(。 //定時10ms TL0 = 0x00。 } else if (temp1 == 0x00) //歌曲結(jié)束符 { return。 //定時器初始化 while(1) { play(0)。 //取出ircode中的兩位“數(shù)據(jù)碼”}void display(void) //數(shù)碼管顯示函數(shù){ P0=table[disp[0]]。 //關(guān)閉位選}void main(){ while(1) { display()。(6) 按下音量“+”,對應(yīng)碼值05,數(shù)碼管顯示05,蜂鳴器播放曲目2,實現(xiàn)播放時更換曲目。參考文獻(xiàn)[1] 張毅剛.MCS51單片機(jī)應(yīng)用設(shè)計.哈爾濱:哈爾濱工業(yè)大學(xué)出版社,2003[2] 求是科技.8051系列單片機(jī)C程序設(shè)計完全手冊.北京:人民郵電出版社,2006[3] 李升.單片機(jī)原理與接口技術(shù).北京:北京大學(xué)出版社,2011附錄1 整體電路圖及實物圖附錄2 電路元件1單片機(jī)AT89S521片2鎖存器74HC5731片3三八譯碼器74HC1381片4達(dá)林頓晶體管ULN20031片5紅外一體接收頭SM00381個6電容30PF2個7電容1041個8電解電容10UF2個9電阻10K1個10電阻1002個11排阻10K1個12晶振12MHz1個13兩位共陰數(shù)碼管1個14蜂鳴器1個15按鍵1個附錄3 程序源碼includedefine uchar unsigned chardefine uint unsigned intsbit FM=P2^3。 //曲目數(shù)組unsigned char code song[] ={ //祝你平安0x26,0x20,0x20,0x20,0x20,0x20,0x26,0x10,0x20,0x10,0x20,0x80,0x26,0x20,0x30,0x20,0x30,0x20,0x39,0x10,0x30,0x10,0x30,0x80,0x26,0x20,0x20,0x20,0x20,0x20,0x1c,0x20,0x20,0x80,0x2b,0x20,0x26,0x20,0x20,0x20,0x2b,0x10,0x26,0x10,0x2b,0x80,0x26,0x20,0x30,0x20,0x30,0x20,0x39,0x10,0x26,0x10,0x26,0x60,0x40,0x10,0x39,0x10,0x26,0x20,0x30,0x20,0x30,0x20,0x39,0x10,0x26,0x10,0x26,0x80,0x26,0x20,0x2b,0x10,0x2b,0x10,0x2b,0x20,0x30,0x10,0x39,0x10,0x26,0x10,0x2b,0x10,0x2b,0x20,0x2b,0x40,0x40,0x20,0x20,0x10,0x20,0x10,0x2b,0x10,0x26,0x30,0x30,0x80,0x18,0x20,0x18,0x20,0x26,0x20,0x20,0x20,0x20,0x40,0x26,0x20,0x2b,0x20,0x30,0x20,0x30,0x20,0x1c,0x20,0x20,0x20,0x20,0x80,0x1c,0x20,0x1c,0x20,0x1c,0x20,0x30,0x20,0x30,0x60,0x39,0x10,0x30,0x10,0x20,0x20,0x2b,0x10,0x26,0x10,0x2b,0x10,0x26,0x10,0x26,0x10,0x2b,0x10,0x2b,0x80,0x18,0x20,0x18,0x20,0x26,0x20,0x20,0x20,0x20,0x60,0x26,0x10,0x2b,0x20,0x30,0x20,0x30,0x20,0x1c,0x20,0x20,0x20,0x20,0x80,0x26,0x20,0x30,0x10,0x30,0x10,0x30,0x20,0x39,0x20,0x26,0x10,0x2b,0x10,0x2b,0x20,0x2b,0x40,0x40,0x10,0x40,0x10,0x20,0x10,0x20,0x10,0x2b,0x10,0x26,0x30,0x30,0x80,0x00, //八月桂花遍地開0x18,0x30,0x1C,0x10,0x20,0x40,0x1C,0x10,0x18,0x10,0x20,0x10,0x1C,0x10,0x18,0x40,0x1C,0x20,0x20,0x20,0x1C,0x20,0x18,0x20,0x20,0x80,0xFF,0x20,0x30,0x1C,0x10,0x18,0x20,0x15,0x20,0x1C,0x20,0x20,0x20,0x26,0x40,0x20,0x20,0x2B,0x20,0x26,0x20,0x20,0x20,0x30,0x80,0xFF,0x20,0x20,0x1C,0x10,0x18,0x10,0x20,0x20,0x26,0x20,0x2B,0x20,0x30,0x20,0x2B,0x40,0x20,0x20,0x1C,0x10,0x18,0x10,0x20,0x20,0x26,0x20,0x2B,0x20,0x30,0x20,0x2B,0x40,0x20,0x30,0x1C,0x10,0x18,0x20,0x15,0x20,0x1C,0x20,0x20,0x20,0x26,0x40,0x20,0x20,0x2B,0x20,0x26,0x20,0x20,0x20,0x30,0x80,0x20,0x30,0x1C,0x10,0x20,0x10,0x1C,0x10,0x20,0x20,0x26,0x20,0x2B,0x20,0x30,0x20,0x2B,0x40,0x20,0x15,0x1F,0x05,0x20,0x10,0x1C,0x10,0x20,0x20,0x26,0x20,0x2B,0x20,0x30,0x20,0x2B,0x40,0x20,0x30,0x1C,0x10,0x18,0x20,0x15,0x20,0x1C,0x20,0x20,0x20,0x26,0x40,0x20,0x20,0x2B,0x20,0x26,0x20,0x20,0x20,0x30,0x30,0x20,0x30,0x1C,0x10,0x18,0x40,0x1C,0x20,0x20,0x20,0x26,0x40,0x13,0x60,0x18,0x20,0x15,0x40,0x13,0x40,0x18,0x80,0x00}。 for(。 ET0=1。 for(j=0。 //每組解碼后的值存入ircode } irprocok=1。 //P0口送數(shù)據(jù) P2=0x07。 if (temp1 == 0xFF) //休止符 { TR0 = 0。 delay_25us(temp1)。 } } } if(irreceok) //接收完成 { irproc()。 //解碼 irreceok=0。shuaxin==1) //停止播放 { shuaxin=0。shuaxin==1) //曲目1 { shuaxin=0。 n=0。 n=0。shuaxin==1) //曲目0 { shuaxin=0。shuaxin==1) //播放上一曲 { if(l==0) //當(dāng)前播放曲目0 { shuaxin=0。shuaxin==1) //播放下一曲 { if(l==0) //當(dāng)前播放曲目0 { shuaxin=0。 //外部中斷初始化 while(1) { if(irreceok) //接收完成 { irproc()。 play(qumu[0])。 i++。 irreceok=1。在此向老師表示深深的感謝和崇高的敬意。 bitnum++。 play(qumu[n])。 play(qumu[0])。 //返回主函數(shù)播放qumu[n] } } } }}void main(){ timer0init()。 //返回主函數(shù)播放qumu[n] } } if(ircode[2]==0x05amp。 } if(ircode[2]==0x07amp。 } if(ircode[2]==0x17amp。 return。 return。 } if(ircode[2]==0x16amp。 } if(ircode[2]==0x0aamp。shuaxin==1) //暫停 { shuaxin=0。 //關(guān)閉位選 if(temp2 == count) //節(jié)拍 { count = 0。 //P0口送數(shù)據(jù) P2=0x06。 //中斷計數(shù)清0 addr = l * 217。 //顯示數(shù)值保持100us P2=0x00。 //解碼數(shù)據(jù)為1 則高位或1 則高位置1 } k++。 //開總中斷}void irproc(void) //解碼函數(shù) { uchar k,value,m,j。 //定時器0 定時方式2 8位自動重裝 TH0=0x00。j)。 //解碼后數(shù)據(jù)uchar di
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1