Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PICKIT2 AS DEBUGGER PK2Error0028 and ICD2

Status
Not open for further replies.

Jose Fausto

Member level 4
Joined
Jun 27, 2005
Messages
79
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,288
Location
Peru
Activity points
1,815
pk2error0028

Hi, I want to compare the PICKIT2 and ICD2, obviously, there is diferent in the support for the qty of microcontroller each one can support....

1.- May I can connect in computer more than one PICKIT2 or ICD2?

I conected two PICKIT2 at same time and my computer shutdown.....
I didnot test it with ICD2, because I just have one

2.- I tested one program with ICD2 and it works normally, in debugging.
but when I want to use PICKIT2 first time worked, but after some time, without changes I got a error like PK2Error0028.....

3.- Tested one program in debugger with ICD2 and PICKIT2 with PIC16F877,
and it works ok, later changed to PIC16F877A (new version of PIC), of course modifing the software, and it runs ok in ICD2, but is no the same in PICKIT2 and again got same error PK2Error0028.

I know Microchip is still fixing the problems for PICKIT2 as debugger, but I like to know your comments for problems or limits for PICKIT2.

JOSE
 

pk2error0028 pickit2

This error PK2Error0028, hapen , in this case, when the PICKIT2 canot enter in debug mode, after program the IC.

Jose
 

I came across the same error with pickit2.

can anybody help me?
 

The problem was quite sticky and almost drove me crazy.

Help still wanted.

---------- Post added at 08:19 ---------- Previous post was at 08:18 ----------

interesting, what is PK2Error0028?

PK2Error0028: Unable to enter debug mode
 

You didn't tell which is your target processor. PICkit 2 is generally performing fine, there are restrictions for some chips.

Did you check the common reasons for PK2Error0028 in the MPLAB online help? There are many possible soft- and hardware problems listed that may be caused by your design.
 
I'm using PIC16F877A and PIC18F4550.

Actually, I could debug with one of my projects with PIC18F4550 a couple of days ago. (I did come across problems indeed but at least some times it worked, but now it never gives me prompts I'm eager to see)

I've not been playing with hardware stuff for a long time. I'm not an experienced hardware engineer neither. Frankly speaking, my limited experience of playing with PIC stuff, including MPLAB IDE etc., makes me more or less disappointed. I used to blame Microsoft products for their flaws and unperfection, but now I feel quite satisfied with them comparing to the PIC stuffs.

Its being unstable, sometimes weired prompt of need of rebuild of a project which is absolutely actually up-to-date, and the like, PIC gives me a feeling, a little bit emotional rather than rational though, that the lives of hardware engineers are not so easy, let alone a fun.

Correct me if I'm wrong. Thanks.
 

I finally got into the debug mode after changing the fuse setting for the quartz and the main resetting circuit.

I'm using a 12M, I changed the Fosc1/0 setting from 01(XT) to 10(HS).

I have not yet done some isolation test to demonstrate whether the change of resetting circuit alone makes difference in this concern.

---------- Post added at 01:43 ---------- Previous post was at 01:35 ----------

For other guys kind information, here lists some tips for tackling this error:


1. If the target is a Baseline or Mid-Range device (PIC10F, PIC12F, PIC16F) it may require an ICD header to debug with. See Section 4.4.3 Using an ICD Header.
2. The device oscillator is not working. Check the Configuration bits and ensure the device has a working oscillator.
3. Make sure to select Debugger>Program in MPLAB IDE before trying to run or step your code.
4. If you have a PICkit 2 with a black colored push button, you may need pull-down resistors to debug reliably. See Section 4.3 Installing the Hardware and Software.
5. The target board is not powered or is not powered properly. Check the power supply.
6. The PICkit 2 VDD output pin has not been connected to the target board. Even if the target board has its own power supply, this pin must always be connected to the target VDD supply.
7. The PICkit 2 unit has become disconnected from the target board or has an inter-mittent connection on one or more pins. Check the PICkit 2 connections to the target board.
8. The incorrect Linker Script was used. The ì-i? ICD linker script must be used when debugging. (For example, 16F887i.lkr must be used instead of 16F887.lkr).
9. The target application is attempting to use resources reserved for the debug executive, causing the debug executive to become corrupted. For example, the target application is writing to a reserved File Register. See Section 4.4.2 Reserved Resources.
10. For PIC24 and dsPIC? DSC devices, the incorrect PGXn/EMUXn port is selected in the ìComm Channel Select? Configuration bits. Check that the port the PICkit 2 Debug Express is connected to is selected.
11. A configuration setting may be preventing the target from operating properly and executing code. The target will not enter Debug mode if it is unable to execute code.
12. The device is code-protected. Check Configuration bits for code protect settings.
13. An operation may be attempting in an invalid context. For example, PICkit 2 Debug Express cannot set a breakpoint if the target application is currently running.

According to my own experience, the following should be given special attention:
1. the correct circuiting of main reset, refer to page 150 of datasheet of PIC16F877A (R2 could be replaced with a diode with its (-) end connected to !MCLR);
2. the oscillator circuit and correct fuse setting (take PIC16F877A for example - for crystals of 4M or less, XT mode should be used, for 4M or above, HS should be used. Both ok for 4M.)
 

Re: pk2error0028 pickit2

This error PK2Error0028, hapen , in this case, when the PICKIT2 canot enter in debug mode, after program the IC.

Jose

Hi Jose,

I solved this problem by setting the Pickit 2 to use Target power when running in Debug mode. You can do this by going into
'debugger' - >'settings' in the MPLAB Ide. I am using these under Windows 7 on my Laptop.

Best wishes,
Suresh
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top