while(1);{if(timer1>a)timer1=0;if(timer1b)PWM=0;elsePWM=1;}可以同过定时器对timer计数,调节周期,通过调a,b的值调占空比。
在线咨询:
邮箱: kf@86ic.com