Hello ,
I have an application where I have to count the number of pulses on a pun in a time period ( 100mS). The pulses would have a maximum frequency of 10kHz.
A simple way would be to :
a)Attach the pulses to an rising edge interrupt pin on the micro.Increment the number of pulses in the ISR and store in variable.
b)Setup a timer for 100mS.Fire an interrupt every 100mS.Check the counter variable.
Is there any better way to do this with lesser software overhead ?Maybe the CCP module offers a better solution ?
TIA.
I have an application where I have to count the number of pulses on a pun in a time period ( 100mS). The pulses would have a maximum frequency of 10kHz.
A simple way would be to :
a)Attach the pulses to an rising edge interrupt pin on the micro.Increment the number of pulses in the ISR and store in variable.
b)Setup a timer for 100mS.Fire an interrupt every 100mS.Check the counter variable.
Is there any better way to do this with lesser software overhead ?Maybe the CCP module offers a better solution ?
TIA.