problem using GOSUB under interrupt


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    fobya71,

    It would be better if you post your code as it is, so we can spot where the problem is. I call sub-routines from the DISABLE-ENABLE Interrupt routine and never have any problems. Some people will tell you that it is not recommended but for me it works.

    Robert

  2. #2
    Join Date
    Apr 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rsocor01 View Post
    fobya71,

    It would be better if you post your code as it is, so we can spot where the problem is. I call sub-routines from the DISABLE-ENABLE Interrupt routine and never have any problems. Some people will tell you that it is not recommended but for me it works.

    Robert
    Yeah I know... usually the interrupt routine must be as shorter as possible and it should not call other subroutines... It is a modification of an existent project and so I have no time to change everything although I will do in future.


    As soon I will be at home I will write the exact code.

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


    Did you find this post helpful? Yes | No

    Default

    And while you are at it - take a look at Darrel Taylor's Instant Interrupts. They are almost as easy to use as ONINT-GOTO, and they have a lot of advantages -they can't be blocked, the code generated is smaller, the int latency is less...
    Charles Linquist

  4. #4
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    704


    Did you find this post helpful? Yes | No

    Default

    And while you are at it - take a look at Darrel Taylor's Instant Interrupts. They are almost as easy to use as ONINT-GOTO, and they have a lot of advantages -they can't be blocked, the code generated is smaller, the int latency is less...
    Charles,

    What do you mean by "they can't be blocked"? How much smaller is the code generated?

    Robert

  5. #5
    Join Date
    Apr 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis View Post
    And while you are at it - take a look at Darrel Taylor's Instant Interrupts. They are almost as easy to use as ONINT-GOTO, and they have a lot of advantages -they can't be blocked, the code generated is smaller, the int latency is less...
    Yeah, I saw a bit... I will investigate more if they could be easily applied to my program.

  6. #6
    Join Date
    Apr 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    tried Taylor's int managment. It doesn't work... gives those error on PicBasic Pro / MicroCodeStudio+:


  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default

    Are you using MPASM as the assembler? You have to if you're going to use DT-INTS.

  8. #8
    Join Date
    Apr 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    yes I use Mpasm

Similar Threads

  1. Graphic LCD with PICbasic pro
    By amindzo in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th November 2012, 12:45
  2. shifting problem
    By helmut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st August 2007, 07:11
  3. Controlling an 240x128 LCD Touchpanel Display
    By Vincent in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 8th June 2006, 00:36
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 21:10
  5. ds1307 from f877 to f452 not work
    By microkam in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th July 2005, 01:02

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