emwin GRAPH简易示波器,信号怎么无法采集? void TIM6_IRQHandler(void) { if(TIM_GetITStatus(TIM6,TIM_IT_Update)!=RESET) { static int count=0; if((oscilldev.buffer!=NULL)&&(oscilldev.adflag==0)) //buffer为空,并且允许进行AD采集 { oscilldev.buffer[count]=(int)((float)Get_Adc(ADC_Channel_1)*oscilldev.resolut);//电压值,因为单位mv //printf("%d\r\n",oscilldev.buffer[count]); count++; if(count>oscilldev.dataxsize)//一次数据采集完成 { count=0; oscilldev.adflag=1;//标记AD采集完成 } } } TIM_ClearITPendingBit(TIM6,TIM_IT_Update); //清除中断标志位 }
|