INT interrupt problem


Closed Thread
Results 1 to 6 of 6
  1. #1

    Default INT interrupt problem

    Hi Everyone,

    I am having difficulties with INT_interrupt. I am using Darrel Taylor Instant interrupt system. I found that very often you can use assembly level interrupts while still using Basic language statements. It makes the program smaller and works faster. I used this technique on 16F877a. But I found that the chip is very bulky if you want to make simple project so I moved on to 12F683 and 16F684. The problem is that once the program enters interrupt handler it doesn’t return to the main program anymore but still responds to the INT_interrupt. So in other words it returns somewhere but not to the main program. I found two decisions to the problem one is to add DEBUG " " before @INT_RETURN and the other is to use PBP level interrupts and include "ReEnterPBP.bas". If someone came across the same problem can you please share your experience. Thanks in advance.
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by netstranger.nz View Post
    ... I found that very often you can use assembly level interrupts while still using Basic language statements. It makes the program smaller and works faster. ...
    Yes, if you are VERY careful you can do that.

    But using PAUSE in an ASM handler exceeds the "Careful" status.
    Can't do that.
    Make it a PBP type, and include ReEnterPBP.bas.
    <br>
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel,
    Thanks a lot for your answer it works. I should also add that I looked at my old 16F877a code I mentioned above and sure enough there is no PAUSE. I scoped the time that the interrupt handler takes off the main program in PBP and ASM modes. The interrupt handler is “TOGGLE LED1” and the PIC runs of the internal 8Mhz oscillator.
    None of my small projects would run without Instant Interrupts, I wouldn’t have a nice Bargraph on my LCD, I wouldn’t know how to set all the pins to Digital and would not share my experience if I didn’t have the examples of the others who spent their time to answer the questions.
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    netstranger,

    It's nice to know that stuff is getting used by somebody.

    Do you still have the set-up you used for the scope picture?

    I've finished the update to DT_INTS-14, and am doing the testing now.
    I've tried to optimize the time it takes to get in and out of the handlers as much as possible, but I don't have a fancy digital scope to see if it helped or not.

    If you could run the same test on the new version I would greatly appreciate it.

    If you can, I'll send you the files.

    Thanks,
    DT

  5. #5


    Did you find this post helpful? Yes | No

    Default

    No Problem, I will do my best.

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


    Did you find this post helpful? Yes | No

    Default

    Thanks,

    They're on they're way.
    <br>
    DT

Similar Threads

  1. Low freq PWM problem
    By ultiblade in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th February 2010, 07:09
  2. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  3. Replies: 1
    Last Post: - 2nd November 2006, 23:24
  4. Interrupt Problem
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th November 2005, 20:58
  5. Interrupt stack overflow problem with Resume {label}
    By Yuantu Huang in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd May 2005, 01:17

Members who have read this thread : 1

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