Fabio Pereira wrote: > > If your program don't use interrupts then add a RETFIE at offset > > 0x0004 to let the program countinue even when a unexepted > > interrupt occures. > > That's OK, but remember: the RETFIE itself is not a good interrupt > handler: you must clear the interrupt flag too, or the CPU will start > an endless loop. Best way is something like that: > > ORG 0x0004 > CLRF INTCON ; now you know that all flags and interrupt enable > ;bits are clear > RETFIE A better way is: ORG 0x0004 RETURN -Andrew === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads