分辨率0.01HZ(^_^ 有点吹,其实10HZ一下能到0.01HZ)
1.5K以下用TM5 捕获 PA0脚
1.5K-20M(信号发生器只能输出20M)以上用TM2计数 PA0脚
主函TM2和TM3的初始化(先计数模式判断输入频率大小), 再运行 void Freq_Filter_Process(void) 即可 ,里面的显示程序自己修改成自己的显示程序
希望对做频率计的有帮助,顺便感谢“正点原子”为STM32做的贡献!哈哈
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
if(Freq_value>=1000000.0)Counter_Dispaly(100,200,BLACK,LIGHTGREEN," %5.3f MHz",Freq_value/1000000.0);
else if ((Freq_value>=100000.0)&&(Freq_value<999999.9)) Counter_Dispaly(100,200,BLACK,LIGHTGREEN," %5.1f KHz",Freq_value/1000.0);
else if((Freq_value>=10000.0)&&(Freq_value<99999.9))Counter_Dispaly(100,200,BLACK,LIGHTGREEN," %5.2f KHz",Freq_value/1000.0);
else if((Freq_value>=1000.0)&&(Freq_value<9999.9)) Counter_Dispaly(100,200,BLACK,LIGHTGREEN," %5.3f KHz",Freq_value/1000.0);
else if((Freq_value>=100.0)&&(Freq_value<999.9))Counter_Dispaly(100,200,BLACK,LIGHTGREEN," %5.1f Hz ",Freq_value);
else if((Freq_value>=10.0)&&(Freq_value<99.9))Counter_Dispaly(100,200,BLACK,LIGHTGREEN," %5.2f Hz ",Freq_value);
else if(Freq_value<10.0) Counter_Dispaly(100,200,BLACK,LIGHTGREEN," %5.3f Hz ",Freq_value);
就这个里面的count_display不明白
一周热门 更多>