Debugger problem with PIC16F877A

Discussion in 'Embedded Systems and Microcontrollers' started by garen, Sep 15, 2009.

  1. garen

    Thread Starter New Member

    Sep 15, 2009
    Dear All,

    We are using Microchip PIC16F877A (40 pins) for school robotics project and got a problem with debugger.
    The code is working successfully with the simulator. We checked it with
    'watch' tool.When we are trying to program the PIC, we receive message that
    the build is successfull.
    Programming is done on the PCB via connector (not on the MPLAB ICD2’s own
    ...Reading ICD Product ID

    Running ICD Self Test


    Then in debugger mode we get the message:
    'ICDWarn0015: Program memory has changed since last program operation? Continue with Debug operation?
    Running Target
    ICD0083: Debug: Unable to enter debug mode. Please double click this message for more information.

    ICD0069: Debug: Unable to run target'

    If somebody can help us with this problem we will greatly appreciate.
    Thanks a lot.

  2. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    The first half of the output above just appears to be the ICD connection sequence, not any actual programming.

    After each Build, you need to seperately run the Program command (there is a button in the ICD toolbar).
  3. theBuddha

    New Member

    Sep 5, 2009
    What do you mean by 'not on MPLAB's own socket'?

    Well, I had a similar problem a couple of weeks back - I could program my microcontroller using MPLAB IDE in Programmer's mode but wasn't able to get into debug mode). If you are using MPLAB with ICD2, get into debug mode(Debugger -> Select Tool -> MPLAB ICD2) and then program your microcontroller in this mode(Debugger -> Program). This eventually leads you to debug mode too. This worked for me after struggling for about two days on how to get this going.
  4. garen

    Thread Starter New Member

    Sep 15, 2009
    Thank you very much for your prompt reply. We had also HW problems. After making more relible connections for clock and putting some caps between power and ground it started to work properly.