DT Interupts PortA or PortB?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: DT Interupts PortA or PortB?

    The preload value for a timer is easily calculated with Mister E's PIC MultiCalc.

    http://www.picbasic.co.uk/forum/atta...7&d=1225550328
    Charles Linquist

  2. #2
    Join Date
    Apr 2009
    Location
    Boise, Id
    Posts
    44


    Did you find this post helpful? Yes | No

    Default Re: DT Interupts PortA or PortB?

    Charles and Henrik;
    Preloading TMR3 Worked like a charm, I made it go just a little faster than I need just for some room for error. With a preload of:

    Code:
    TMR3Preload       CON 51650
    I put this at the end of my TMR3 interupt routine to preload:


    Code:
    T3CON.0 = %0   'Turn Timer Off To preload for frequency I need.
    TMR3Now.Highbyte = TMR3H
    TMR3Now.LowByte =  TMR3L
    TMR3Now = TMR3Now + TMR3PreLoad
    TMR3H = TMR3Now.HighByte
    TMR3L = TMR3Now.LowByte
    T3Con.0 = %1  'Turn Timer on
    Seems to run at 355-360 hz. The error is probably in how I'm capturing the frequency, it's probably more accurate than that. That's what I need though, MISTER E's MultiCalc is handy for this, so thanks also to Mister E and everyone else. I didn't know I could preload the timer, I'm learning more all the time.

    Thanks Again,
    Shane

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