If you're using normal high voltage rogramming mode, MCLR is the programming voltage pin. =20 If it is held low, your programming voltage is shorted to ground, and the part will not program. Regards, Jim > -------- Original Message -------- > Subject: Re: [PIC] Problem programming ICD header > From: Dwayne Reid > Date: Mon, November 25, 2013 2:49 pm > To: "Microcontroller discussion list - Public." >=20 >=20 > I should have mentioned that I have tried doing a bulk-erase on the=20 > header (Debug -> Erase) and both the ICD-2 and the Real-ICE say "successf= ul". >=20 > I did discover something, though. I'm currently using the MCLR pin=20 > as a digital input. This pin is normally LOW and goes high only when=20 > a specific input signals one of the fault conditions. >=20 > Allowing MCLR to go high allows the header to be programmed. I'm not=20 > sure why that is - I know that earlier ICD headers had problems with=20 > MCLR and pin RA1 but I didn't see any warnings or limitations to that=20 > effect when selecting both the chip and the debugger. >=20 > However, I still can't get into debug mode. The build configuration=20 > is set for debug and, although I have configuration bits CP, WDT &=20 > PWRTE enabled in my code, MPLAB is nice to me and mentions that those=20 > bit settings are not compatible with the ICD header - and graciously=20 > sets those bits correctly when I go to program the header. I did=20 > check the configuration bits after MPLAB changed them and they do=20 > appear to be set correctly. >=20 > I'll keep plugging along. But please keep those tips and suggestions=20 > coming - it really does help. >=20 > Many thanks! >=20 > dwayne >=20 >=20 > At 12:27 PM 11/25/2013, Matt Bennett wrote: > >On Mon, November 25, 2013 11:55 am, Dwayne Reid wrote: > > > The error is that the first location is not programmed correctly > > > (desired value (something), read-back value is 00). > > > >When it reads back all zeros- that's usually a sign it isn't getting int= o > >programming/debug mode. #1 tip (see more below)- check the that VPP is > >getting through. Try a bulk erase on the part which would clear any > >inadvertent copy protect and restore the part to as fresh as possible. T= he > >bulk erase is a separate action in the ICSP world- as close to a complet= e > >wipe as you can get on a PIC. >=20 >=20 > --=20 > Dwayne Reid > Trinity Electronics Systems Ltd Edmonton, AB, CANADA > (780) 489-3199 voice (780) 487-6397 fax > www.trinity-electronics.com > Custom Electronics Design and Manufacturing >=20 > --=20 > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .