DT-INTs Interrupt handler question


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156

    Default DT-INTs Interrupt handler question

    I'm using DT-Ints and the interrupt is working ok. I am sending counter results from a rotary encoder to a debug port. That is working too, but I'm trying to put a bottom limit of $00 and a top limit of $48 on the counter, and exit the interrupt handler. Can someone tell me why this doesn't work? It blows right by the IF..THENs and sends bad values out the debug port? Are GOTOs not allowed?

    Code:
    R_ENCODER:
    IF DIR=1 THEN
        X=X+1
    ENDIF
    IF DIR=0 THEN 
        X=X-1
    ENDIF
    IF X<$00 THEN
        X=$00
        GOTO ENDINT
    ENDIF
    IF X>$48 THEN
        X=$48
        GOTO ENDINT
    ENDIF
    
    DEBUG $82   
    DEBUGIN [WAIT(ACK)]
    DEBUG $F5
    DEBUGIN [WAIT(ACK)]
    DEBUG X
    DEBUGIN [WAIT(ACK)]
    
    ENDINT:                                               
    @ INT_RETURN

  2. #2
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Red face

    Should have looked at this longer! Sorry.

    If X<0 isn't going to happen.

Similar Threads

  1. Interrupt question
    By ultiblade in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th November 2009, 21:12
  2. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 03:35
  3. Replies: 1
    Last Post: - 3rd November 2006, 00:24
  4. NEWBIE: Some basic questions using interrupts
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2006, 03:59
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 02:07

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