View previous topic :: View next topic |
Author |
Message |
kongfu1
Joined: 26 Apr 2010 Posts: 56
|
PICKIT3 with PICF882 does NOT working |
Posted: Thu Jul 14, 2011 11:35 am |
|
|
Hi,
PIC16F882
MPLAB: 8.66
PICKIT3:
Firmware Suite Version...... 01.26.52
Firmware type......................Midrange
CCS: 4.122
PICKIT3 always reports an error message when using resetting and running from the debug:
Running...
PK3Err0040: The target device is not ready for debugging.
Please check your configuration bit settings and program
the device before proceeding.
Configuration bits are set as:
Code: |
#fuses HS,NOWDT,NOPROTECT,NOBROWNOUT,NOLVP,NOPUT,NOWRT,NOCPD,DEBUG
|
And understanding B3 must be connected to low before using the debug function for this chip, even with B3 connects to GND, there is same problem.
Have same post with Microchip too.
Please help. Thanks. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19506
|
|
Posted: Thu Jul 14, 2011 2:38 pm |
|
|
#device ICD=TRUE
Enabling the fuse, just puts the chip into debug 'mode'. Enabling debug in the code, puts the extra code into the chip to support debugging.
Best Wishes |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Thu Jul 14, 2011 2:51 pm |
|
|
Another possibility:
In MPLAB open the list file for your project (*.lst).
Sroll down all the way to the end, here you see the fuses as will be sent to your target.
MPLAB sometimes overrules the DEBUG Fuse setting from your program. This happens for example when you have selected to use the PicKit as a Programmer (see MPLAB Programmer menu).
If the above is true for your situation, then fix it by going to the menu MPLAB Debugger/Select Tool, and here select your Pickit. |
|
|
|