ECT in capture mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,449件の閲覧回数
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 解決策
992件の閲覧回数
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 返信
993件の閲覧回数
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 件の賞賛
返信