rumpelteazer666 wrote : > i checked the generated asm code, and looks like even > if it exits from > the second while, it doesn't go back to the start of the program So what *does* it do. The PIC must do *something*... Note that if the PIC just runs away, it will pretty soon (when the program counter rolls over to h'0000') start all over again, just as after a reset. If you realy want it to "hang", you have to have a endless loop. Jan-Erik. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist