Quote Originally Posted by dhouston View Post
period = time for one cycle
f = frequency in hertz (i.e. cycles per second)
period = 1/f

Assuming a 50% duty cycle, the time for a single pulse = 1/2 period

What you need to do is convert the pulse counts into times and then apply the above formula. The counts will vary with clock frequency and any prescaler used.
Thank you for your reply.

But I can't understand it very well, for example what happens if I have a PIC 16F877A working with a clock of 20MHz. Do I have to see the relationship between my frequency, for example 82.64Hz, and the clock of 20MHz and then work with your formula?
It would be really great if you could help me with an example, I'll be really thankful!