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

正文內(nèi)容

基于stc89c52的簡易電子琴課程設(shè)計報告-資料下載頁

2024-11-07 21:39本頁面

【導(dǎo)讀】摘要:本課程設(shè)計簡易電子琴的制作基于STC89C52單片機。產(chǎn)生不同頻率來實現(xiàn)不同音階,用鍵盤掃描實現(xiàn)矩陣琴鍵的識別。部分采用LM386進行信號放大,通過蜂鳴器發(fā)音。矩陣琴鍵彈奏樂曲和播放一段示例音樂的功能。

  

【正文】 case 0x0d: key=5。 break。 case 0x0b: key=6。 break。 case 0x07: key=7。 break。 } speaker=~speaker。 STH1=tab[key]/256。 STL1=tab[key]%256。 TR0=1。 temp=P3。 17 temp=temp amp。 0x0f。 while(temp!=0x0f) { temp=P3。 temp=temp amp。 0x0f。 } TR0=0。 } } P3=0xff。 P36=0。 temp=P3。 temp=tempamp。0x0f。 if(temp!=0x0f) { for(i=50。i0。i) for(j=200。j0。j)。 temp=P3。 temp=tempamp。0x0f。 if(temp!=0x0f) { temp=P3。 temp=tempamp。0x0f。 switch(temp) { case 0x0e: key=8。 break。 case 0x0d: key=9。 break。 case 0x0b: key=10。 break。 case 0x07: key=11。 break。 } speaker=~speaker。 STH1=tab[key]/256。 18 STL1=tab[key]%256。 TR0=1。 temp=P3。 temp=temp amp。 0x0f。 while(temp!=0x0f) { temp=P3。 temp=temp amp。 0x0f。 } TR0=0。 } } P3=0xff。 P37=0。 temp=P3。 temp=tempamp。0x0f。 if(temp!=0x0f) { for(i=50。i0。i) for(j=200。j0。j)。 temp=P3。 temp=temp amp。 0x0f。 if(temp!=0x0f) { temp=P3。 temp=tempamp。0x0f。 switch(temp) { case 0x0e: key=12。 break。 case 0x0d: key=13。 break。 case 0x0b: key=14。 break。 case 0x07: key=15。 break。 19 } speaker=~speaker。 STH1=tab[key]/256。 STL1=tab[key]%256。 TR0=1。 temp=P3。 temp=temp amp。 0x0f。 while(temp!=0x0f) { temp=P3。 temp=temp amp。 0x0f。 } TR0=0。 } } } void timer0(void) interrupt 1 using 0 { if(sw==1) { TH0=STH1。 TL0=STL1。} else { TH0=STH0。 TL0=STL0。} speaker=!speaker。 } void delay(unsigned char t) { unsigned char t1。 unsigned long t2。 for(t1=0。t1t。t1++) { for(t2=0。t28000。t2++) { 。 } } TR0=0。 } 20 void song() { TH0=STH0。 TL0=STL0。 TR0=1。 delay(time)。 } void music(void) { m=0。 time=1。 sw=1。 while(timeamp。amp。sw==0) { if(sw) {i=0。continue。} else { k=sszymmh[m]+7*sszymmh[m+1]1。 STH0=FREQH[k]。 STL0=FREQL[k]。 time=sszymmh[m+2]。 m=m+3。 song()。 } } } void main() { TMOD=0x01。 ET0=1。 EA=1。 while(1) { if(sw==1)key_music()。 else music()。 } } 21 附錄二: 元器件清單 名 稱 示值 數(shù)量 (個 ) STC89C52 單片機 1 晶振 12M 1 電位器 10k 1 四腳按鍵開關(guān) 16 六腳開關(guān) 1 LM386 1 電解 電容 1 電解電容 100uF 1 電解電容 10uF 2 瓷片電容 30pF 2 電阻 10K 4 蜂鳴器
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1