Instant Interrupts - Revisited - Page 20


+ Reply to Thread
Page 20 of 20 FirstFirst ... 101617181920
Results 761 to 773 of 773
  1. #761
    Join Date
    Jul 2008
    Location
    TURKIYE-KONYA
    Posts
    51

    Default Re: Instant Interrupts - Revisited

    I'm working on a project using 18LF13K22. I need to use RAB Change Interrupt with DT Ints18. I made changes on DT_INTS-18.bas below but i couldn't succeed. Any suggestion?

    Code:
    #define RABC_INT  INTCON, RABIF   ;-- RAB Port Change
    .........

    Code:
    ifdef RABIF
          INT_Source  INTCON,RABIF, INTCON, RABIE,INTCON2,RABIP
      endif
    Thanks..

  2. #762
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219

    Default Re: Instant Interrupts - Revisited

    I had to do the same thing with the PIC18F14K50.
    Our entries look similar except your label is RABC_INT.

    Code:
    #define RAB_INT   INTCON, RABIF   ;-- RAB Port Change, Added 3/15/14 for PIC18F14K50
    and

    Code:
      ifdef RABIF    ;----{ RAB Port Change Interrupt }-----------[INTCON, RABIF]--- (Added 3/15/14 for PIC18F14K50
          INT_Source  INTCON,RABIF, INTCON,RABIE, INTCON2,RABIP 
      endif
    Could it be you're not enabling it with:
    Code:
    INT_ENABLE  RABC_INT   ; Enable IOC
    Louie

  3. #763
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219

    Default Re: Instant Interrupts - Revisited

    Edit: ooops, forgot the "@".

    Code:
    @ INT_ENABLE  RABC_INT   ; Enable IOC
    Louie

  4. #764
    Join Date
    Jul 2008
    Location
    TURKIYE-KONYA
    Posts
    51

    Default Re: Instant Interrupts - Revisited

    Quote Originally Posted by LinkMTech View Post
    I had to do the same thing with the PIC18F14K50.
    Our entries look similar except your label is RABC_INT.

    Code:
    #define RAB_INT   INTCON, RABIF   ;-- RAB Port Change, Added 3/15/14 for PIC18F14K50
    and

    Code:
      ifdef RABIF    ;----{ RAB Port Change Interrupt }-----------[INTCON, RABIF]--- (Added 3/15/14 for PIC18F14K50
          INT_Source  INTCON,RABIF, INTCON,RABIE, INTCON2,RABIP 
      endif
    Could it be you're not enabling it with:
    Code:
    INT_ENABLE  RABC_INT   ; Enable IOC
    Thanks for your reply. I tried to work it with ISIS. It may cause for it. I'm waiting for chips. I will try it again.

  5. #765
    Join Date
    Jul 2008
    Location
    TURKIYE-KONYA
    Posts
    51

    Default Re: Instant Interrupts - Revisited

    The chips have arrived. I tried RAB change interrupt on a demo board. The situation is the same with isis. This is my test code below.

    Code:
        INCLUDE "DT_INTS-18.bas"     ' Base Interrupt System
        INCLUDE "ReEnterPBP-18.bas"     ' Include if using PBP interrupts
        
        ........
    
        OSCCON  = %00110100
        OSCCON2 = 0
        OSCTUNE = %10000000
        
        TRISA   = %11101111
        TRISB   = %11111111
        TRISC   = %00000000
    
        ANSEL   = 0
        ANSELH  = 0
        
        INTCON2.7   = 0
        WPUA        = %00101111
        WPUB        = %11110000
        IOCA        = %00000111
        IOCB        = %01010000
    
        ASM
    INT_LIST  macro    ; IntSource,      Label,  Type, ResetFlag?
                        INT_Handler   RABC_INT,  _RABC,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
        INT_ENABLE  RABC_INT
        ENDASM
    
        MAIN:
    
       
        ......
    GOTO MAIN
    
    
         RABC : 
        
        COUNTER = COUNTER + 1
        
        
    @ INT_RETURN

  6. #766
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219

    Default Re: Instant Interrupts - Revisited

    I tried your INT code mod and sample code here (added Counter VAR Word) and it compiled okay.
    A couple questions:
    What are you try to do that is not happening?
    And excuse my ignorance, but what is ISIS?
    Louie

  7. #767
    Join Date
    May 2013
    Location
    australia
    Posts
    1,485

    Default Re: Instant Interrupts - Revisited

    but what is ISIS?
    looks like an Egyptian goddess

    https://en.wikipedia.org/wiki/Isis

    but it probably this
    http:/'s/www.picmicros.org.uk/Interfacing/TUTORIAL.htm

  8. #768
    Join Date
    Jul 2008
    Location
    TURKIYE-KONYA
    Posts
    51

    Default Re: Instant Interrupts - Revisited

    Quote Originally Posted by LinkMTech View Post
    I tried your INT code mod and sample code here (added Counter VAR Word) and it compiled okay.
    A couple questions:
    What are you try to do that is not happening?
    And excuse my ignorance, but what is ISIS?
    * There is no problem with compiling. It's okay.

    * There are buttons tied PORTA.0, PORTA.1, PORTA.2 - PORTB.4 and PORTB.6. I want to get interrupt every logic change on this ports. If you look at IOCA and IOCB registers, these ports are enabled for interrupt.

    * ISIS is a simulation program.

  9. #769
    Join Date
    May 2013
    Location
    australia
    Posts
    1,485

    Default Re: Instant Interrupts - Revisited

    DT_INTS does not clear the ioc int flag you need to do that yourself either in your isr or when you ready to rearm the interrupt

  10. #770
    Join Date
    May 2013
    Location
    australia
    Posts
    1,485

    Default Re: Instant Interrupts - Revisited

    I'm wrong there, I was thinking of ioca/b int issues I had some years back . but after having another look it was with a 16f1825 which has an individual ioc flag for every ioc pin , but it won't hurt to rule that out anyway

  11. #771
    Join Date
    Jul 2008
    Location
    TURKIYE-KONYA
    Posts
    51

    Default Re: Instant Interrupts - Revisited

    Hello everyone..

    I read this post today. And added MOVF PORTA, W - MOVF PORTB, W. Now it's working as it should be.

    Code:
    RABC : 
    
    @ MOVF PORTA, W
    @ MOVF PORTB, W
    
        COUNTER = COUNTER + 1   
        
    @ INT_RETURN

  12. #772
    Join Date
    Feb 2010
    Posts
    30

    Default Re: Instant Interrupts - Revisited

    Hello,
    i have a working code which uses
    CMP_INT and TMR1_INT.

    I want when TMR1_INT event triggered ,
    to change the period (or Frequency as entered) and reload the TMR1 with a new value.

    Is this possible to put mutiple instances of e.g.

    @Freq = 416 ; Frequency of Interrupts in Hz 416Hz

    ??

    Thank you.

  13. #773
    Join Date
    May 2013
    Location
    australia
    Posts
    1,485

    Default Re: Instant Interrupts - Revisited

    Is this possible to put mutiple instances of e.g. @Freq = 416
    "Freq " would be a label and cannot be redefined
    you can however
    @Freq1 = 416
    @Freq2 = 410
    @Freq3 = 466

    if you need to change the tmr1 interrupt rate the tmr1 reload value needs to be a var

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, 06:32
  5. Replies: 1
    Last Post: - 1st November 2006, 04:11

Members who have read this thread : 1

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