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.

Pickit 2 clone cannot enter debug mode (and has weird running issues too)

Status
Not open for further replies.

Victor Crisostomo

Newbie level 2
Joined
Feb 5, 2014
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
40
Hello all! first post wee. just want to ask for help. im having *some* problem with the pickit clone i made and am stuck

made this DIY pickit clone from the blueroom pickit2 lite schematic. it works fine, but apparently it only has programmer capabilities and not debugging ones. i wanted to debug and i get the "Unable to enter debug mode" error.

when i tried to debug/run/animate the code it just gives PKError0024 (unable to establish a valid vdd on the target -attempted 5 read 0), so i thought it must be related to the vdd pin, and the removed components as well. the lite schematic connects the +5v to the 1n5817 schottky connected to vdd, so it must be reasonable that always the "target power is detected".

then i found a schematic of the Junebug's pickit2 programmer/debugger (https://www.robotshop.com/media/files/pdf/junebug-assembly-instructions.pdf). it had the same schematic but added the push-pull MOSFET pair connected to the VDD_TGT_N and VDD_TGT_P pins, and so i removed the direct +5 to schottky connection and added the mosfet switch circuits.

unfortunately the programmer still cannot run in debug mode and gets the same pkerror0024 error. also, it still "detects" target power even when the pickit2 is NOT connected to any target.

also a related issue probably, that in the pk2 lite, the target circuit wont run unless the usb is removed then reconnected. and when the pickit is connected to MPLAB/pickit2 app the circuit stops. the error went worse when the mosfets were installed. at first nothing new happened (connect-reconnect-connect to mplab) then when i corrected the pin connection on the n-mosfet (turned it around coz of apparent inverted pinout), it stopped running the circuit. and since "target power detected" there is no way to switch it on. help please

also tried:
1. disconnecting VDD_FB from the VDD pin. magically the pin still measures some 4.x volts on the voltmeter and it is deteced as target power
2. disconnecting the switch/mosfets (except the connections to GND). didnt work

sooo
1. what is wrong with what i am doing and how could i enable debug mode?
2. are (a) the pullup/pulldown on pins 24 and 25 critical? also, is the op-amp VDD_ADJ circuit in anyway essential to entering debug mode?

thats all good morning/night thanks guys

p.s. mods to the circuit: used 1n5819 for both schottky diodes on the schematic, also minor difference in resistor/capacitor values. dont think theyre part of the problem (yet)
 

Hi,

First off, your PK2 Lite from blueroom does run the Debugger ok, I have an almost identical plan / build and it does debug fine.

You have said a lot of what you have done, but not mention a lot of other relavant points.

1. Which version of MPlab IDE or X are you using .

2. Have you build your clone on a breadboard or soldered board.

3. are you using a good quailty usb lead, preferably a short one if you are having problems.

4. You do not mention if you have been able to do a normal program of any chip to prove the circiut works ok ?

5. Have you loaded and run the Pickit2 V2.61 stand alone program and checked its power/ signals to the target chip?

6. What is the target chip you are using ?
 

Attachments

  • pk2mini.jpg
    pk2mini.jpg
    75 KB · Views: 71
  • pk2hi.jpg
    805.7 KB · Views: 65
  • 000045.jpg
    000045.jpg
    58.7 KB · Views: 64

UPDATE! apparently the p-mosfet also got inverted pins, and turning it around did the trick. the VDD switch works. the "unable to enter debug mode" is gone too.

tried to debug a circuit once though, it can't run/animate and still gives pkerror0024 unable to establish vdd etc.

probably related is that it gets spurious "failed verify at address X" errors, where X is random. due to the flimsy usb connection idk. other functions work though

anyways,

1. Which version of MPlab IDE or X are you using .

MPLAB IDE v8.36. not sure if it has any relevance, though. ive tried another factory made(?) pk2 clone and a pickit3 on this machine and MPLAB, and they work fine

2. Have you build your clone on a breadboard or soldered board.

soldered pcb. stripboard with wirewraps.

3. are you using a good quailty usb lead, preferably a short one if you are having problems.

i took off the jack from an old usb flash drive and soldered wires to the leads, in a rather messy kind of way. i know its bad, at times the device cound not enumerate/be recognized, and the wires chip off quite occasionally. will work on getting proper connection once i get a cable and usb jack.

4. You do not mention if you have been able to do a normal program of any chip to prove the circiut works ok ?

5. Have you loaded and run the Pickit2 V2.61 stand alone program and checked its power/ signals to the target chip?

6. What is the target chip you are using ?

yeah ive done programs on the chip were using. we're using a PIC18F4550. the program and circuit works fine, only you have to plug out and in the usb cable to get vdd to work. "debugging" was trial and error or via the MPLAB SIM.

ive tested the diy once in the pickit2 program and the signals were fine. ill try it connected to a target
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top