DT interrupt problem / K40 - "Priority State Not Found"


+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Location
    Huntsville, AL
    Posts
    48

    Default DT interrupt problem / K40 - "Priority State Not Found"

    I'm trying to switch from an 18F25K20 to an 18F26K40, and I'm getting a compiler error (PBPX 3.1.6.4) specific to the timer interrupt definition. I'm using the interrupt include file "DT_INTS-18_3_4c.bas" as defined in this thread:

    https://www.picbasic.co.uk/forum/sho...T_INTS-18_3_4c

    I've tried defining the priority via the INTCON and IPR0 registers directly, modifying the original "DT_INTS-18.bas" directly based on mpgmike's writeup to customize the interrupts, and changing to a timer1 interrupt (vs timer0), but no dice. I imagine I'm overlooking something simple cause I can often be an idiot. Any help is greatly appreciated! The code for the interrupt definition code is below:

    Code:
    @bsf IPR0, TMR0IP 'set timer0 overflow to high priority
    IPR0.5=1
    INTCON.7=1
    INTCON.6=1
    INTCON.5=1
    
    '----[Start High Priority Motor and PPM Read Interrupt]-------------------------
    ASM
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?
    INT_Handler TMR0_INT, _MOTOR_CONTROL, ASM, yes
    endm
    INT_CREATE ; Creates the interrupts 
    ENDASM
    '----[End High Priority Motor and PPM Read Interrupt]---------------------------

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,722


    Did you find this post helpful? Yes | No

    Default Re: DT interrupt problem / K40 - "Priority State Not Found"

    @bsf IPR0, TMR0IP 'set timer0 overflow to high priority
    since ipr0 is not in access bank memory , that will not do what you think and may cause all sorts of buggy behavior

    also tmr0 interrupt is high priority at por so its an unnecessary step
    as is
    IPR0.5=1


    the problem lies in the code not posted
    Warning I'm not a teacher

Similar Threads

  1. Replies: 0
    Last Post: - 18th September 2012, 14:34
  2. " found code "
    By Archangel in forum General
    Replies: 2
    Last Post: - 17th June 2009, 18:42
  3. Microcode studio "device not found"
    By AndrewC in forum General
    Replies: 4
    Last Post: - 7th September 2007, 20:46
  4. Problem with "on Interrupt" and PIC18F4620
    By philtep in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st September 2005, 02:24
  5. Best way to determin "pin" state with +13.8 V
    By JDM160 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th March 2005, 04:54

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