DT_INTS for K42


Closed Thread
Results 1 to 30 of 30

Thread: DT_INTS for K42

Hybrid View

  1. #1
    Join Date
    Mar 2020
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    Quote Originally Posted by tumbleweed View Post
    The DT_INTS-18_K42b.bas file from post #9 won't work.
    Thanks for the response. Do you know if the problem is with the DT_INTS-18_K2b file not being mapped properly to the PIC18F27K42 interrupt register, or is it that the PIC18F27K42 will not work with DT's Instant Interrupts? If it is a matter of correcting errors, I found the "How to make custom DT's Instant Interrupts" and can try an make the necessary edits.

  2. #2
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    It's more than just a simple interrupt register issue. The asm instructions are wrong for the K42.

    See posts #4 and #6.

  3. #3
    Join Date
    Mar 2020
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    Looks like crafting a working DT's Instant Interrupts for the PIC18F27K42 is well beyond my skill set. It may be time for me to learn to write ISRs using assembly language. In addition to the PBP3 reference manual discussion of Assembly Interrupts for PIC 18 Devices, can anyone suggest a good reference for someone who is not familiar with assembly language coding?

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


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    Although a bit dated, my first recommendation is "Applying PIC18 Microcontrollers", by Barry B. Brey; Copyright 2008 by Pearson Education. ISBN-13: 978-0-13-088546-3.

    Another recommendation is "PIC Microcontrollers; An Introduction to Microelectronics", by Martin Bates; Copyright 2011 by Martin Bates. ISBN: 978-0-08-096911-4.

  5. #5
    Join Date
    Mar 2020
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    Thanks for the suggested references.

  6. #6
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    Same problem in asm, so if you can figure out how an isr works you can do it in pbp as well

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


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    Conventional wisdom states that ISRs should do only minimalistic functions. Never call a subroutine from an interrupt handler. Never use PAUSE type statements. In short, turn something on or off, or set a flag you can poll and service in your main loop. With that said, most ISRs can be crafted in ASM with only basic BSF/BCF and perhaps MOVLW/MOVF type commands. Leave the heavy lifting for a subroutine you write in PBP.

  8. #8
    Join Date
    Mar 2020
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    Thanks for the additional comments. At this point, all I want is to understand how to write two ISR for a PIC18F27K42 in which upon an overflow interrupt from Timer3 or Timer1, the appropriate ISR increments a counter, clears the interrupt flag, and returns back to the executing PBP subroutine. The PBP routine uses one overflow count to compute a time period . The other overflow count is used to timeout the subroutine . The application is a tachometer that measures RPM from 0 to 12K. My code works with a PIC18F26K22 and DT_INTS-18. I have tried polling the interrupt flags within the PBP subroutine, but at low RPMs and clocking the PIC at 64MHz the results are erratic.

    Yes, I could just keep using an 18F26K22, but why not learn something new?

Similar Threads

  1. Microchip Inconsistency (K42 related)
    By mpgmike in forum General
    Replies: 0
    Last Post: - 23rd November 2017, 18:44
  2. Dt_ints-14
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th November 2013, 07:57
  3. Re: DT_Ints-18
    By Steve_88 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th March 2012, 18:39
  4. DT_INTs with 16F690
    By Dick Ivers in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th January 2010, 22:20
  5. Problem with DT_Ints-14
    By BobSpencerr in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 1st March 2007, 05:27

Members who have read this thread : 4

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