ECT in capture mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ECT in capture mode

Jump to solution
1,063 Views
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

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
606 Views
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

 

View solution in original post

0 Kudos
Reply
1 Reply
607 Views
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 Kudos
Reply