ECT in capture mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

ECT in capture mode

跳至解决方案
1,064 次查看
freescale_satya
Contributor III

Hi,

I have one clarification. i do not understand when you configure a channel in ECT as input capture mode then the timer channel registers say TC0 does not register the number of pulses from the start but insted reads the TCNT value. if the channel register can register the pulses then simply after some ms i can count the pulses and get the frequency. but i think it is not the case with s12x. Could somebody please let me know how to measure the frequency of the pulses. Please also let me know if my understanding is wrong.

 

thanks in advance,

regards

satya

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
607 次查看
kef
Specialist I

Pulse Accumulator can register number of external pulses or do gated time counting.

 

Free running timer counter TCNT is your chronometer. Using input capture you capture timestamp (TCNT) of first pulse t1, then timestamp of second pulse t2. Frequency is 1/(t2-t1).

 

Regarding usage of input capture, I think you should read Section 10 of M68HC11 Reference manual. HC11 has similar input capture and output compare channels like in ECT

http://cache.freescale.com/files/microcontrollers/doc/ref_manual/M68HC11RM.pdf

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
608 次查看
kef
Specialist I

Pulse Accumulator can register number of external pulses or do gated time counting.

 

Free running timer counter TCNT is your chronometer. Using input capture you capture timestamp (TCNT) of first pulse t1, then timestamp of second pulse t2. Frequency is 1/(t2-t1).

 

Regarding usage of input capture, I think you should read Section 10 of M68HC11 Reference manual. HC11 has similar input capture and output compare channels like in ECT

http://cache.freescale.com/files/microcontrollers/doc/ref_manual/M68HC11RM.pdf

 

0 项奖励
回复