DT_INTS for K42


Closed Thread
Results 1 to 30 of 30

Thread: DT_INTS for K42

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    Cannot disagree with you Richard... But either I am too old or C is too twisted that I have hard time doing useful things with it... Sadly.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    I agree with Richard in that I also have learned to work with C in MPLABX, but I was able to use PBP command structures to use newer functions that don't have PBP commands. I didn't need to resort to ASM.

    As for clearing an Interrupt Flag and incrementing a variable, it would look something like this in ASM:
    Code:
    BANKSEL PIR1  ;or whatever holds the TIMERx IF
    BCF PIR1,1  ;or whatever bit holds the TIMERxIF.  Note use of a comma versus period
    BANKSEL RPM  ;or whatever your variable is called
    INCF RPM  ;increment your variable by 1
    RETFIE
    The above does not take into account Context Saving, nor does it take into account your RPM variable is probably at least 16 bits. However, the skeletal structure is about all you need for an ASM Interrupt Service Handler.

  3. #3
    Join Date
    Mar 2020
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: DT_INTS for K42

    Thanks for the framework for implementing an ISR in PBP.

    I concur with the comments regarding moving to C and using Microchip's IDE. I have started down that path on numerous occasions, but overcoming the inertia of being able to use PBP to easily do what I wanted was too great of a barrier for me. While it can be laborious to use PBP to implement some of the newer PIC peripherals, it can be done. For me, PBP's problem is that the language does not effectively deal with interrupts. As a friend of mine says "You do not fix a problem. You eliminate it." Given that it appears that PBP has reached its maturity, it is time for me to eliminate my problem an learn C. Painful.

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 : 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