>I am having a problem using the ICD2 as a programmer and debugger. I >am using a PIC16F87, running on a PICDem 4 board. This problem only >occurs with one project. After the program has been run, the power >needs to be unplugged for a second before the PIC will program again. >If I don't unplug it, it says that when verifying the code, 0 was read >instead of the expected value. When using the ICD2 as a debugger, if >the power isn't unplugged before programming, it says the target >device ID is 0. I am using the ICD2 with USB, and supplying power to >the target board, not through the ICD2. I have a feeling this is a problem with certain devices, especially when the MCLR line is configured as an input. The problem arises because to go into programming mode the PIC needs to have MCLR at Vpp before Vcc is applied. Check the data sheet for your chip - or more especially the programming spec. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist