请问msp430f5529可以测5mhz的方波频率吗?
另求参考代码,新手谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Xuyang Cao,
Timer 用作Capture模式可以Capture沿从而计算频率。
取决于Timer的时钟源以及主频,因为是需要有足够快的时钟源进行沿Capture,同时还需要有足够快的响应时间进中断进行数据保存和计算。这些都会引入误差。
我找了一下,F5529没有直接的例程capture 频率,但是F51x2系列有,因为F51x2系列有TImerD支持256-MHz / 4-ns 分辨率。
具体文档请参考: “”“Using the MSP430 Timer_D Module in Hi-Resolution Mode”
http://www.ti.com/lit/an/slaa601/slaa601.pdf
Code可以见MSP430F51x2 code example, 在MSP430Ware里就有。
MSP430F51x2_td0_24.c Timer0_D3, Single Input Capture mode, Normal Timer Mode
MSP430F51x2_td0_25.c Timer0_D3, Dual Input Capture mode, Normal timer mode, Period Measurement
MSP430F51x2_td0_26.c Timer0_D3, Dual Input Capture mode, Normal timer mode, DutyCycle Measurement
Xuyang Cao,
关于不同种类的Timer的区别如下:
Code example也可以从官网下载:
http://www.ti.com/product/MSP430F5152/toolssoftware
Software部分:
MSP430F51x2, MSP430F51x1 Code Examples (Rev. G) (ZIP226KB ) 200views,08 Aug 2016