全文预览

机电接口技术课程设计报告

上传者:幸福人生 |  格式:doc  |  页数:12 |  大小:258KB

文档介绍
on_Type=3; break; case3: RED_A=0;YELLOW_A=1;GREEN_A=1; RED_B=1;YELLOW_B=1;GREEN_B=0; if(++Time_Count!=100)return; Time_Count=0; Operation_Type=4; break; case4: if(++Time_Count!=8)return; Time_Count=0; YELLOW_B=!YELLOW_B; GREEN_B=1; if(++Flash_Count!=10) return; Flash_Count=0; Operation_Type=1; break; }}ucharcodeSONG_TONE[]={?212,212,190,212,159,169,212,212,190,212,142,159,212,212,106,126,129,169,190,119,119,126,159,142,159,0};ucharcodeSONG_LONG[]={?9,3,12,12,12,24,9,3,12,12,12,24,9,3,12,12,12,12,12,9,3,12,12,12,24,0};voidDelayMS(uintms){?uchart;?while(ms--)?{ for(t=0;t<240;t++);?}}voidPlayMusic(){?uinti=0,j,k;?while(SONG_LONG[i]!=0||SONG_TONE[i]!=0)?{ for(j=0;j<SONG_LONG[i]*20;j++) { BEEP=~BEEP; for(k=0;k<SONG_TONE[i]/3;k++); } DelayMS(10); i++;?}}voidmain(){ while(1)?{ TMOD=0x01;?IE=0x82;

收藏

分享

举报
下载此文档