DTs instant Interrupts


Results 1 to 6 of 6

Threaded View

  1. #5
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    If you are saving all of the variables every time, in my book, it is not "superfast." That's a lot of unnecessary saving. The latency of saving every variable can throw a PIC RTC off by one count every interrupt. If you have a 32kHz watch crystal, you have to account for that or accept the loss in time.

    But, that is what Basic is all about... not the fastest or most efficient code, but the simplest.

    [edit adds this...]
    For "superfast" interrupts, eliminate all "system" variables in the interrupt so you don't have to save them. If you must use basic commands that require system variables, you can do this by duplicating the subroutines using unique variable names. Then, your only concern is if you have multi-byte variables that are read and/or modified within both the interrupt and the non-interrupt code.

    ...and even then, you can use a byte variable to set a flag, so you don't have the multi-byte reads and/or modifications...
    Last edited by tenaja; - 22nd February 2008 at 17:26.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 21:43
  3. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 20:02
  4. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 20:48
  5. Keypad and DT's Instant Interrupts
    By Homerclese in forum General
    Replies: 11
    Last Post: - 27th April 2007, 06:32

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