Question for Mr. Darrel Taylor and Mister-e Timer1 Reload


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: Question for Mr. Darrel Taylor and Mister-e Timer1 Reload

    I would step through the interrupt with MPLAB SIM to more accurately determine the time involved for interrupt reload.
    I think interrupt reload is the time or instructions used on interrupt to again restart the interrupt.


    Norm
    Last edited by Normnet; - 10th July 2014 at 01:56.

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Question for Mr. Darrel Taylor and Mister-e Timer1 Reload

    One instruction to jump to interrupt, one to stop timer, 2 to load TMR1H, 2 to load TMR1L, and 1 to enable time. So that is 7 instruction. So if you need 8, just add @ NOP.
    But you say that you use DT_Int, so you probably use more than 7 instruction. You need to check dissembly of hex file to count how instruction is used between int vector, and timer reload. Also, this depending on clock source for that timer. This is case if clock source is from OSC/4. If you have 32768Hz crystal, then your Reload cycle is 0. Because TMR clock is much slower than interrupt. So probably 1 clock cycle for tmr last longer then all instruction to reload timer.

    Your interrupt error is 0.001%, but crystal error are probably 1-5%, so that small error won't contribute much to overall time precision.
    EDIT:
    richard type faster than me

Similar Threads

  1. Darrel Taylor Interrupts and MultiCalc
    By AvionicsMaster1 in forum General
    Replies: 6
    Last Post: - 14th February 2012, 06:18
  2. Timer1 and Timer2 interrupts, Darrel Taylor
    By ronbowalker in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th December 2009, 18:38
  3. To Mr. Darrel Taylor once again
    By atwoz in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 10th December 2009, 19:10
  4. Darrel Taylor Elapsed Timer
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th March 2008, 01:22
  5. @Darrel Taylor Interrupt ;-)
    By Robson in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 31st August 2007, 00:59

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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