DT INTs which int to use??


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: DT INTs which int to use??

    So, for clarification, here is what I have that is working...


    Code:
    IOCB=%11110000    'enable INT on change RB 7,6,5,4
    
    ASM
    INT_LIST  macro    ; IntSource,     Label,  Type,  Resetflag?                
            INT_Handler    RABC_INT,  _Binthndlr,   PBP,  yes       
        endm
        INT_CREATE                   ; Creates the interrupt processor
    ENDASM
    Note that I changed the individual ...
    Code:
    'IOCB.7=1    'enable INT on change RB7
    'IOCB.6=1    'enable INT on change RB6
    'IOCB.5=1    'enable INT on change RB5 rotary push button
    Into one statement...
    Code:
    IOCB=%11110000    'enable INT on change RB 7,6,5,4
    (and added the additional bit that enables IOC on B.4)

    But I still wonder which part of my code is actually enabling the INT on change. As I look over at darrel's web page where he gives examples I do not see anywhere that he has to manipulate the registers to enable the INT's.

    So I am back to thinking that it is really my code
    Code:
    IOCB=%11110000
    that is making the INT's work and part of Darrel's code that tells the PIC where to jump to on INT. "Binthndler"

    still confused
    Last edited by Heckler; - 12th March 2012 at 22:07.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  2. #2
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: DT INTs which int to use??

    To know which Int to use, you need to be a bit of a sleuth, the same thread...

    http://www.picbasic.co.uk/forum/show...2315#post92315 (checkout Bruce's post #30)

    I think you need to open dts_int-14.bas, do a search within for RABC, you should see these entries...

    Code:
      #define RAC_INT      INTCON,RAIF,  INTCON,RAIE   ;-- RA Port Change      *
      #define RBC_INT      INTCON,RBIF,  INTCON,RBIE  ;-- RB Port Change
      #define RABC_INT     INTCON,RABIF, INTCON,RABIE  ;-- RAB Port Change

    ....see which one of those bolded registers a 16f690 actually has & then use the associated DTS Int. (eg search the data sheet for RAIF...nothing, RBIF...nothing, RABIE ...bingo ...so use the RABC_INT)

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