Instant Interrupts - Revisited


Closed Thread
Results 1 to 40 of 773

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    No, I have no idea what you are doing.
    If you're using a timer, why do you need pauses?

    What frequency are you trying to run the timer at?
    What frequency is your primary oscillator?
    What PIC are you using?
    <br>
    DT

  2. #2
    Join Date
    Dec 2005
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    I use one 16F877 MCU to 20 Mhz

    TMR1 produce an interrupt every 0,4 µSec
    for to drive four 7 segment displays (prescaler:1)

    My board developpement is EasyPic4

    If I write not a Pause after TMR1H %11111111
    then the displays don't work

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by debutpic View Post
    I use one 16F877 MCU to 20 Mhz
    TMR1 produce an interrupt every 0,4 µSec
    At 4Mhz, each instruction takes 1 uSec to execute.
    At 20Mhz, each instruciton takes .2 uSec to execute.
    When you take in to account the fact that each jump/return to/from the interrupt handler takes at minimum 4 instructions cycles (2 for the jump into the int handler, 2 for the RETFIE after the handler), which happens to be .8uSec, you have less than ZERO time to do anything.
    Even at 40Mhz, you're still at ZERO time left over.
    At 48Mhz, you might get one instruction in here and there...
    And even at 64Mhz, you probably won't get more than one or two instructions done between interrupts.

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    I think it is better to post the details of your project so that you could get a decent help. And the .4usec to drive a LED display, to me seems too little time.

    Ioannis

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    And the .4usec to drive a LED display, to me seems too little time.
    Maybe it's .4uSec for each update and not so much to display...
    but like you said, can only help as much as you know in the first place...

  6. #6
    Join Date
    Dec 2005
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    Thank's for your explanation it's clear now
    I reduced the value preloaded in TMR1
    and he works fine without "pause"

  7. #7
    Join Date
    Apr 2004
    Posts
    34


    Did you find this post helpful? Yes | No

    Cool ResetFlag

    Hello,

    I've been reading through the posts regardings the Instant interrupts.
    I'm still a little confused on the usage or setting of the ResetFlag.
    Maybe I overlooked it in the posts but I did not find any info on this.
    In some cases it is set to 'yes' but what is the influence.
    --> ; IntSource, Label, Type, ResetFlag?

    Can someone give me a little explanation on this?

    Thank you.

    Best regards,

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    If you set it to YES, you don't need to clear the interrupt flags manually, DT's INT will do it for you.

    If you set it to NO, the program won't reset the interrupt flag, so you'll have to do it yourself. In case you don't, your program will always turn in round in your ISR.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

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

Members who have read this thread : 8

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