色婷婷AⅤ一区二区三区|亚洲精品第一国产综合亚AV|久久精品官方网视频|日本28视频香蕉

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 51單片機(jī)PWM細(xì)分控制步進(jìn)電機(jī)的研究

          51單片機(jī)PWM細(xì)分控制步進(jìn)電機(jī)的研究

          作者: 時間:2012-08-02 來源:網(wǎng)絡(luò) 收藏
          void Time0_Init(){TMOD=0x01;IE=0x82;TH0=0xff;TL0=0xbd; TR0=1;}void Time0_Int() interrupt 1{switch(bs){case 0:if(count_x==0){TL0=187;TH0=251;P1=pout[djsx[0][count_b*6]];count++;break;}if(count_x!=3){TL0=ys[0][count_x-1][0]; TH0=ys[0][count_x-1][1];P1=pout[djsx[0][count_b*6+count_x]];bs=1;break;}P1=pout[djsx[0][count_b*6+3]];case 1:TL0=ys[1][count_x-1][0];TH0=ys[1][count_x-1][1];P1=P1+pout[djsx[1][count_b*6+count_x]];bs=0;count++;}if(bs==0){if(count==xzsd){count=0;count_x=count_x+xzbs;}if(count_x==6){count_x=0;count_b++;}if(count_x==-1){count_x=5;count_b--;}if(count_b==4)count_b=0;if(count_b==-1)count_b=3;}}void main(){P1=0;Time0_Init();while(1);}

          完畢!

          pwm相關(guān)文章:pwm是什么


          51單片機(jī)相關(guān)文章:51單片機(jī)教程


          pwm相關(guān)文章:pwm原理



          上一頁 1 2 下一頁

          評論


          技術(shù)專區(qū)

          關(guān)閉