Andrew E. Kalman wrote: > I'm debugging an application (PIC16C77) on my MPLAB-ICE and I > don't understand how one is supposed to control the processor from > MPLAB once it goes to sleep. > > I can't Reset or Stop once the processor is sleeping, and nothing > short of shutting the whole system down solves the problem. The > MPLAB-ICE manual doesn't seem to have any info on this. > > Does anyone have some tips on how to debug this sort of thing / > use the ICE with oprograms that sleep? Andrew: Define a conditional-assembly variable: DEBUG SET 1 ;1 = Assemble for MPLAB_ICE, ;0 = Assemble for a real PIC. Then, in your code, replace the "SLEEP" instruction with: IF (DEBUG) GOTO $ ;If we're running on the ICE, ;just enter a tight loop here to ;simulate being asleep. ELSE SLEEP ;Otherwise, go to sleep. ENDIF -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - San Diego, California === http://www.geocities.com/SiliconValley/2499 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu