首页 | 本学科首页   官方微博 | 高级检索  
     

用STM32触发捕捉实现高速高精度测频
引用本文:黄春平. 用STM32触发捕捉实现高速高精度测频[J]. 单片机与嵌入式系统应用, 2013, 13(3): 32-34,38
作者姓名:黄春平
作者单位:中山职业技术学院电子信息工程系,中山,528404
摘    要:介绍利用STM32F103单片机实现高速、高精度测频的原理及方法。利用16位定时器4(TIM4)产生1s的溢出触发脉冲复位定时器2(TIM2),同时清零前的计数值被捕捉到通道1的捕捉比较寄存器TIM2_CCR1中。为了提高整个程序的效率,可及时响应各个中断,采用了消息驱动的方式,当1s溢出中断时,投递消息完成对显示器缓冲区的定时刷新。该测频系统最高频率可测到288MHz,最低可测到4Hz,性能稳定。

关 键 词:STM32F103  触发捕捉  高速  高精度  消息驱动

High Speed High Precision Frequency Measurement Based on STM32 Capture Trigger Function
Huang Chunping. High Speed High Precision Frequency Measurement Based on STM32 Capture Trigger Function[J]. Microcontrollers & Embedded Systems, 2013, 13(3): 32-34,38
Authors:Huang Chunping
Affiliation:Huang Chunping ( Electronic and Information Engineering, Zhongshan Polytechnic, Zhongshan 528404,China)
Abstract:The paper uses STM32F103 microcontroller to achieve high-speed, high-precision frequency measurement principles and meth- ods. The design adopts 16-bits timer 4(TIM4) to generate ls overflow trigger pulse to reset timer 2(TIM2), and cleared before the count value are captured to channel l's capture compare register TIM2 CCR1. In order to improve efficiency of the entire program, time ly responding to each interrupt ,and it takes the message-driven way when the ls overflow interrupt, the delivery messages completes timing refresh of the display buffer. The highest frequency of the frequency measurement system can he measured to 288 MHz, the min- imum can be measured to 4 Hz, and the system has stable performance.
Keywords:STM32F103  trigger to capture  high speed  high-precision  message-driven
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号