Calculating a known and deadly accurate interrupt frequency rate (pic multicalc etc)


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Calculating a known and deadly accurate interrupt frequency rate (pic multicalc

    PicMultiCalc doesn't do TMR2,4,6 unless PR2=255 and you reload on every interrupt.

    TMR2 counts up to the PR2 value + 1, then resets and interrupts.
    So you were only getting 64 counts. (62.5Khz)

    For 200 counts, set PR2 to 199.
    Last edited by Darrel Taylor; - 26th August 2011 at 05:13.
    DT

  2. #2
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Calculating a known and deadly accurate interrupt frequency rate (pic multicalc

    Thanks guys.... PR2 of 199 does indeed get me a toggle frequency of 10khz (actually it's showing bouncing between 9.99khz & 10.0khz ....but that's likely to be a rounding/beating error to do with my scope).

    Darrel thanks for solving the multicalc puzzle to ...thought I was going insane (I probably am anyway "Nurse, more medication quick").

  3. #3
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Calculating a known and deadly accurate interrupt frequency rate (pic multicalc

    You know I knew that, and as soon as I opened this this morning I thought "PR needs to be reload value -1", I bet thats what DT has posted. It still doesn't explain 9.93K, cuz the math if using 201 for the value (pr=200) works out to 9.95K. Thats where I was stumped.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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