PWM3_VAL=900; PWM4_VAL=900; PWM5_VAL=900; PWM6_VAL=900; break; case 1: if((huoer1==1)&&(huoer3==0)) PWM1_VAL=300; else PWM1_VAL=900; if((huoer1==0)&&(huoer2==1)) PWM2_VAL=300; else PWM2_VAL=900; if((huoer2==0)&&(huoer3==1)) PWM3_VAL=300; else PWM3_VAL=900; if((huoer1==0)&&(huoer3==1)) PWM4_VAL=300; else PWM4_VAL=900; if((huoer1==1)&&(huoer2==0)) PWM5_VAL=300; else PWM5_VAL=900; if((huoer2==1)&&(huoer3==0)) PWM6_VAL=300; else PWM6_VAL=900; break; case 2: if((huoer1==1)&&(huoer3==0)) PWM1_VAL=350; else PWM1_VAL=900; if((huoer1==0)&&(huoer2==1)) PWM2_VAL=350; else PWM2_VAL=900; if((huoer2==0)&&(huoer3==1)) PWM3_VAL=350; else PWM3_VAL=900; if((huoer1==0)&&(huoer3==1)) PWM4_VAL=350; else PWM4_VAL=900; if((huoer1==1)&&(huoer2==0)) PWM5_VAL=350; else PWM5_VAL=900; if((huoer2==1)&&(huoer3==0)) PWM6_VAL=350; else PWM6_VAL=900; break; case 3: if((huoer1==1)&&(huoer3==0)) PWM1_VAL=400; else PWM1_VAL=900; if((huoer1==0)&&(huoer2==1)) PWM2_VAL=400; else PWM2_VAL=900; if((huoer2==0)&&(huoer3==1)) PWM3_VAL=400; else PWM3_VAL=900; if((huoer1==0)&&(huoer3==1)) PWM4_VAL=400; else PWM4_VAL=900; if((huoer1==1)&&(huoer2==0)) PWM5_VAL=400; else PWM5_VAL=900; if((huoer2==1)&&(huoer3==0)) PWM6_VAL=400; else PWM6_VAL=900; break; case 4: if((huoer1==1)&&(huoer3==0)) PWM1_VAL=450; else PWM1_VAL=900; if((huoer1==0)&&(huoer2==1)) PWM2_VAL=450; else PWM2_VAL=900; if((huoer2==0)&&(huoer3==1)) PWM3_VAL=450; else PWM3_VAL=900; if((huoer1==0)&&(huoer3==1)) PWM4_VAL=450; else PWM4_VAL=900; if((huoer1==1)&&(huoer2==0)) PWM5_VAL=450; else PWM5_VAL=900; if((huoer2==1)&&(huoer3==0)) PWM6_VAL=450; else PWM6_VAL=900;
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库基于STM32的直流电机PWM调速控制(11)在线全文阅读。
相关推荐: