Instant Interrupts - Revisited


Closed Thread
Results 1 to 40 of 773

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    Thanks Alain.

    But with MCS does it compile OK?

    Ioannis

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by Ioannis View Post
    Thanks Alain.

    But with MCS does it compile OK?

    Ioannis
    Hi, Ioannis

    I've verified in real life ... my old programs Work fine, compiled With MCS.

    Was not so evident due to little changes in the resulting HEX ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Dec 2005
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    Darrel,
    In my PBP code the only assembly routine would be your code for the interrupt and I have no branch routines. My interrupt routine is in PBP, not assembly, but if is was, could this then be a possible issue. Also in searching this thread, I did see the possibly of inserting "@ errorlevel -306 " to suppress the warning, if this is a OK, where does it makes sense to insert it, such as right after the includes.
    Thanks for your help,
    Terry

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


    Did you find this post helpful? Yes | No

    Default

    The ASM that declares Interrupts, will be OK because all the GOTO's and GOSUB's/CALLs in DT_INTS already use Paging code.

    If the ISR is assembly language, there would be a possibility of page problems.
    But if you use L?GOTO or L?CALL instead of goto or call, then it won't be a problem either.
    They are macro's that are part of PBP and automatically set PCLATH to the correct page before jumping. They also reset to BANK0, so anywhere they jump to should assume the bank is currently 0.

    The -306 line can technically be put anywhere in the program before the first Page Crossing. But it's usually found at the very top, right up there with your __CONFIG lines.
    <br>
    DT

  5. #5
    Join Date
    Dec 2005
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    Many Thanks Darrel,
    For your help now and for a GREAT easy to use approach for interrupts using PBP.
    Terry

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


    Did you find this post helpful? Yes | No

    Default

    Alain,

    I got ahold of Charles Leo, RE: the duplicate label problem.

    Like I said before, I don't use MPLAB so I didn't know you could do this.

    Under Project | Build Options | Project | PICBASIC PRO tab ...
    Check the "Use Alternate Settings" checkbox, and remove the -k- or -k# parameter.

    The Tracteur program then compiles without error within MPLAB.
    And the setting only affects the Tracteur program.



    HTH,
    DT

  7. #7


    Did you find this post helpful? Yes | No

    Default RBC_INT Question

    I am running into a problem trying to figure out how to use RBC_INT on portB.1

    I am using a 16F883 and I am looking for B.1 to drop from high to low. Below is part of my code to read the interrupt.

    readchar:
    @ INT_DISABLE RBC_INT
    Dummy = PortB
    if Dummy.1 = 0 then
    goto good_int
    Else
    @ INT_CLEAR RBC_INT
    @ INT_ENABLE RBC_INT
    @ INT_RETURN
    endif
    good_int:
    ' process the interrupt code here


    I know this is not correct but I cannot figure out why?

    Any help would be appreciated.

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by Darrel Taylor View Post
    Alain,

    I got ahold of Charles Leo, RE: the duplicate label problem.

    Like I said before, I don't use MPLAB so I didn't know you could do this.

    Under Project | Build Options | Project | PICBASIC PRO tab ...
    Check the "Use Alternate Settings" checkbox, and remove the -k- or -k# parameter.

    The Tracteur program then compiles without error within MPLAB.
    And the setting only affects the Tracteur program.

    HTH,
    Hi, Darrel

    Thanks for the trick ...

    Now, we've completely lost the debug view of produced ASM ... no more labels and even breakpoints can't be used.

    Hope Melabs will correct that soon ... !!!

    BTW I've appreciated Melabs has cleaned the LOOKUP tables ... New EEPROM commands are also fine ... knowing the LSByte is written first !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

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

Members who have read this thread : 4

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