文档详情

《使用STM32 的DSP库进行FFT变换说明及例程》.doc

发布:2015-10-17约6.39千字共8页下载文档
文本预览下载声明
/*? *********************************************************************************************************? FileName:dsp_asm.h? *********************************************************************************************************? */? #ifndef??__DSP_ASM_H__? #define??__DSP_ASM_H__? *********************************************************************************************************? *????????????????????????????????????????????FUNCTION?PROTOTYPES? *********************************************************************************************************? */? void????dsp_asm_test(void);? void??dsp_asm_init(void);? #endif??????????????????????????????????????????????????????????/*?End?of?module?include.???????????????????????????????*/? /*8888888888888888888888888888888888888888888888888888888888888888*/? /*8888888888888888888888888888888888888888888888888888888888888888*/? /*? *?FileName:dsp_asm.c? *?Author:Bobby.Chen? *?Email:heroxx@163.com? *?Date:2010-08-11? *?Description:This?file?showes?how?to?use?the?dsp?library?in?mdk?project.? *??????????????????使用三角函数生成采样点,供FFT计算? *??????????????????进行FFT测试时,按下面顺序调用函数即可:? *???????????????????dsp_asm_init();? *???????????????????dsp_asm_test();? */? #include?stm32f10x.h? #include?dsp_asm.h? #include?stm32_dsp.h? #include?table_fft.h? #include?stdio.h? #include?math.h? /*? *********************************************************************************************************? *???????????????????????????????????????????LOCAL?CONSTANTS? *********************************************************************************************************? */? #define?PI2?6.28318530717959? //?Comment?the?lines?that?you?dont?want?to?use.? //?要模拟FFT,请注释掉其他的预定义? //?此处也可以全部注释掉,在MDK的工程属性-C/C++-Preprocessor?Symbols-Define:中添加NPT_XXX项目? //?但是这样做法的缺点是每次修改XXX数据,都会导致MDK下次编译时会编译全部文件,速度太慢。? //#define?NPT_64?64? #define?NPT_256?256? //#define?NPT_1024?1024? //?N=64,Fs/N=50Hz,Max(Valid)=1600Hz? //?64点FFt,采样率3200Hz,频率分辨率50Hz,测量最大有效频率1600Hz?
显示全部
相似文档