I had the same thing happen to me yesterday and it turned out that everything was OK, except for the configuration of the oscilator. The ICD2 does not use the configuration bits from your code, but rather the configuration set from the configuration menu. The settings in both places need to match. Now, I don't know if EVERYTHING needs to match, but I set everything to be the same just to be extra sure and it "majically" started working. -Mario > >>Target not in debug mode, unable to perform operation >>What is this? >>Yes, I read about it in the 'help', and it was typical Gates - >> intolerably >>flashy code bloat - and zero help. > > When you select debugger and program the chip, it downloads a monitor > along > with your program. The > error message means that either the debug bit isn't enabled, or that it's > unable to talk to that monitor > code. > > After awhile I formed a mental list of things to try when the ICD won't > play. I say "mental" because > mine is inexact. If I had it written down I would include it here. > Mostly > has to do with checking > that all the power supplies are turned on, and that the ICD cable hasn't > fallen out, etc. Then go > to the ICD "properties" and check the voltages it sees, and do the self > test. I know you said the > power was on, but cables can break. > > After all that, the second most likely problem is programming the PIC for > an oscillator you don't > have. No clock, PIC won't run, MPLAB can't talk to the monitor, see above > explanation. > >>To prove something, I loaded the Microchip hexadecimal >>file for the C source demonstration program that came >>with the PIC dem, and that all worked just fine. > > I vote for the oscillator setting in the config word. Open "Config bits" > and verify. > > Barry > > -- > 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