Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Target Vdd not detected for ICD and PICkit2

Status
Not open for further replies.

tiwari.sachin

New Member
Hello

I am trying to debug my code written on 16F877. I am getting the following while i try to connect ICD2 or PICKIT2

Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready


Because the target power is not detected, my program is not entering debug mode. I have chaecked VCC, it is 5.1V

I am trying all possible things to make this thing work but all in vain.

When i use the debugger in program mode. Everything seems to work fine, although its not detecting tha target VDD, its programming the controller.

kindly suggest me remedies. I need run it in debug mode. How can i make sure that the target VDD is detected.

As i have mentioned, i have measured target VDD and it is 5.1 but why isnt the debugger detecting it.

The connection and the circuit is right too, as i have used the same board many times before and it worked fine but i am getting this same error from last few days.

Help would be greatlt appreciated.

Regards

Sachin Tiwari
 

Wp100

Well-Known Member
Hi,

Have actually got a 877A on the bench with Pk2 debugger - just tried using the debugger, first with the power from the circuit board on and then from the circuit board off and it runs fine

Initializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready


nitializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
Target power detected ( 4.98V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready


Although you say you have things connected correctly, it does sound like the pic chips Vdd and /or Vss are not connected directly to Pin 2 and pin 3 of the icsp socket / Pickit2

Other things to watch out for is having the Pickit2 Programmer in MPlab enabled or the Pickit2 Programmer Program running at the same time - this will cause errors with Debugger.

I find that if you get a power error on debugger, even when you have corrected the error, the debugger will not sense it has been corrected.
By turning off the debugger - to None, building your Poject again, then re-enabling debugger , Pk2, it will run ok.

Don't forget that the Pickit2 can only supply about 25ma to the target circuit.
 
Last edited:

tiwari.sachin

New Member
WP100

Thanks for your reply. I have cross checked the voltage at the inputs of PICKIT 2, pin 2 and 3 do get 5.1V and as i have told you before, i am powering my board from the external power suppy. The supply also seems to be fine.

I am getting 5.1 V at Vdd of microcontroller.

5.1 at PICKIT2 pin.

I am very much confused with this thing. Its quite strange. The same board with the same connections was working perfectly some 5 days back. Now, i am just not able to understand the reason for a problem like this.

I have infact built a new power supply, i have changed the controller and tried, nothing seems to rectify this problem.

There might be some minor mistake that i am probably not able to fine.

Its so annoying. The code is almost done. I need to rectify few bugs and i am stuck with the debugger since 4 days. :(

Hi,

Have actually got a 877A on the bench with Pk2 debugger - just tried using the debugger, first with the power from the circuit board on and then from the circuit board off and it runs fine

Initializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready


nitializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
Target power detected ( 4.98V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready


Although you say you have things connected correctly, it does sound like the pic chips Vdd and /or Vss are not connected directly to Pin 2 and pin 3 of the icsp socket / Pickit2

Other things to watch out for is having the Pickit2 Programmer in MPlab enabled or the Pickit2 Programmer Program running at the same time - this will cause errors with Debugger.

I find that if you get a power error on debugger, even when you have corrected the error, the debugger will not sense it has been corrected.
By turning off the debugger - to None, building your Poject again, then re-enabling debugger , Pk2, it will run ok.

Don't forget that the Pickit2 can only supply about 25ma to the target circuit.
 

Wp100

Well-Known Member
Hi,

I know the feeling - but still bet it is something you have done to the circuitry or Mplab parameters.

You do not say if you can just program the chip in circuit - does that work both with and without in circuit power ?

Think the best thing to do, is take the pic chip and put it in a socket and wire that to the Pk2 connector keeping the wires as short as possible. ( do not use a bread board )

Will it program the chip that way ok with the Pk2 providing the power, if ok then try debugger - it will start running with only the pic in cicuit.

If that works ok then it seems likely your main circuit board has the fault.
 

tiwari.sachin

New Member
first thing tomorrow morning. Will rig up the circuit for the chip separately on general purpose board and try. lets see if it works.

If the problem is in the board, then i am in a big problem. I need to finish this part soon and if the problem is hardware. it gonna take hell lot of time again.




Hi,

I know the feeling - but still bet it is something you have done to the circuitry or Mplab parameters.

You do not say if you can just program the chip in circuit - does that work both with and without in circuit power ?

Think the best thing to do, is take the pic chip and put it in a socket and wire that to the Pk2 connector keeping the wires as short as possible. ( do not use a bread board )

Will it program the chip that way ok with the Pk2 providing the power, if ok then try debugger - it will start running with only the pic in cicuit.

If that works ok then it seems likely your main circuit board has the fault.
 

tiwari.sachin

New Member
By the way, i think i have mentioned it before. I am able to program the controller in circuit. but the board is powered by ICD or PICKIT2 whichever i use.

The problem is when i try it with the debugger.



first thing tomorrow morning. Will rig up the circuit for the chip separately on general purpose board and try. lets see if it works.

If the problem is in the board, then i am in a big problem. I need to finish this part soon and if the problem is hardware. it gonna take hell lot of time again.
 

Pommie

Well-Known Member
Most Helpful Member
The Pickit2 and/or ICD2 do not need external power to debug and so I think you may have damaged it. It does however need the ground connected. Have you checked that there isn't a break in the ground line?

You could also try disconnecting the power from the board to the pickit2 and let MPLAB believe it is powering the board even though it isn't. You should then be able to debug your project. If you can't I would suspect the debugger. What error message is it coming up with?

If you are still having problems can you post the complete output from the assembler/compiler.

Mike.
 

tiwari.sachin

New Member
This is what i get when i use pickit2 as a debugger and try to program it

Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready

Programming Target (11/3/2009 5:13:31 AM)
PIC16F877A found (Rev 0x8)
Erasing Target
Programming Program Memory (0x0 - 0x77)
Programming Program Memory (0x118 - 0x7FF)
Verifying Program Memory (0x0 - 0x77)
Verifying Program Memory (0x118 - 0x7FF)
Programming Debug Executive (0x-1F00 - 0x1FFF)
Verifying Debug Executive (0x1F00 - 0x1FFF)
Programming Debug Vector
Verifying Debug Vector
Programming Configuration Memory
Verifying Configuration Memory
PK2Error0028: Unable to enter debug mode
PICkit 2 Ready


when i use it as a programmer, it programs the controller perfectly

Initializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC16F877A found (Rev 0x8)
PICkit 2 Ready

Programming Target (11/3/2009 5:13:55 AM)
PIC16F877A found (Rev 0x8)
Erasing Target
Programming Program Memory (0x0 - 0x77)
Programming Program Memory (0x118 - 0x7FF)
Verifying Program Memory (0x0 - 0x77)
Verifying Program Memory (0x118 - 0x7FF)
Programming Configuration Memory
Verifying Configuration Memory
PICkit 2 Ready



PICKIT2 as a programmer works fine but when i try it as a debugger, its giving me error.

I have attached the settings for PICKIT2 as well.

kindly check and suggest some possible solution and the ground pins are properly connected. i just checked it.









The Pickit2 and/or ICD2 do not need external power to debug and so I think you may have damaged it. It does however need the ground connected. Have you checked that there isn't a break in the ground line?

You could also try disconnecting the power from the board to the pickit2 and let MPLAB believe it is powering the board even though it isn't. You should then be able to debug your project. If you can't I would suspect the debugger. What error message is it coming up with?

If you are still having problems can you post the complete output from the assembler/compiler.

Mike.
 

Attachments

  • settings for PICKIT 2.JPG
    settings for PICKIT 2.JPG
    101.7 KB · Views: 343
  • config settings.JPG
    config settings.JPG
    117.1 KB · Views: 356
Last edited:

Pommie

Well-Known Member
Most Helpful Member
Do you have an actual config line in your code. The window you posted above is not used and you need a line such as,
Code:
#pragma DATA _CONFIG, _CP_OFF & _PWRTE_OFF & _WDT_OFF & _HS_OSC & _LVP_OFF
in your source file. Or, untick the box in the window posted above.

Mike.
 

tiwari.sachin

New Member
I have used the same config Pommie. Its still not working. I tried with the stand alone software too. Even there the problem seems to be same.

I tried troubleshoot using stand alone programmer but the result are different. It seems to detect VDD. I am so damn confused. This is the first time that i am using a stand alone software. I am so hell stuck up with this. I have attached a few images of the stand alone software too

We dont have one more hardware. The hardware guy is on leave and my manager wants to see the result in two hours. I have the code ready. One small bug that i need to rectify and the debugger not detecting target VDD. this isnt happening.


I have tried all possible things. I am sure there is some very minor mistake and when i find it, i might be really angry on myself for how i missed such a simple thing. This happens with me. in most cases :)



Do you have an actual config line in your code. The window you posted above is not used and you need a line such as,
Code:
#pragma DATA _CONFIG, _CP_OFF & _PWRTE_OFF & _WDT_OFF & _HS_OSC & _LVP_OFF
in your source file. Or, untick the box in the window posted above.

Mike.
 

Attachments

  • No logic Detected.JPG
    No logic Detected.JPG
    122.8 KB · Views: 295
  • Trouble shoot.JPG
    Trouble shoot.JPG
    138.9 KB · Views: 223
  • VPP TEST.JPG
    VPP TEST.JPG
    138.8 KB · Views: 230

Wp100

Well-Known Member
Hi,

Have you seen the Pickit2 user guide page 57 for all the possible causes of Error 28 ? - there is a lot to go at.

Just looking at your screenshots, the thing that stands out is the Debugger Settings Pk2 window - attached is the version I use.
Think it might be that after building you are trying to enter debugger but it has not been programmed by debugger.

Worth a try...
 

Attachments

  • Doc1.pdf
    63.7 KB · Views: 223

tiwari.sachin

New Member
WP100

Thanks for you reply. It seems like i have finally been able to rectify the problem. It surely was the hardware that was causing this issue. I did rig up the entire circuit on the general purpose board and it seemed to work fine and fortunately have been able to clear all bugs too.

Now the issue that has arised is completely non technical. The project seems to work fine now. The project manager wants to see the result and he doesnt like to see the circuit on general purpose board and if he knows that its hardware issue and because the hardware guy is on leave, he gonna be in trouble big time. He is recently married and is out with his wife. The manager around here just doesnt care such things.

Trying to explain him. lets see how it goes.

Anyways thanks for your support.



Hi,

Have you seen the Pickit2 user guide page 57 for all the possible causes of Error 28 ? - there is a lot to go at.

Just looking at your screenshots, the thing that stands out is the Debugger Settings Pk2 window - attached is the version I use.
Think it might be that after building you are trying to enter debugger but it has not been programmed by debugger.

Worth a try...
 

tiwari.sachin

New Member
Pommie

Thanks for your suggestions. i was finally able to make it work. I appreciate your help.

Thank You.



Do you have an actual config line in your code. The window you posted above is not used and you need a line such as,
Code:
#pragma DATA _CONFIG, _CP_OFF & _PWRTE_OFF & _WDT_OFF & _HS_OSC & _LVP_OFF
in your source file. Or, untick the box in the window posted above.

Mike.
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top