>Hello antonio, by any chance do you have a lot of clrwdts around? clrwdt will reset the powerup and wakeup bits. also, are your ports initialized ok? somd pics clear the ports when the program counter resets to 0. try inserting a few lines that show the status bits 3 and 4 on leds at the very top of your program, and see if they are always 1 and 1. if the lights dont come on, your ports are on input. good luck, this is trickier than it looks. alice snip > but SLEEP(); still does not behave. I haven't checked if the compiler > version is buggy. Some more testing is called for... >