摘要
针对直接数字频率合成(DDS)技术不适于单片机直接实现的问题,提出了一种波形信号生成的整周期循环法。借助片内嵌有直接存储器存取控制器(DMA)和数模转换器(DAC)等外设的单片机,该方法可以在不引入DDS专用芯片的情况下直接生成预设波形信号,且在生成信号时完全不占用单片机的CPU时间。对生成波形信号的整周期循环法进行了理论分析,导出了生成信号的频率及最大相对频偏公式,给出了算法实现流程。采用STM32单片机对整周期循环法生成正弦信号进行了实验测试。实验表明生成信号的频率精度高,且波形稳定、质量好。
Aiming at the weakness that Direct Digital Synthesis(DDS) technology is not suitable for the direct realization of MCU,an integer-period repetition method for waveform signal generation is proposed.By using a MCU embedded with on-chip peripherals such as Direct Memory Access controller(DMA) and Digital-to-Analog Converter(DAC),this method can directly generate preset waveform signal without introducing ASIC chips,and the signal generation process does not occupy CPU time of MCU at all.The integer-period repetition method of generating waveform signal is analyzed theoretically,the formula of generating signal frequency and maximum relative frequency deviation is derived,and the algorithm implementation flow is given.STM32 MCU is used to test the sine signal generated by the integer-period repetition method.The experiment shows that the frequency accuracy of the generated signal is high,and the waveform is stable and of good quality.
作者
陈砚圃
刘含
郭博
石立春
CHEN Yan-pu;LIU Han;GUO Bo;SHI Li-Chun(School of Computer Science,Xijing University,Xi'an 710123,China;School of Electronic Information,Xijing University,Xi'an 710123,China)
出处
《宇航计测技术》
CSCD
2023年第3期85-90,共6页
Journal of Astronautic Metrology and Measurement
基金
国家自然科学基金项目(62275079)
陕西省重点研发计划项目(2022GY-118)
西安市创新能力强基计划项目(2021JH-06-0069)资助。