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

正文內(nèi)容

工程實(shí)踐與科技創(chuàng)新[3a]-第35組黃亞設(shè)計(jì)報(bào)告-資料下載頁

2025-08-20 16:54本頁面
  

【正文】 值,令數(shù)碼管驅(qū)動(dòng)位無效,指示燈全滅*///ADCSRA=0xC5。//32分頻last_k1=keypress1。last_k2=keypress2。last_k3=keypress3。last_k4=keypress4。// *** 檢測(cè)到按鍵被按下(0)時(shí),相應(yīng)的指示燈亮(0)*****//if ((PINCamp。(1PC4))==0) {led1 = 0。keypress1=1。}else{led1 = 1。keypress1=0。}if ((PINCamp。(1PC5))==0) {led2 = 0。keypress2=1。}else{led2 = 1。keypress2=0。}if ((PINCamp。(1PC6))==0) {led3 = 0。keypress3=1。}else{led3 = 1。keypress3=0。}if ((PINCamp。(1PC7))==0) {led4 = 0。keypress4=1。}else{led4 = 1。keypress4=0。}if((!last_k1)amp。amp。keypress1){trig1=1。}else{trig1=0。} //按鍵防抖if((!last_k2)amp。amp。keypress2){trig2=1。}else{trig2=0。}if((!last_k3)amp。amp。keypress3){trig3=1。}else{trig3=0。}if((!last_k4)amp。amp。keypress4){trig4=1。}else{trig4=0。}if (workmode==0){ if(display_type==0) { if(trig1==1) { voltage+=10。 if (voltage100) voltage=49。 } if(trig2==1) { voltage++。 if (voltage100) voltage=49。 } if(trig3==1) { display_type=1。 } } else { if(trig1==1) { pwmv[voltage49]++。 } if(trig2==1) { pwmv[voltage49]。 } if(trig3==1) { display_type=0。 } } if(trig4==1) { workmode=1。 }}else if(workmode==1) { //ADMUX=0xD0。 if (ADC511) digitalvoltage=ADC1024。 // else if (ADC511) digitalvoltage=ADC+1024。 else digitalvoltage=ADC。 totaldigitalvoltage[d_ptr++] = digitalvoltage。 ADCSRA=0xC5。//32分頻 if(d_ptr=30) d_ptr=0。 for( i=0。i100。i++) {} if(trig1==1) { voltage+=10。 if (voltage100) voltage = 49。 } if(trig2==1) { voltage++。 if (voltage100) voltage=49。 } if(trig3==1) { if(display_type==0) display_type=1。 else display_type=0。 } if(trig4==1) { workmode=0。 } digitalvoltage =0。 for(i=0。i30。i++) digitalvoltage+=totaldigitalvoltage[i]。 digitalvoltage = digitalvoltage/30。 if( clock1s_flag == 1) { clock1s = 0。 if(digitalvoltagead[voltage49]) { if(digitalvoltagead[voltage49]50) pwmv[voltage49]=15。 else if(digitalvoltagead[voltage49]20) pwmv[voltage49]=7。 else if(digitalvoltagead[voltage49]10) pwmv[voltage49]=3。 else if(digitalvoltagead[voltage49]2) pwmv[voltage49]=1。 } else if(digitalvoltagead[voltage49]) { if(digitalvoltagead[voltage49]50) pwmv[voltage49]+=15。 else if(digitalvoltagead[voltage49]20) pwmv[voltage49]+=7。 else if(digitalvoltagead[voltage49]10) pwmv[voltage49]+=3。 else if(digitalvoltagead[voltage49]2) pwmv[voltage49]+=1。 } clock1s_flag = 0。 } } duty_cycle=pwmv[voltage49]。 OCR1A=duty_cycle。 temp=pwmv[voltage49]。 if (clock1s_flag==0) { clock1s++ 。 } /* 250ms鐘軟定時(shí)器計(jì)數(shù) */ if (clock1s=V_T1s) { clock1s_flag = 1。 /*當(dāng)250ms到時(shí),溢出標(biāo)志置1 */ }// 數(shù)碼管掃描驅(qū)動(dòng)指針值從1到4重復(fù)變換,每5ms間隔對(duì)一個(gè)數(shù)碼管進(jìn)行驅(qū)動(dòng),20ms一個(gè)輪回 if (++digi_scaner=5) digi_scaner = 1。 output_sel=led1*16+led2*32+led3*64+led4*128。 //四個(gè)發(fā)光管送高四位 switch (digi_scaner) { case 1: // 取第一個(gè)數(shù)碼管顯示數(shù)據(jù) output_sel += 1。 output_8seg = NUMTOSEG7(10+workmode)。 break。 case 2: // 取第二個(gè)數(shù)碼管顯示數(shù)據(jù) output_sel += 2。 tempvoltage=voltage/100。 tempduty_cycle=temp/100。 tempadc=digitalvoltage/100。 if(display_type==0) {if(tempvoltage) output_8seg = NUMTOSEG7(tempvoltage)。 else output_8seg = NUMTOSEG7(39。 39。)。} else output_8seg = NUMTOSEG7(tempadc)。 break。 case 3: // 取第三個(gè)數(shù)碼管顯示數(shù)據(jù) output_sel += 4。 tempvoltage=(voltage%100)/10。 tempduty_cycle=(temp%100)/10。 tempadc=(digitalvoltage%100)/10。 if(display_type==0) output_8seg = NUMTOSEG7(tempvoltage+20)。 else output_8seg = NUMTOSEG7(tempadc)。 break。 case 4: // 取第四個(gè)數(shù)碼管顯示數(shù)據(jù) output_sel += 8。 tempvoltage=voltage%10。 tempduty_cycle=temp%10。 tempadc=digitalvoltage%10。 if(display_type==0) output_8seg = NUMTOSEG7(tempvoltage)。 else output_8seg = NUMTOSEG7(tempadc)。 break。 } display_led(output_8seg,output_sel)。 //串轉(zhuǎn)并輸出}//call this routine to initialize all peripherals void init_devices(void){//stop errant interrupts until set up cli()。 //disable all interrupts port_init()。 timer0_init()。 timer1_init()。 MCUCR = 0x00。 GICR = 0x00。 TIMSK = 0x01。 //timer interrupt sources sei()。 //reenable interrupts ADMUX=0xD0。 ADCSRA=0xC5。//32分頻//all peripherals are now initialized}//int main(){ init_devices( )。 workmode=0。 display_type=0。 voltage=49。 keypress1=keypress2=keypress3=keypress4=0。 last_k1=last_k2=last_k3=last_k4=0。 trig1=trig2=trig3=trig4=0。 //settime=0。 //totaldigitalvoltage=0。// 主循環(huán),本例中,在T1中斷服務(wù)程序未被執(zhí)行的空余時(shí)間里,處理機(jī)在以下程序中不斷循環(huán) while(1) { }}
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1