>OK. I see. I've never use any ICDx, so I've no idea what happens to >the timers and other "free-running" stuff when it hits a breakpoint. >I think I have seen something about problems to "debug" I2C and >similiar when using breakpoints and the ICDx, but I'm not sure. >Or was it interrupts ? Never mind... Strange things do happen to the hardware peripherals when you stop the code with an ICD. Interface things like I2C and UARTS send/receive corrupted values, and timers keep running while the ICD code runs, resulting in weird values in the timer if you are trying to set up specific intervals. Also if you are single stepping, an interrupt will not fire off - you have to set a breakpoint and let the program free run to allow the interrupt to happen. To do reasonable debugging with an ICD, I found it good practice to set up some labels specifically for setting breakpoints on the ICD, at points where I knew that I/O things had properly completed, and one at a suitable point inside the interrupt routine so I could see what was happening here. When debugging inside the interrupt you can single step OK, and return to the mainline code alright, but another interrupt will not fire off until you let the processor free run again. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist