Hello, I'm trying to use #INT_GLOBAL on CCS-PICC, but no sucess. My interrupt routine is working well with #INT_DEFAULT, but I want it to be faster. #INT_DEFAULT is using aprox 46 instructions for going in and out of the interrupt. I thought I could make it faster by usint #INT_GLOBAL and doing my own interrupt registers saving and restoring. Right now, my ISR looks like: // *************************** // INTERRUPT ROUTINE //**************************** #INT_GLOBAL void interrupt(void) { static byte w_save; static byte status_save; static byte pclath_save; // save registers MOVWF w_save SWAPF STATUS,W BCF STATUS,RP0 BCF STATUS,RP1 MOVWF status_save MOVF PCLATH,W MOVWF pclath_save CLRF PCLATH #endasm if (INTCON.T0IF) { INTCON.T0IF = 0; // Doing that thing you do... } #asm // restore registers BCF STATUS,RP0 BCF STATUS,RP1 MOVF pclath_save,W MOVWF PCLATH SWAPF status_save,W MOVWF STATUS SWAPF w_save,F SWAPF w_save,W #endasm } But the PIC (16F628) is hanging. Someone can help me? Pleeassseeee! Thank you, Brusque ----------------------------------- Edson Brusque Research and Development C.I.Tronics Lighting Designers Ltda (47) 323-2138 / (47) 9993-6453 Blumenau - SC - Brazil www.citronics.com.br ----------------------------------- -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads