| 
 
初级会员 
 
	积分53金钱53 注册时间2016-7-1在线时间11 小时 | 
 
1金钱 
| [img=0,1]file:///C:\Users\Administrator\AppData\Roaming\Tencent\Users\857157378\QQ\WinTemp\RichOle\WI0CEP[5WEFS{$VM(JJ_PQW.png[/img]这是个TIM4的中断函数    怎么清零里边的数据呢 
 #pragma vector= 0x19                       //TIM4_OVR_UIF_vector
 __interrupt __root void  TIM4_Handler(void)
 {
 
 TIM4_SR_bit.UIF = 0;       //中断标志位清零
 
 count1++;
 
 if (count1==1000)
 {
 count7++;
 count1 =0;
 
 if(count7==60)
 {
 count2++;
 
 count7=0;
 
 count14++;
 
 count18++;
 
 if (count2<420)        //第一阶段恒流充电 2.5A充电7小时
 {
 stage=1;
 }
 
 
 if ((420<count2)&&(count2<480))      //第三阶段恒压充电  2小时 电流逐渐下降到0.5A
 {
 stage=2;
 }
 
 if (480<count2)      //浮充电2小时后关机
 {
 stage=3;
 }
 //   stage=2;                             //验证功能使用
 //   stage=3;                             //验证功能使用
 }
 }
 
 }
 
 
 这个定时器的中断 里  count14   如果我在主函数中给他清零
 会有什么问题不?
 
 怎么弄才能正常工作呢
 
 
 | 
 |