DT Ints not working on 16F18426


Closed Thread
Results 1 to 30 of 30

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: DT Ints not working on 16F18426

    Tottaly agree with that.

    I got in a rabbit hole trying to make a keyboard matrix work in an ISR along with debounce etc. Just a waste of time...

    A tight loop is just fine. And as tumbleweed noted, use Interrupt just to note MCU that a key was pressed, maybe wake it up from sleep. Then a loop will do the rest.

    Even if other interrupts are needed when keyborad is serviced, ISR will do that just fine.

    Ioannis

  2. #2
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: DT Ints not working on 16F18426

    Darrel Taylor's Instant Interrupts (DT_INTs) changed things for the PBP world. PBP Interrupts are Polled, not actually using the built-in Interrupt hardware. Using ASM somewhat defeated the reason to buy PBP in the first place. Earlier PICs stayed with standardized naming conventions, Bank selection, and Bank location of SFRs. Newer PICs gave new names to familiar peripherals; like changing TMR2 to T2TMR for example. The newer PICxxQyy PICs even changed the default Bank from BANK0 to BANK4. No wonder DT_INTs no longer worked.

    A small group of us dove into the ASM behind the scenes for the DT_INTs and uncovered the working mechanisms. By changing naming, BANK locations of SFRs, and a few other things, we were able to get the incredible DT_INTs working on newer offerings. The good news is that a collaborative effort spells out what these changes entail, and how you can do it too. This body of work is available in The Book of DT's Interrupts.

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default Re: DT Ints not working on 16F18426

    It is not very easy or straightforward to make a new or modify the existing file and cover a new chip.

    At least for me. Just did a mess and gave up. I really do not follow what the DT-INTS does, so it is difficult to succesfully make a new chip addition. Wish there were step by step instructions for this.

    Ioannis

  4. #4
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: DT Ints not working on 16F18426

    Did you look at the DT Book of Interrupts linked 2 posts ago? In fact, the main page lists you as one of the contributors. The part I contributed focused on what to change to add new chips. Take a look (or a refresher).

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default Re: DT Ints not working on 16F18426

    I guess you mean this article:

    https://dt.picbasic.co.uk/INT16/Customisation

    I am pretty sure that did something stupid and the modified interrupt did not work as expected. Ended to make a poll of the interrupt bit and finished my project.

    OK, will give it a try again. With a bottle of coffee this time!

    Ioannis

    P.S. The 18 series requires modifications in 2 places. Why is that? Because of the priorities?

  6. #6
    Join Date
    Aug 2011
    Posts
    460


    Did you find this post helpful? Yes | No

    Default Re: DT Ints not working on 16F18426

    The 18 series requires modifications in 2 places. Why is that? Because of the priorities?
    The first one creates a '#define' used by the INT_LIST, INT_ENABLE and other macros that specifies the PIR reg and bit
    Code:
      #define INT1_INT  INTCON3,INT1IF  ;-- INT1 External
    The second one adds all the details (PIR intr reg/bit, PIE enable reg/bit, and IPR priority reg/bit)
    Code:
      ifdef INT1IF
          INT_Source  INTCON3,INT1IF, INTCON3,INT1IE, INTCON3,INT1IP
      endif
    If you're lucky, that's all that's required. However, some of the newer devices like the 18FxxK42 and 18FxxQ43 required some serious modifications to the asm code to make DT_INTS compatible with the register layout and new instructions like MOVFFL, so the 'customization guide' isn't much help with them.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default Re: DT Ints not working on 16F18426

    Well, these are the chips I want to have DT_INTS work with...! Among a few others.

    Ioannis
    Last edited by Ioannis; - 20th September 2023 at 14:14.

Similar Threads

  1. WRITE and DT-INTS
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 21st February 2016, 20:26
  2. DT-INTS and SSP1_INT
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 26th April 2015, 02:34
  3. DT-ints-18, How to ...
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 7th January 2014, 21:41
  4. DT INTs which int to use??
    By Heckler in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th March 2012, 01:23
  5. DT-ints-18 - new version
    By dip1 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 10th October 2007, 21:09

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