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

    Hi Josh,

    The INT_INT should work ok, even with it on PORTA.

    For the Interrupt on change with PORTA and PORTB, just add these two lines in the ASM section right before the INT_LIST

    RBIF = RABIF
    RBIE = RABIE
    (no space at the beginning of the line)

    Then use RBC_INT. I'll add RABC_INT, C1_INT and C2_INT names in DT_INTS-14 later, but that should get you going for now.

    HTH,
      Darrel

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


    Did you find this post helpful? Yes | No

    Default

    dhouston,

    For the 12F683...
    Did you comment out the wsave2 and wsave3 variables in DT_INTS-14?

    DT

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor
    For the 12F683...
    Did you comment out the wsave2 and wsave3 variables in DT_INTS-14?
    Not until seeing your question. That seems to do it. It compiles and only uses 593 words so I think it will be OK, now.

    Will the pin change functions work with the 12F683?
    Last edited by dhouston; - 1st August 2006 at 16:16.

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


    Did you find this post helpful? Yes | No

    Default

    Awesom,

    Will the pin change functions work with the 12F683?
    Sure will.

    Add these two lines in the ASM section right before the INT_LIST

    RBIF = GPIF
    RBIE = GPIE
    (no space at the beginning of the line)

    Then use RBC_INT.
    <br>
    DT

  5. #5
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor
    Add these two lines in the ASM section right before the INT_LIST

    RBIF = GPIF
    RBIE = GPIE
    (no space at the beginning of the line)

    Then use RBC_INT.
    Thanks. Spending $0.25-0.30 more for the 12F683 vs. the 12F629 is worth it to be able to use Instant Interrupts.

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


    Did you find this post helpful? Yes | No

    Default

    I like the 683 too. If for nothing more than the CCP module. Of course the extra RAM and program space is also handy.

    With the 629 only having 64 bytes of RAM,
    PBP uses 24-26 bytes
    and DT_INTS-14 and ReEnterPBP want 31 bytes of it (without T? vars)

    Which only leaves about 6-7 bytes for the program. Not much you can do with that.

    But, when using ASM interrupt handlers, DT_INTS-14 only needs 7 bytes of RAM, leaving around 38 bytes for the users program. Now that, is workable. It also uses less program space that way.

    You mentioned earlier that you only needed to toggle a pin in the interrupt, so you might take a look at this page...

    DT_INTS-14 (Assembly Language Interrupts)
    http://www.darreltaylor.com/DT_INTS-14/asm_ints.html

    The ToggleLED1: handler does just that. And if the other handlers aren't too tuff, you might still fit it in a 629.

    HTH,
    &nbsp; DT

  7. #7
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Darrel

    I'm going to be moving a project from a 16F88 to an 18F1320. The reason for the move is the 18F1320 has 3 external interrupts, 2 of which I will be using. Currently I'm using instant interrupts and INT_INT on the 16F88. The question is will instant interrupts work with multiple external interrupts? I see in the datasheet that the external interrupts have numbered flags.

  8. #8
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Default 12F683 code to 12F629

    Quote Originally Posted by Darrel Taylor View Post
    I like the 683 too. If for nothing more than the CCP module. Of course the extra RAM and program space is also handy.

    With the 629 only having 64 bytes of RAM,
    PBP uses 24-26 bytes
    and DT_INTS-14 and ReEnterPBP want 31 bytes of it (without T? vars)

    Which only leaves about 6-7 bytes for the program. Not much you can do with that.

    But, when using ASM interrupt handlers, DT_INTS-14 only needs 7 bytes of RAM, leaving around 38 bytes for the users program. Now that, is workable. It also uses less program space that way.

    You mentioned earlier that you only needed to toggle a pin in the interrupt, so you might take a look at this page...

    DT_INTS-14 (Assembly Language Interrupts)
    http://www.darreltaylor.com/DT_INTS-14/asm_ints.html

    The ToggleLED1: handler does just that. And if the other handlers aren't too tuff, you might still fit it in a 629.

    HTH,
    &nbsp; DT
    Hi Darrel,
    I tried this above tip to get back some RAM space to try put my old 12F683 code into a 12F629, but I get a persistent PBP error when I try to compile it.

    error[101] d:temp\8chppm~3.asm 450: Error: (ReEnterPBP must be INCLUDEd to use PBP type interrupts)

    I also fiddled the wsave value to get past other errors, but this one escapes me, due to not being very familiar with assembly I'd expect.

    Heres my ASM code at the start of the program, what did I mess up ?
    Thanks Martin
    'Interrupt driven 20mS timer for PPM frame timing. See also "my_handler". Uses Timer 1 interrupts.
    INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
    'INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts

    ASM
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?
    INT_Handler TMR1_INT, _my_handler, PBP, yes
    endm
    INT_CREATE ; Creates the interrupt processor
    INT_ENABLE TMR1_INT ; Enable Timer 1 Interrupts

    ENDASM

    T1CON = $1 ; TMR1ON
    '@ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts

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 : 5

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