USB PIC Programmer : PICKit2

USB PIC Programmer : PICKit2

Contents

Microchip’s PICKit2 is much more comfortable,reliable and powerful than the other programmers that we can find all over internet. It is a USB based ICSP (In Circuit Serial Programming) programmer. Since it is a first release, Microchip published all the resources of PICKit2 public, which includes hardware schematics and all source code of softwares used. Through this any one can add features, fix bugs and modify source code.

Documents and other supporting files of PICKit2 are available at Microchip’s Website.

We have simplified the hardware schematics of PICKit2 by removing all unnecessary devices from it  and ICSP to ZIF converter is also added for easier programming. The main differences between the modified PICKit2 and Original PICKit2 are:

1. ICSP to ZIF converter is added for easier programming, thus we can use ICSP or ZIF socket according to our needs.


2. It supports only 5V PIC’s, thus 3.3V devices a small additional circuit to convert 5V to 3.3V.

3. Two 24C512 EEPROM’s used only for  programmer-to-go function in the Original PICKit2 were omitted. The Programmer-to-go function is not an important feature for a electronics hobbyist.

4. Bipolar transistors used in Original PICKit2 are replaced by MOSFETs, thus minimal additional components are required.

5. The mini USB connector is replaced by commonly available USB-B connector.

USB PIC Programmer PICKit2 Modified Circuit Diagram

PICKit2 is a USB powered device, that is it gets power from PC USB +5V power supply. USB microcontroller PIC18F2550 is the soul of the PICKit2. The USB Data+ and Data- from PC are connected to the D+ and D- pins of the PIC182550. The built-in-clock generator of pic uses external crystal oscillator X1, C2 and C3 to ensure the correct system clock rate. The inductor  L1, MOSFET Q1, diode D1, capacitors C1 and C4 forms a DC-DC converter (Buck Converter) which converts 5V from PC to 12V, which to be applied to MCLR/VPP pin of a microcontroller at the time of programming. This is controlled by the PIC firmware. The resistors R2 and R3 forms a voltage sensing feedback network, which is given to the analog pin AN0 of the PIC. MOSFET’s Q4, Q5 and resistor R5 are used for switching Vpp to MCLR/Vpp output. The MOSFET Q6 and resistor R4 ground the MCLR output whenever required. The MOSFET Q3 and resistor R16 are for switching Vdd to output whenever required. The Vdd sensing feedback is given to the analog pin AN1 of the PIC via resistor R6. The MOSFET Q2 with resistors R1, R17 provides active pull down to Vdd output whenever required. The diode D2 protects the circuit from external Vdd.

The LED1 with current limiting resistor R12 indicates that the circuit is powered form USB. The LED2 along with current limiting resistor R11 indicates that Vdd is switched to output. The LED3 with current limiting resistor R10 is controlled by the PIC firmware, normally glows during read and write operations indicating busy states.

The resistors R7, R8 and R9 are current limiting resistors in series with output lines PGD, PGC and AUX. The resistors R14 and R15 ensures active low at PGD and PGC outputs in certain cases.

Substitutes for Unavailable Components

Components that I used in my clone are shown as bold.

  • The protection diode D2, BAT85 will drop much more voltage on Vdd. So if you wish to avoid the voltage drop you can short it. If you don’t want to completely eliminate the protection you can replace BAT85 with lower drop Schottky diode. Thus you can replace it with 1N5819 or 1N5818.
  • You can replace the MOSFET Q3 (IRF9Z34) with cheaper BC640, in this case the output current will be limited to few hundred milliamperes with an acceptable voltage drop.  You can also replace IRF9Z34 with IRF9540N if it is not available in your city.
  • Inductor L1 can vary between 470uH – 1mH and should atleast 150mA rated. 
  • BS170 can be substituted by VN2010L or BS107
  • BS250 can be substituted by VP2020L or BSS92 (be careful, BSS92 has different pinout!) or BC 557 with base resistor 1K
  • You can omit the 330nF capacitor. I used .1mF capacitor.

Components that I used in my clone is shown as bold.

ICSP to ZIF Converter

A switch is provided with ICSP to ZIF converter. 1 and 2 should be connected for programming of 28 and 40 pin ICs. 2 and 3 should be connected for the programming of 18,14 and 8 pin ICs.  AUX connection is not shown in this circuit diagram but it is included in the PCB design. In the standard ICSP, you don’t require AUX.

You can download the PCB design and Component layout from the bottom of this article. Both PCBs are single sided, some straight wires can be found on component side.  There is a text on both PCB’s, thus you can easily find out the right side. Before etching please double check that you can read the text in it.

It is better to check the PCB for continuity and shorts after etching. Unfortunately to start the PICKit2 you need to program the firmware to PIC18F2550, you need an another programmer for this. If you haven’t one, we well provide programmed 18F2550 or Kits or even Programmer at cheap rates, just contact us. Once you made this programmer you can upgrade the firmware without the help of other programmers, since the firmware also includes the bootloader. The latest version of firmware is available at Microchip’s Website.

Before connecting to the computer, please double check the board against unwanted shorts and open circuits. In Windows 7 , the PICKit2 will be detected as USB Input Device. Then install and open the handling software ‘PICKit2’ and check the status reported by it.  It should show ‘PICKit2 is connected’ and shouldn’t be in red background. It all right, go through troubleshooting wizard by clicking Tools>> Troubleshoot. You need a voltmeter for this.

If you have any errors or doubts please comment, we will solve it…..

Download

You can download the Softwares and Latest version of hex file from Microchip’s Website. You can download the Hex file, Schematics, PCB Design, Component Layout etc from here…

 

Share this post

  • Pls, will d two vdd point b connected together only or connected to another point and whats d function of the s1 switch

  • Sir, what is this problem i have been faced??? Pickit 2 is connected,,, but it cant detect the controller…

  • Sir,
    Thanks for sharing your project. But sir i need the .hex file which we need to burn on PIC18F2550 microcontroller and please give me the pcb design file(gerber file)…

  • Hi @lijoppans:disqus Thanks u for your great job i am a studient i am working on this project !
    my probleme is :
    – first i have a vpp level error i solved it with shorting The protection diode D2..
    – now The pin VPP has 0 volts what is the probleme ??

  • hi george how are you? how drive led dot matrix 8×8 with microcontroller plz help me i made this project……………

  • Hello Sir,
    Thank you so much for these informations. i’m a student and i’m working on a project with PIC16F. I have to programme this PIC with the PICkit 2. I have the hardware circuit but not the software of the pickit 2. Where can i find the C and the .hex code of the 18F2550 ?
    Thank you, i’m looking forward to hearing from you.

  • Hello. I already build it and is working like a charm! Thank you!
    I only have a question: Can you upload a PCB version with Programmer-To-Go function enabled?
    I need a full working PicKit2 for a robot competition, but I’m very bad with PCB mapping, and my team and I are very busy with homework XDI will be forever grateful with you 😛

  • No Program to Go Function is not supported.
    You can use it for changing the firmware of the PIC 18F2550 used in it. And you can also use it instead of Write button in the tool if it is enabled in the software.

  • Hi
    What is the purpose of that push button switch ?
    Is this pickit 2 circuit support Program to go function ?

  • sorry it seams my pics are too small to show so i resend it for you thanks again.

  • Hi dear Ligo thanks and more thanks for your good usb programmer which I was looking for it.
    ok every think is good and ok I mad in as your circuit diagram and pcb and install software too. but my problem is high voltage error in startting my programmer I gost some shut
    screen that will send you to solve my problem anything you do will be appreciated
    before. Also I studied almost all comments and did all you said but unfortunately couldn’t get good result
    best regards Mehdi Emm

  • Asalam o Alaikum how are u Ligo?

    please send the programming language in C of USB PIC PROGRAMMER thnx…………..

  • ,all tests have passed,,,pickit2 is connected…….but no device is detected… whats the problem… whether v hav to connect external supply to pic other than from the programmer????

  • Hi, I can`t find the BS250 anywhere, but I found the BSS110 instead. I wanted to make sure that this is going to work. Thanks

  • I AM TRYING TO BUILD MY OWN PICKIT 2 AS U HAVE ONE MY DOUBT IS DOES AFTER BUILDING THE HARDWARE PART
    IS THERE ANY FIRMWARE TO BE INSTALLED IN THAT PIC18F2550 SO THAT WHILE PROGRAMMING WITH OTHER PIC THERE WILL BE NO ISSUES….I LIKED UR SITE VERY MUCH..HOPE U WILL REPLY SOON

  • Hi. Thank you for sharing this project.
    I’m from Brazil and I finished my ride today.
    I’ve done the test with the PIC12F675 and PIC 16F628A and worked perfectly.
    Again, Thank you!

  • Hi.
    Thank you for sharing this project.
    I’m from Brazil and I finished my ride today.
    I’ve done the test with the PIC12F675 and PIC 16F628A and worked perfectly.
    Again, Thank you!

  • Hi, in this project (ZIF socket diagram) Circuit diagram and PCB connections are different, so i am confusing about that.

  • VPP, VDD, VSS, PGD and PGC are the signals required for programming a pic microcontroller. When we connect a pic to zif socket, these signal pins will be connected to corresponding pins of PIC.

  • please explain connection of zif socket if we r doing 8 16 28 and 40 pins of microcontroller programing.

  • Hi Ligo George i successfully complete this project. thanks for this great job

  • I am not sure about you problem..
    Just try replacing the inductor with a single 470uH inductor instead of two 330.
    Just try changing the transistor Q1..

  • But sir my problem of low vpp voltage error is not solved
    The vpp voltage limits at 6.54 V and not rising to 12 V
    During vpp test my inductors gets heated.I’ve tested those they r fine bt during vpp test voltage is droping through inductoes.Sir help plzzzz………..

  • Yes you are right..
    Sorry for misleading..
    Working:
    When the transistor Q1 turns ON, inductor get charged.
    When it turns OFF, Capacitor C4 gets charged to voltage VDD + Voltage across inductor, through the diode D1

  • Bt sirinductors are like that of resistors
    To get an effective inductance of 660uH i have to connect two 330uH inductors in series…….
    Sir can u plzz explain the vpp amplification process in brief

  • Well done man! and thank you so much for this helping post. I want to know about the Auxilliary pin that what we need to connect in ICSP to ZIF converter?

  • Hello sir i made this programmer and when going to troubleshoot it says low voltage detected at vpp pin.
    The vpp voltage on multimeter shows 6.7V
    during vpp test i noticed that the voltage coming in the inductor input is 4.84 V and the voltage output from inductor is 1.9V
    and the voltage on the gate of mosfet Q1 is 3.43V
    I have used inductance L1 = 660 uH(330+330) ,
    BS 170 as MOSFET Q1 , IN5819 as diode D1 and C1 and C4 as listed above
    plzz help sir……..

  • Sir, BC640 and 1n5818 aren’t available here in my place, also the other replacements that u mentioned, is BC540 and 1n5817 alright as replacements? those r the only ones available here, thanks in advance

  • Hi Ligo
    I have built above programmer when i connect on pc it is showing usb device not recognised pls help, what are my doing wrong, every connections seems to be okay.

  • Hi Ligo,
    I i built your pickit2Clone Pls I need your help troubleshooting it, Power LED turns on when I connect to the PC but the device is not detected. PICkit2 software continues to show ‘PICkit2 not found’. I’ve checked for shorts/opencircuits. Nothing seems out of place. But Q1 is heating up. Any idea what might be wrong? i have been on this project for weeks now, and now am completely out of options.

  • Pls Ligo i build your pickit2 clone when connect to PC, power LED turns ON but the device is not detected. PICkit2 software continues to show ‘PICkit2 not found’. I’ve checked all the shorts/opencircuits. Nothing seems out of place. But Q1 is heating up. Any idea what might be wrong?

  • You need another programmer to burn the firmware… Use your friends or college’s programmer….
    Once you made this programmer.. you can program another 18F2550 with it…

  • I asked it because that image that I sent it’s not your circuit’s image. I guess that I confused with a circuito from another website because the files’ names are the same. Thanks.

  • I realized it later, I’ve never seen drawings like that, it’s interesting, actually. Also that was why I asked if the link was updated because this board is found in other website, I guess that a I confused the two both because the file’s name is the same.

  • I updated the link recently.. before 2 week.. due to some download issues..
    You can download the latest versions of hex file, mplab and pickit2 software from microchips website..

  • Did you update the link? Because the zip that I downloaded today is different of the other that I downloaded before.
    And thanks, I’ll try to do this board soon.

  • Also I was looking to the board draw and I realized that some components, like resistors 20 and 21, are connected to nothing. I can found a reason just for the transistors that can be used like diodes, but capacitors and resistors… I no think so.
    So, are we supposed to route it, right?

  • Great job, but I was wondering why on pictures the board seems single layer and on eagles’ files it’s double layer. Do you have a single layer version or it is just a mistake mine? Thanks

  • that zif file contains hex file..
    do you have proper code of that file??
    from where i can get it?

  • Yes it is working… AUX pin of the ICSP programmer is not using in the above circuit diagram which is not required for most of the applications.. but it is included in the PCB……

  • in the picture of icsp to zif converter their is a resistor shown but is not present in the circuit diagram ,is this circuit diagram working

  • No messages. Nothing at all.
    Just the lonely Power LED.
    Yes, I wrote the hex file in the 18f2550 using a standard PICDEM2. Programmed and verified.

  • Did you get any messages like ‘USB Device Not Recognized’ ??
    Check whether the USB voltage is dropping when connecting it??
    Did you write the hex file to 18F2550??

  • Power LED turns on when I connect to the PC but the device is not detected. PICkit2 software continues to show ‘PICkit2 not found’. I’ve checked all the shorts/opencircuits. Nothing seems out of place. But Q1 is heating up. Any idea what might be wrong?

  • Ligo it works fine now!
    You don’t beleave it…the switch i used for 40 pins and small ic’s makes no conection both sides nothing. Replaced and the programmer works !!! keep on posting and many thanks for al your work!
    Leo

  • Yes.. the connection is correct…
    Try using PICKit 2 software…. … even then not working try by directly connecting the ICSP to PIC.. without using ZIF socket.. Hope that your pic is a good one…..

  • Hi Ligo,

    First Thanks for the great job again.

    I’ve build this one two but i have a problem.
    The pc reconize it and mplab also but says :

    nitializing 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)
    PKWarn0003: Unexpected device ID: Please verify that a PIC16F628A is correctly installed in the application. (Expected ID = 0x1060, ID Read = 0x0)
    PICkit 2 Ready
    I have connect 16f628a from pin2 in the zif to down thats correct?
    Please help me

  • Try ICSP programming.. by directly connecting Vpp, Vdd, Vss, PGD, PGC to the microcontroller without using ZIF socket it may work..

  • i can’t prog. pic12f675 by pic kit2(v2.61) , can any one tell whats the problem….

  • i can’t program 12f675 or 12f629,but successfully programmed 16f and 18f uc.

    what should need change to program 12f629 or 675

  • when jp1 is open then the voltage on the vdd pic is 3.33 V but in closed state the voltage on vdd pic is 2.74 V it should be 5 V ?

  • the problem is solved i replace the 47uF capacitor by 10uF.No vpp error is coming.One thing i want to ask that how to program 3.3 V pic devices bybthis clone.

  • the problem is solved.I replace the 47uF capacitor by 10uF.No vpp error is coming.One thing more i want to ask that how to program 3.3 V pic devices by this clone.

  • The pickit 2 clone should work if it passes all these tests… try after re-installing the pickit2 software… Check c4 and c1 if it is above the prescribed value… excess capacitance will make problems…

  • Did you connect it to a pic or zif socket when tried to open the software…??

    You have no problem with feedback circuit as the VPP test is passed….

  • I go through tools-troubleshoot option both the VDD and VPP test are passed.The multimeter reading of VDD voltage level is 5.02 V and VPP voltage level is 12.05 V.MCLR ON=3.12 V and MCLR OFF=4.41 V.If both the voltage test are passed then why i’m getting VPP voltage level error while opening pickit 2 software ? And one thing i want to ask thast what is the maximun lenght of usb chord that i can use to connect my programmer to my pc ? Does this lenght factors in VPP arror ? And you told about the feedback circuit error so what is the solution for that ?

  • i have problem in mosfet transistors because i can only replace bs250 with js306 and bs170 with k422 but i may have problem in assigning the correct connection of each with respect to where is source-drain-gate
    can you help me

  • Do you connected any microcontroller to it? If not check the Vpp pump circuits…consisting of inductor, D1, Q5 etc… Use the troubleshoot option in the tools menu in the pickit2 software …. measure the Vpp voltage with a multimeter..

  • i made this programmer but when i m connecting this to my pc it’s showing pickit 2 vpp voltage level error.check target and retry operation.please help

  • @Ouji Mohamed, To read and write the PIC 16F84 with my Clone, I have to change. Dat file in the installation folder of the program PICkit2 2.61 Programmer.
    I do not know if this Clone, does the same thing, try to let them know.

  • thanks for this great job.i just want to ask u if this programmer can program 16F84 because in the datasheet of the origin PICKIT2 it says that doesn’t support 16F84

  • Is possible to receive or publish the PCB (Eagle or other format) of 8-40 pin ZIF connector?
    Thank you.

  • Is possible to receive or publish the PCB (Eagle or other format) of 8-40 pin ZIF connector?
    Thank you.

  • shortening the distance between programmer and demo board form 25cm to 3cm – no success
    If I put 8dil adapter on 25cm cable works fine.
    I had a small rf noise in Vdd supply, so I put one schotty diode between Vdd and L1. Noise is gone, but programer still doesn’t work. Maybe I have to redesign pcb.

  • Hello. I have a problem with this programmer and icsp programming. I’ve made a little demo board for 12f675. When i try to upload hex to pic (icsp) i get a message : “programming failed at program address 0x000001”. The demo board has dip switches to separate programm lines from other network. If I put uC on 8dil adapter and connect direct to pk2 everything works fine (upload, download, osccal). I’ve also try pk2 troubleshoot with demo board conected to pk2 programmer (without uC). Vdd test = 4.7V, Vpp test = 11.9V, freq test on PGD and PGC pins = 26kHz. Troubleshoot test without demo board: Vdd test = 4.9V, Vpp test = 11.9V, freq test on PGD and PGC pins = 26kHz.

    And there is more 🙂 If I upload hex with 8 dil adapter, then put uC on demo board, i can download hex code and i can erase uC, but i can’t upload hex or make auto osccal procedure (manual works fine). Any idea what is going on here? I have almost no ideas left.

    Operating system is win xp 32.

  • Which is the Operating System?

    Drivers will be automatically installed when you connect PICKit2 to your computer similar to pendrive or printer…………..

    Then you need to install PICKit2 software for programming…….

    Check whether the crystal is 20Mhz or not…… try after reprogramming the PIC…

  • kindly can you tell me from where i can get pickit2 drivers?
    because pickit2 i have downloaded(pickit2 v2.61) dont have drivers ,when i connect with pc it shows yellow mark on pickit2 driver in device manger<hardware <HID
    kindly help.

  • hi i have built above programmer when i connect on pc it is showing no usb drivers installed unknown.
    can you help me
    i have tried to load some driver files using update driver but it showing drivers not matching with hardware

  • You can get the hex file from the above download or you can download it from microchips website. What happens if you connect it to pc without pressing the button.

    When you connect it to pc the power led will golw.

    if you connect it in bootloader mode (by pressing the button when connecting to pc), the power led will glow as above and another led starts blinking with a delay.

  • my female connector type B pins connected (bottom view) as follows: 1-5volt; 2- D-; 3-D+; 4-gnd
    pins 1&4 voltage is 5.26volt; 3&4-1.75volt; 2&4-0 volts; i think bootloader program is problem. so can you send me bootloader hex file of above ur hand made clone pickit2 sir. please since 4 months i am on it what to do i dont know.

  • Then your PIC program is running fine………….. problem is with the communication with PC……. . Most probably you connected D+ and D- in wrong way……. please try after interchanging these connections…

  • ya green led glowing and when i press button yellow led starts blinking and on monitor screen it shows message that usb not recognized unknown usb device.

  • It may be due to wrong USB connection. Connect after interchanging D+ and D- of USB.

    Is the LED in the Circuit blinking when you connect it in boot-loader mode?

  • when i connect pickit2 clone to pc after holding pressed push booton, my pc showing message usb not recongnized any can help me with this. pickit2 software showing no pickit2 found on pc

  • You can program all 5v pic microcontrollers ……for more details please visit microchips website….

    3.3v devices are not supported by this clone, for this you need to step down 5v to 3.3v…..

  •  please..am working on the pickit2 programmer…..i want to know were the icsp1 to ISCP6 goes to…?

  • Do you troubleshoot it using PICKit2 software?

    The question is not complete please add some more description about mosfets that you used in it and how you check the voltage etc..

  • hello i built above pic programmer clone in my circuit at vpp pin of icsp, it showing voltage of 4v only even though my L1 input voltage is 5v ……………..
    please tell me how to rectify this

  • hi thanks for the great efforts, but i’d like to ask ,can i replace BS170 MOS with 2N7000??
    because i can’t find it here. thanks again

  • Very nice job. I made other pickit2 clone and works very well…  but i will try this one. 

  • Cool one. I will make one soon. Another Programmer GTPUSB Lite also Works like charm. Exploit more from PICKIT2(can be used as Serial Port, can program ATMEL MCUs also).


  • >