摘要
MC9S12XS128单片机的TIM模块由一个16位自由计数器、8路输入捕捉和输出比较器、1个16位脉冲累加器组成。输入捕捉功能对高频信号的测量十分准确和方便,但是对于低频信号测量比较困难。尤其当高、低频信号频率范围相差很大时,靠单一的捕捉功能将使测量变得更加困难。本文利用总定时器溢出计数和输入捕捉功能,实现了对频率范围相差很大的两路高、低频信号的同时测量。
MC9S12XS128 TIM module consists of a 16-bit free counter, 8 channel input capture and output comparator and a 16-bit pulse accumulator. It is very precise and convenient for the input capture function to measure the high-frequency signals, but it is very hard to perform the measurement for the low-frequency signal. Especially when the frequency range of signals is quite distinctive, a single cap- ture function relying on measurement will become more difficult. The paper uses the overflow and" count of total timer and input capture function to achieve simultaneous measurement of the frequency range of two very different high and low frequency signals.
出处
《单片机与嵌入式系统应用》
2013年第11期25-27,共3页
Microcontrollers & Embedded Systems