> DISPLAY > movwf _w ; Save > swapf status,w ; Save > movwf _status ; Save > bcf intcon,2 ; Clear interrupt bit As J-E said, better to use the assigned name for a bit So, bcf intcon,t0if J-E suggested moving it to just before the RETFIE. What's important is that it is cleared somewhere in the ISR and that IRQs do not come faster than the ISR can process them And for those status tests, there are more readable ways to do it For btfss status,2 you can use the MPLAB pseudo-op "skpz" or define your own. eg #define zero status,2, and use btfss zero. Similarly with skpnz, skpc, skpnc etc > goto $+3 ; No, leave and do it again later. Ditto J-E, goto a label. Makes reading program flow a lot clearer. I am guilty of using goto $-1 (or goto $-2) for a bit-wait-test loop > ****Table located in main code****** You HAVE to be sure where that table winds up in memory or you could have a PCLATH problem, if for example the table crosses a page boundary. That doesn't sound like your problem at this time because the program doesn't *appear* to be crashing. On the face of it it should work. You should ensure that the section of code is in the bank you want - maybe you're addressing trisb instead of portb ? ========================== Example 3 There is no branch in this test to get to the next. Whatever the result, PC goes to LOOPDEC > movfw LOOP ; LOOP to w > sublw d'3' ; 3 - LOOP in w > btfss status,2 ; LOOP = 3? > goto LOOPDEC ; No, leave. > bcf portb,2 ; Yes, turn on 100 digit > goto LOOPDEC ; Yes, leave. > movfw LOOP ; LOOP to w > sublw d'2' ; 2 - LOOP in w > btfss status,2 ; LOOP = 2? > goto LOOPDEC ; No, leave. > bcf portb,1 ; Yes, turn on 10 digit > goto LOOPDEC ; Yes, leave. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist