yo yo

FreeCounter Bean, does not return the 32bit counter?

Discussion created by yo yo on Jun 14, 2006
Latest reply on Jun 16, 2006 by Processor Expert
I'm trying to implement a simple freq counter using the following formula: 1/(timeSinceLastPulse)=Freq. (it's a simplified version). For that i thought i could use a Free running counter, and do the math. But when i try to find a method that would give me the value of the counter, i find that the avaiable methods are: GetTick, GetUS, GetMS, GetSec, and etc, not GetValue. Since i'm using 25uS as my resolution and all the above methods return a integer, i don't know how i can get the value of the counter (without resorting to modifying the bean, if i have to i will but i prefer not to). Is there a way for the methods to return a float (i have 32bit float enabled in my project) or to create a method to access the counter?
I just wanted to avoid using an TI1:TimerInterrup with an OnInterrupt handler and my own 32 or 16bit math (since i can't code asm as efficiently yet)

Outcomes