Wouter van Ooijen wrote: >> The data sheet says that interrupt flag bits must be cleared in software >> to avoid recursive interrupts. > > are you sure? can you give URL and page? Not exactly recursive interrupts, but successive ones. Many if not most interrupt flags must be cleared in software. No URL and page, but some bit names: EEIF, INT0IF, RBIF, TMR0IF, TMR3IF, ... What happens when you forget to do that (and don't for some reason clear the enable bit) is that your program gets stuck in an infinite loop through the interrupt handler -- and that's the same no matter the language used :) (except possibly for some Basic interpreter that takes care of this behind the scenes). Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist