I am not sure you have read the chapter 4.4 "Using PICKit 2 debug express" = on=20 "PICkit 2 user guide 51553E.pdf", which is available at the standalone PICk= it 2=20 program (a PC software not included in MPLAB), click "Help->PIckit 2 user's= =20 guide". There are also "reserved resources", if those MCU resource is used by your= =20 application, it will lead to errors or simply malfunction on debugging. Funny N. Au Group Electronics, http://www.AuElectronics.com http://www.AuElectronics.com/products http://augroups.blogspot.com/ ________________________________ From: James Newton To: Microcontroller discussion list - Public. Sent: Fri, November 19, 2010 11:36:17 PM Subject: RE: [PIC] pickit2 unreliable debug 12F675 Thanks much Dwayne, and everyone else who has replied to this. I verified the limitations, and found that the MCLR function must be disabled from the external pin for the debugger to work at all.=20 I don't have the ICD2 help file installed (since I don't have an ICD 2) and the PICKit 2 help file doesn't list a Limitations topic group.=20 I probably wasn't being clear... even with NO external circuitry attached, just the PICKit2, the RJ11 adapter, and the 12F675 debugging header (all stop) I still can't step the chip. I can program it, I can run it (and verify that it is running "Hello World" with a meter on GPIO2 pin), and it will try to debug, but either run away ignoring the break point, or repeatedly step without being commanded to do so (which locks MPLAB up). I've tried bypass caps on the power pins, pulling MCLR high with a resistor= , and a million other things. I have the later PICKit 2 with the red button, so it doesn't need the pull ups on the data pins, but I tried that anyway, etc... It just doesn't work.=20 I considered buying a PICKit 3 out of pocket just to see if it would work, but I think, based on your experience and the comments of others, that I will wait and try to save my pennies for an ICD2 or ICD3. Why is the 2 more expensive than the 3? Anyway, I was able to get the immediate job done without the debug function= .. It was fun playing hi-low with a single PIC pin to find the mid point of th= e A2D reading on the POT... long story. Thanks again. -- James Newton 1-970-462-7764=20 -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Dwayne Reid Sent: Wednesday, November 17, 2010 09:41 To: Microcontroller discussion list - Public. Subject: RE: [PIC] pickit2 unreliable debug 12F675 At 08:26 PM 11/16/2010, James Newton wrote: >I would really love to see someone from Microchip demonstrate debugging of a >12F675 with the PICKit2... In front of a lawyer ready to file a class action >lawsuit for advertizing something that obviously doesn't work. Hi there, James. I've stayed out of this thread because I haven't used the PK2 for=20 debug. However, I HAVE used the ICD2 to successfully debug many=20 projects and the PK2 should be almost identical. You need to pay particular attention to the limitations for debugging=20 the 12f675 that are shown when you bring up the help feature in=20 MPLAB. There are a couple of things that will bite you because they=20 are non-obvious. Even the obvious limitations keep getting me=20 because I forget them between projects. You can read about the limitations by clicking Help -> Topics ->=20 Debuggers -> MPLAB ICD2 and clicking OK. Expand the Limitations=20 topic group and select "8-Bit Device Limitations - PIC10F/12F/16F",=20 then selecting "PIC12F629/675 Limitations". However, here are the=20 three most important ones: 1) Can't use the internal watchdog. Turn it off in the chip's configuration. 2) GPIO3 is normally switchable between !MCLR or an input. If you=20 are using the debug header, it MUST be configured as !MCLR and must=20 be HI in order for the chip to work. 3) GPIO1 must be LOW when in order to send the program into the=20 chip's flash memory. This one gets me often. The above are the main items to look out for. Good luck! dwayne --=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 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist =20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .