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)




Bookmarks