Error when compiling with DT_INTS_3_4b"


Results 1 to 29 of 29

Threaded View

  1. #2
    Join Date
    Aug 2011
    Posts
    455


    Did you find this post helpful? Yes | No

    Default Re: Error when compiling with DT_INTS_3_4b"

    Dave,

    Seems that there were a few mistakes when the low priority interrupts were defined. Try this new version (3.4c) and see if it works out.
    It compiled ok using the test code below, but I didn't try actually running it
    Code:
    '18F27K40
    DEFINE OSC 64
    DEFINE USE_LOWPRIORITY 1
    
    INCLUDE "DT_INTS-18_3_4c.bas" ' Interrupt Control routines
    INCLUDE "ReEnterPBP-18.bas"      ' Interrupt Control routines
    INCLUDE "ReEnterPBP-18LP.bas"   ' Include if using Low Pr. PBP INTS
    
    GIEH    VAR INTCON.7        ' high priority interrupts
    GIEL    VAR INTCON.6        ' low priority interrupts
    
    asm
    ;----[High Priority Interrupts]-----------------------------------------------
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?
        ;LINEAR or ROTARY ENCODER INPUT - A (INCREMENT POSITION)
        INT_Handler INT0_INT, _INC_C, PBP, yes
        ;LINEAR or ROTARY ENCODER INPUT - B (DECREMENT POSITION)
        INT_Handler INT1_INT, _DEC_C, PBP, yes
     endm
        INT_CREATE ; Creates the High Priority interrupt processor
    
    ;----[Low Priority Interrupts]------------------------------------------------
    INT_LIST_L macro ; IntSource, Label, Type, ResetFlag?
        INT_Handler TX1_INT, _UARTTX1, PBP, no
        INT_Handler RX1_INT, _UARTRX1, PBP, no
        INT_Handler TX2_INT, _UARTTX2, PBP, no
        INT_Handler RX2_INT, _UARTRX2, PBP, no
        INT_Handler TMR1_INT, _TIMER1, PBP, yes
     endm
        INT_CREATE_L ; Creates the LOW Priority interrupt processor
    ENDASM
    
    goto OverIntHandlers
    
    INC_C:
    @ INT_RETURN
    
    DEC_C:
    @ INT_RETURN
    
    UARTTX1:
    @ INT_RETURN
    
    UARTRX1:
    @ INT_RETURN
    
    UARTTX2:
    @ INT_RETURN
    
    UARTRX2:
    @ INT_RETURN
    
    TIMER1:
    @ INT_RETURN
    
    OverIntHandlers:
    
    '----[ Interrupt control ]-------------------------------------------------------
    main:
    NOP
    GIEL = 1     ' Enable low priority interrupts
    GIEH = 1     ' Enable global interrupts
    Attached Files Attached Files

Similar Threads

  1. Replies: 0
    Last Post: - 14th November 2013, 03:32
  2. Error while compiling
    By BobK in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th April 2013, 17:01
  3. Replies: 1
    Last Post: - 30th March 2012, 04:13
  4. Compile error & syntax error on the word "loop:" as a label?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th March 2010, 04:14
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31

Members who have read this thread : 1

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