On Thu, May 22, 2008 at 4:41 AM, Electron wrote: > Anyhow, I solved it. How? I thought, since communication is lost after the > 0x42 write to OSCCONL, I thought I had to held the dsPIC reset at power > up (so that the damn instruction didn't execute), and then connect via ICD2. > Unfortunately, I have disabled MCLR, so I had to find other means to keep > the baby reset. If I didn't use an internal clock source, then I could just > shortcircuit the XTAL, but unfortunately I was using an internal clock source > (you see I'm lucky!). Using internal MCLR and internal RC oscillator will lead to problems for ICD2 since it can not control of the target power. I think it affect some other PICs as well (eg: 12F629/16F675/16F630/16F676 which requires Vpp early than Vdd for programming) but I am not so sure about dsPICs. PICkit 2 is better in this aspect. It can control the target power so it is able to deal with this issue. Xiaofan -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist