>Stack? Is there a stack in a 16F877A? Err, yes, all 8 words of one. Where do you think the machine stores the return address on interrupt or subroutine call? >Anyway, the code for the ISR is big, That is always a bad sign ... >and it is not the ISR, which is hanging. Sure about that? (see (1) below) >There is a small routine to have a LED blinking with >the ISR, and this LED is always blinking. > >Another LED was put inside the main, and that >one is stopping blinking. It sounds to me that one (or both) of two things is happening. 1. The ISR takes so long to execute that there is never enough time for the main to do an instruction before the next interrupt arrives. 2. The ISR has subroutine calls that have overflowed the stack and wiped out the return to main program address. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist