我设置的时间周期是1ms,Timer是MTIMmod;Method是Enable,Disable,Reset,GetTimeUS,GetTimeMS。
void main(void)
{
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
unsigned int i, time;
int one_loop_us;
FC161_Reset();
for( i=0; i<600; ++i );
if( FC161_GetTimeUS( &time )==ERR_OK ) /*老是停在这这里面出不来,究竟什么原因,怎么解决*/
{
one_loop_us = time ;
}
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
for(;;){}
/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |