Is there a way to count number of pulses using a timer? Preferably using a strobe. I want to count number of pulses over a period of time, and get an interrupt at the end.
Is there an API for that?
  | ||||||||||||||
Configure TIMER to count pulses.
Started by rgavrilov, Apr 23 2015 08:02 PM
2 replies to this topic
#1Posted 23 April 2015 - 08:02 PM Is there a way to count number of pulses using a timer? Preferably using a strobe. I want to count number of pulses over a period of time, and get an interrupt at the end.
Is there an API for that?
#2Posted 25 April 2015 - 08:12 AM I do not know of any API which will allow you to do this. If I needed this functionality I'd think about either using two interrupts (one for the timer and one for the signal) and do all of the work in software or use an external counter and a timer and read the value from that when the timer triggers.
Regards, Mark To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life Follow @nevynuk on Twitter #3Posted 30 April 2015 - 01:22 AM How fast do the pulses come? If they're more than a couple Hertz, a more reliable idea might be to use a 555 timer set up as monostable in conjunction with a low-pass filter and then read the result using an analog input. 0 user(s) are reading this topic0 members, 0 guests, 0 anonymous users | ||||||||||||||
|
||||||||||||||
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | ||||||||||||||