Hey, The debug mode programmed chip tends to have slightly different configuration registers (at least in the dsPIC) that prevents the PIC from starting up by itself. This is automatically changed to the normal one when you switch to programmer mode. ------------------------------------------------------------------------ Daniel Chia "Genius is one percent inspiration and ninety-nine percent perspiration." - Thomas Edison E-mail: danielcjh@yahoo.com.sg MSN: danstryder01@yahoo.com.sg ICQ: 37878331 ------------------------------------------------------------------------ > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of > Robert Rolf > Sent: 25 December 2004 17:45 > To: Microcontroller discussion list - Public. > Subject: Re: [PIC]: ICD Support DOH! factor.. > > > > Gerhard Fiedler wrote: > > Robert Rolf wrote: > > > > > >>>>The ICD2 loads firmware dedicated to each chip type and specific to > >>>>programming or debugging. Nice way to fatigue the on board flash if > >>>>you change modes or devices a lot. > >>> > >>>Did you calculate how often / how long you have to switch before the > >>>flash runs out of juice? > >> > >>16F877 spec D130 (Program Flash Endurance) is minimum 1000 cycles @ 25C > >>and 5V. Given that MPLAB does NOT simulate serial/SPI interrupts it's > >>code/program/debug about 30 times a day (some days are rather long). > >>I'll need a new ICD2 in about a month and half. > > > > > > Can you explain that a bit, please? I see every now and then -- when > > switching between very different device families like 18F and 16F parts -- > > that MPLAB downloads a different "operating system" to the ICD2. I don't > > see that when switching between programmer and debugger modes. Since you > > can program the chips while in debugger mode, I also don't see a need to > > even switch to programmer mode during the debugging cycle. > > > > So for me, it looks like the ICD2 chip got reflashed only when switching > > between majorly different devices. I doesn't even seem to get reflashed > > when switching between e.g. 18F6680 and 18F458, and it doesn't seem to get > > reflashed when switching between programmer and debugger modes. > > > > Which brings my reflash-count way down, and 1000 reflashes probably lasts > > me longer than the devices the ICD2 supports will be on the market. > > > > Or am I missing something? > > Yes. The checkbox that says "Automatically download firmware if needed". > If it's checked you only see the download happen in the "output" screen. > > I guess I just assumed that the debugger mode had no > programming capability because of the following message that > pops up when you select ICD2 as debugger. > > " > MPLAB IDE No longer allows MPLAB ICD 2 to be loaded as a > programmer and a debugger simultaneously. > Do you wish to unload MPLAB ICD 2 as programmer before > loading as a debugger, or do you wish to cancel? > " > > I never even noticed that is actually HAS a 'program' > option under debug. DOH! (too used to the hotkeys). > > If 'debug' mode can both debug AND program, why does > it produce the misleading warning message?? Maybe other > families (I use 16F*) need two versions of firmware code > to be loaded into the ICD2? > > Thanks for saving my flash lifetime since I can > now program & debug with one firmware load. > > Robert > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist