problems with pickit 2, ICSP and MPLAB upload

Discussion in 'Embedded Systems and Microcontrollers' started by hunterage2000, Apr 7, 2014.

  1. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
    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.
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,550
    2,374
    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.
     
  3. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
    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.
     
  4. JohnInTX

    Moderator

    Jun 26, 2012
    2,347
    1,029
    +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.
     
  5. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
    Is there a way to upload the hex file with the programmer?
     
  6. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,550
    2,374
    Look for the Pickit2 icon on your desk top V2.61.
    Max.
     
  8. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
    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?
     
    • th.jpg
      th.jpg
      File size:
      15.7 KB
      Views:
      36
    Last edited: Apr 7, 2014
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,550
    2,374
    It loads automatically with MPLAB (free) from the Microchip site.
    Max.
     
  10. hunterage2000

    Thread Starter Active Member

    May 2, 2010
    400
    0
    I have MPLAB X IDE V2.05. How do you open it from within?
     
  11. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,550
    2,374
    Maybe go to the Microchip site and search Pickit2 programmer, it is a small standalone prg.
    Max.
     
Loading...