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

正文內(nèi)容

八路搶答器設(shè)計(jì)報(bào)告(已改無錯(cuò)字)

2022-08-31 00:06:57 本頁面
  

【正文】 0x10,0x10,0x10}。uchar time。 //計(jì)時(shí)uchar answer_time=30。uchar prepare=0。 //用來判斷是否允許搶答uchar key_enable=0。 //用來判斷是否允許按鍵uchar re_prepare=0。uchar time_start=0。 //用來判斷是否開始計(jì)時(shí)uchar light=0x00。uchar Timer_Count=0。 //20次50ms/*延時(shí)子程序*/void delayms[2] (uint xms){ uint i,j。 for(i=xms。i0。i) for(j=123。j0。j)。}void lightdis(void){P1=light。delayms(1)。}void resp(uchar temp)。void main(void){uchar i。uchar temp = 0。time=answer_time。TMOD = 0x01。TH0 = 0x3C。TL0 = 0xB0。ET0 = 0。IT0 =0。IT1=0。EX0=1。EX1=1。EA =1。while(1){for(i=0。i6。i++)display(i,disbuf[i]) 。 //數(shù)碼管顯示lightdis()。 //LED顯示if(key_enable==1) //若允許搶答,則掃鍵temp=Scan_Keyboard()。resp(temp)。 //搶答if(time_start==1) //如果開始答題,則開始計(jì)時(shí){TR0=1。ET0=1。EX1=0。disbuf[0]=0x0a。disbuf[4]=time/10。disbuf[5]=time%10。if(time==0||re_prepare==1) //當(dāng)計(jì)時(shí)為0或重新準(zhǔn)備時(shí) {time=answer_time。 TR0=0。 //關(guān)閉計(jì)時(shí)器 ET0=0。 EX1=1。 disbuf[0]=0x11。 //預(yù)備 disbuf[2]=0x10。 disbuf[4]=0x10。 disbuf[5]=0x10。 key_enable=1。 re_prepare=0。 time_start=0。 light=0xfe。 prepare=0。 //不允許搶答 }}}}void resp[3] (uchar temp){if(prepare==0) //不允許搶答{ if(temp==0){/*EX1=1。*/ return。} else {//EX1=0。 disbuf[2]=temp。 disbuf[0]=0x0f。 key_enable=0。 //不允許按鍵 if(temp==1)light=0xfb。 else if(temp==2)light=0xef。 else if(temp==3)light=0xbf。 }}else if(prepare==1) //允許搶答{ if(temp==0) return。 else {disbuf[2]=temp。 disbuf[0]=0x0b。 key_enable=0。 //不允許按鍵 time_start=1。 //允許開始計(jì)時(shí) if(temp==1)light=0xf7。 else if(temp==2)light=0xdf。 else if(temp==3)light=0x7f。 }}}void int0(void) [4] interrupt 0 //外中斷0預(yù)備{ EX0=0。 delayms(1)。 light=0xfe。 lightdis()。 disbuf[0]=0x11。 disbuf[2]=0x10。 disbuf[4]=0x10。 disbuf[5]=0x10。 prepare=0。 key_enable=1。 re_prepare=1。 EX0=1。 IE0=0。}void int1(void) interrupt 2 //外中斷1開始搶答{ EX1=0。 delayms(1)。 light=0xfd。 lightdis()。 disbuf[0]=0x0b。 disbuf[2]=0x10。 disbuf[4]=0x10。 disbuf[5]=0x10。 prepare
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1