problems with pickit 2, ICSP and MPLAB upload

Thread Starter

hunterage2000

Joined May 2, 2010
487
I am new to the microchip pickit 2 and I used a simple turn on a port pin tutorial to test the ICSP upload option. The code showed no errors but when I try to "make and program device" I get the following error message:

"Cannot program a production build to a debug header."

which I'm not sure what it means. I have checked the wiring from the pickit programming header (VPP, VDD, VSS, PGD, and PGC)
to the pic16f616 pins on a breadboard.

Also I tried to "debug main project" which showed:

"Could not connect to tool hardware: PICkit2PlatformTool, com.microchip.mplab.mdbcore.pickit2.PICkit2DbgToolManager
The debugger could not be started. Terminating debug session."

Can anyone help me out? I have attached the layout.
 

Attachments

MaxHeadRoom

Joined Jul 18, 2013
28,619
Did you set the Pickit2 to program or debug?
If the project is not powered, you will also need to set 'Power on from Pickit2'.
Max.
 

Thread Starter

hunterage2000

Joined May 2, 2010
487
I used the program icon but got "Cannot program a production build to a debug header.".
I assume the power comes from the USB port as the multimeter read 4.83V between VDD and VSS.
 

JohnInTX

Joined Jun 26, 2012
4,787
Did you set the Pickit2 to program or debug?
If the project is not powered, you will also need to set 'Power on from Pickit2'.
Max.
+1 You'll have to deselect Pickit2 as a debugger, select it as the programmer and rebuild for Release.

To use the PK2 as a debugger you'll need to buy an AC162083 header. Headers are required on most of small PICs as the production parts do not include the on-board debugging resources that the bigger ones do.
 

Thread Starter

hunterage2000

Joined May 2, 2010
487
I didn't get software with it. It came with a lab dev board (see attached) which I haven't got round to using. Where can I get it from?
 

Attachments

Last edited:
Top