How to make a PICKIT2 USB Programmer

Microcontroller Topics
Post Reply
User avatar
Shehani
Lieutenant
Lieutenant
Posts: 61
Joined: Mon Aug 19, 2013 2:11 pm

How to make a PICKIT2 USB Programmer

Post by Shehani » Wed Oct 02, 2013 10:02 am

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.
1.jpg
1.jpg (24.08 KiB) Viewed 4757 times
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
2.png
2.png (55.63 KiB) Viewed 4757 times
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.
3.jpg
3.jpg (110.44 KiB) Viewed 4757 times

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.
4.jpg
4.jpg (29.26 KiB) Viewed 4757 times
5.jpg
5.jpg (152.15 KiB) Viewed 4757 times
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,Once you made this programmer you can upgrade the firmware without the help of other programmers, since the firmware also includes the bootloader.



Article courtesy of electrosome.com
User avatar
TRONICLK
Captain
Captain
Posts: 140
Joined: Fri Oct 12, 2018 2:04 am
Contact:

Re: How to make a PICKIT2 USB Programmer

Post by TRONICLK » Fri Oct 04, 2013 12:45 pm

If you don't have time to make a programmer yourself, you can find several good quality programmers in TRONIC.LK.
Post Reply

Return to “Microcontrollers”