>I would also be interested if there is a way of using sleep with >MPLAB-ICE. Now I just have to disable the sleep while using emulator and >test those parts with JW-chips and a UART monitor. (Ye Olde way) There doesn't seem to be a good way. For now I've settled on #if BATTERY_OPERATION #define GoToSleep() { Sleep(); } #else #define GoToSleep() { SleepHere: goto SleepHere; } #endif This just forces the emulator into a non-exitable loop when it goes to sleep (say, after 20 seconds of inactivity), and all I have to do is hit Reset to re-start the program. -- ______________________________________ Andrew E. Kalman, Ph.D. aek@pumpkininc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu