Converting milliseconds to frequency


Results 1 to 23 of 23

Threaded View

  1. #11
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    I may not be understanding something here.

    For the basic math, I would have said:

    rpm=60000/z

    where z is in milliseconds.

    That would work, but that kind of division in PBP would take up a lot more processing time than the IF...THEN statements above.
    My question is: Why would doing that single division take longer than going through multiple IF...THEN statements (40-something of them in the example) until one is found where the condition is satisfied?

    Thanks to whomever clarifies this for me!
    Last edited by RussMartin; - 5th September 2007 at 05:38.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

Similar Threads

  1. HPWM command and oscillator frequency
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th March 2009, 22:41
  2. HPWM10 Frequency Updating
    By duncan303 in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 19th January 2008, 12:30
  3. How do I convert an internal variable into frequency
    By schlaray in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2007, 07:26
  4. inaccurate frequency using TMR1 PI18F452
    By nkarpovich in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 14th October 2006, 16:22
  5. frequency measurement
    By big-x in forum General
    Replies: 2
    Last Post: - 25th November 2005, 00:53

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts