Program works!, however dont understand some DT-INT stuff.


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Program works!, however dont understand some DT-INT stuff.

    Sorry changed the top 2 lines to

    Code:
    INCLUDE "DT_INTS-18.bas"     ; Base Interrupt System
    INCLUDE "ReEnterPBP-18.bas"     ; Include if using PBP interrupts
    
    'I also changed INT_INT to INT0_INT


    throws error

    Error 101 INT_ENABLE Priority state not found

    does this no matter the INT0 change
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Program works!, however dont understand some DT-INT stuff.

    Hi Chris,
    First, regarding the timer. You are correct on all accounts. Changing from $31 to $30 does strip of setting the least significant bit which results in the timer being left in its off state. You can set the bit indivudually if you want.

    Second, in your latest code snippet you're declaring an interrupt for TMR1 (TMR1_INT) but you're then trying to enable the interrupt for TMR0 - which at that point doesn't have an interrupt service routine assigned to it.
    Code:
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler    INT_INT,  _ToggleLED1,   PBP,  yes
    		INT_Handler   TMR1_INT,  _ToggleLED2,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    ENDASM
                 
    @    INT_ENABLE   INT_INT     ; enable external (INT) interrupts  
    @    INT_ENABLE  TMR0_INT     ; enable Timer 0 interrupts   <- Here you're enabling TMR0_INT which isn't properly declared.
    /Henrik.

Similar Threads

  1. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  2. Some pins dont work
    By The Master in forum General
    Replies: 9
    Last Post: - 2nd December 2007, 21:00
  3. I don't understand this program
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 15th June 2006, 23:03
  4. Need Help To Understand This Program
    By Danish in forum mel PIC BASIC
    Replies: 2
    Last Post: - 9th August 2005, 22:07

Members who have read this thread : 0

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