A little DT_INT confusion.


Results 1 to 7 of 7

Threaded View

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


    Did you find this post helpful? Yes | No

    Angry

    It's a PIC18F2520.

    I was going to run the risk of talking to myself, and add another short bit - I finally got smart, and put something in the main loop, so I could see if the uart interrupt handler ever returned from it's job, and found that it isn't!!

    Everything just appears to stop after a uart interrupt. It does what it's suppose to, (reads from one port, and writes to the other) and never returns to the main loop.

    I'm at a loss, and hoping that would be of some help.

    Code:
    'INITIALIZE INTERRUPTS
    ASM
    INT_LIST  MACRO       ;IntSource,Label,Type,ResetFlag?
            INT_Handler INT2_INT, _EXTTS,PBP,yes
            INT_Handler RX_INT, _RDRINT,PBP,yes                     
        ENDM
        INT_CREATE                               ;CREATES THE INTERRUPT PROCESSOR 
    ENDASM
    
    START:
    GOSUB CLS
    PAUSE 100
    SEROUT2 DIAGOUT,MODE,["SDIF2 VER. 1",10,13]
     
    'ENABLE INTERRUPTS
    @ INT_ENABLE RX_INT                          ;READER UART INTERRUPT
    @ INT_ENABLE INT2_INT                        ;EXTERNAL INTERRUPT
    
    '======================
    MAIN:
    '======================
    SEROUT2 DIAGOUT,MODE,["."]
    FOR X=1 TO 100
         PAUSE 1
    NEXT X
    GOTO MAIN
    
    '======================
    RDRINT:                                      'TAG READER INTERRUPT! 
    '======================                     
    HSERIN [WAIT($02),STR TAG\8\$03]             'READ TAG FROM THIS PORT      (WORKS)         
    SEROUT2 DIAGOUT,MODE,[STR TAG,10,13]         'SEND TAG DATA TO THIS PORT   (WORKS)                                                              
    @ INT_RETURN                                 ; <=== THIS IS NOT RETURNING! (DOES NOT WORK)
    
    ''======================
    EXTTS:
    ''======================
    'SEND SPECIAL DATA NOW 
    SEROUT2 DIAGOUT,MODE,["00995031",10,13]      '(WORKS)
    @ INT_RETURN                                 ;(WORKS)
    Last edited by circuitpro; - 20th October 2010 at 00:32.

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