Input capture unit - counting external pulses
Posted: Sun Nov 30, 2014 3:23 pm
Hello,
I'm working on a project where I have to measure a speed of rotation of a wheel. I'm using simple "light barrier crossing" circuit, so it gives one pulse per revolution.
What is the best option to choose to measure that? I tried ICU driver by using the "last period" measurement. But I guess the driver counts internal pulses (generator prescaled to give 10000 Hz) gated by external signal (coming from my circuit).
Is there an option to count external pulses gated internally, for example - for every 20 ms it will return the number of input pulses?
Best regards
I'm working on a project where I have to measure a speed of rotation of a wheel. I'm using simple "light barrier crossing" circuit, so it gives one pulse per revolution.
What is the best option to choose to measure that? I tried ICU driver by using the "last period" measurement. But I guess the driver counts internal pulses (generator prescaled to give 10000 Hz) gated by external signal (coming from my circuit).
Is there an option to count external pulses gated internally, for example - for every 20 ms it will return the number of input pulses?
Best regards