PIC18F67K40 DT_INTS that really work.


Results 1 to 12 of 12

Threaded View

  1. #8
    Join Date
    Jun 2017
    Posts
    27


    Did you find this post helpful? Yes | No

    Post Re: PIC18F67K40 DT_INTS that really work.

    Quote Originally Posted by Dave View Post
    Csantex, You need to set up one of your HIGH priority interrupts with a port bit that gets set during its routine and cleared at the end of it. Then set up another port bit (different) for the LOW priority interrupt and set it on entry and clear it on exit. Then take a scope and look at both bits during operation and see if the LOW priority is interrupted by the high priority interrupt, it should be.....
    Dave,

    Ok so I did the experiment but I used two identical timers with identical settings and I ran them both using the same format I've been using and also using the format described in you post and the pbp manual. Each timer had a pauseus delay of different values.
    The high prty timer had pauseus = 10 and the low had pauseus = 20. Using my format only delays the next interrupt from occurring so what I thought were low and high prty interrupts were actually not. Using the correct format as you posted allows the the high prty interrupt timer to extend the low prty timer time, as its being interrupted. Now when I set both pause to equal value and both are set to high prty, one goes right after the other as they are listed. Occasionally, two interrupts will occur before the other one happens. It didn't matter which one was listed first. It was basically a first come first serve type event and setting the bits high or low at the IPR didn't make a difference. Attached is a picture of the first come, first serve events on the scope.

    I think I will keep using the same format I've been using and apparently, they have all been high prty all this time. This would explain why it hasn't shown up as a problem before, it's always been a race to see who gets handled first and I work will really slow events that can wait to be handled when they cross that finish line. I can see the importance of having the difference in priorities when something needs to be handled exactly when it needs to be. I apparently don't need them just yet.

    This exercise very enlightening. Thanks for the insight.

    I am curious as to why you did ask me to show you an example.
    Attached Images Attached Images  
    Last edited by csantex; - 11th September 2018 at 02:43. Reason: Added picture

Similar Threads

  1. DT_INTS for K42
    By mpgmike in forum Code Examples
    Replies: 29
    Last Post: - 7th June 2022, 16:29
  2. PIC18F67K40 Timer issues
    By csantex in forum General
    Replies: 5
    Last Post: - 29th July 2018, 04:19
  3. Dt_ints-14
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th November 2013, 07:57
  4. Re: DT_Ints-18
    By Steve_88 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th March 2012, 18:39
  5. help getting started with DT_INTS-14
    By E Kizer in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd April 2009, 15:44

Members who have read this thread : 3

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