The Making of PIC Kit 2 Clone
by Lithium-ion in Circuits > Microcontrollers
290 Views, 3 Favorites, 0 Comments
The Making of PIC Kit 2 Clone
.png)
It is the 4th tutorial in the getting started with PIC series, Designing your own programming tools always help to solve the problems easily
Supplies

Components Required:
- PICDUINO BOARD : Previous project
- ZIF socket - 40 pin
- Resistors 0603 - 47 Ohm, 470 Ohm, 2k7, 4k7, 10k, 22k and 100K
- SMD 0603 LEDs
- Capacitors 100nF, 47uF
- Inductor 680uH
- Transistors 2N3904 and 2N3906
- 4 pin SMD tactile button
- Pin headers and connectors
Story:

This is the 4th tutorial in the series of PIC programming, today we are going to make our own PICKIT 2 clone version. Because the original PIC kit is too costly, due to its protection system and heavy hardware. Time to design a clone PIC kit version 2. This is an open source project and already available in the market. You can buy it from AMAZON links too. But the information about the right bootloader and hardware is very cluttered and not properly given by anyone on the internet. I will provide all the hardware files, software links and bootloader files at the same place which makes it easier to understand and DIY. There are a lot of websites which are selling this online, there are some advanced options also.
This PIC series is sponsored by PCBWAY, A reliable and affordable PCB/PCBA manufacturer from CHINA. PCBWAY is one stop solution for all the prototyping needs. As the series continues we will order our development board from PCBWAY.
How PICKIT 2 Clone Works:

It is basically based on PIC18F2550, yes the same chip we have used in PICDUINO project. Because this IC supports USB, and this is exactly what we need for the PIC kit. But we are not going for a standalone project, Because it is the same chip, I designed a shield. Which can be directly plugged into the PICDUINO and have onboard options for different pin PIC programming.
NOTE: We can program any IC using this PICKIT 2 clone board, but for this we need to burn the PICKIT 2 bootloader in the IC through the original PICKIT 3.
Circuit Diagram:

I modified the circuit keeping the connections the same from the already existing clone boards in the market. And added some additional options for programming. You can select between ZIF and without ZIF programming methods. Because PIC microcontrollers require high voltage programming to be reset through the MCLR pin. To implement that in circuit the onboard transistors, 2n3904 and 3906 forms a boost converter configuration. The circuit is designed to get the proper voltage 12v (high voltage) at the MCLR pin. The selection of programming chips is based on the number of pins and ZIF/without ZIF. Which is described in the next section.
PCB Design and Programming Methods:


The PCB is fully compatible with the PICDUINO, as it settles over that board. So all the pin headers are already aligned in the proper manner. The power is taken from the PICDUINO board USB port. The ZIF socket is there to program different pin chips. The MCLR pin of the respective IC should be aligned with that pin. Which can be selected by onboard Jumpers.
ZIF: For example you need to program a 18 pin PIC through PIC kit 2 clone, Then change put a jumper on MCLR 18 (2 pin header). After this align your IC in the ZIF socket at MCLR 18 pin. Same for the 40 pin IC just change the jumper to MCLR 40 and then put the chip in a ZIF socket to be programmed.
Without ZIF: If you don’t want to mess up with the ZIF socket. The IC can be programmed via header in the traditional way of the original PIC. The 6 pin headers are given as they were in the original PIC, Make connections according to the given schematics and you are good to go.
I have used PCBWAY for PCB fabrication, one of the most reliable and trustworthy services. It is easy to place an order and I am amazed by the quality. It is better than other manufacturers at the same price point. PCBWAY also offers services related to PCBA and stencil, sign-up using this link and get free PCB coupons for your first PCB order.
Assembling the PCB:



After ordering the PCBs I assembled in my lab under a microscope. If you do not want to mess with such things, you can try PCB assembly services from PCBWAY. I gathered all my components at one place and soldered them one by one, starting from the SMD ones to DIP and pin headers. It took me around 1.5 hours. Download all the required hardware files from here.
Uploading PICKIT 2 Bootloader:

Now time to update the PICDUINO bootloader, download the Firmware.HEX file from here and burn the bootloader in PIC18F2550 chip using the original PICKIT3 and PICDUINO onboard headers. It is a one time process, you can borrow PICKIT3 for some time and after uploading the bootloader you have your clone ready, Now this clone board can be used to program and burn bootloaders in other chips.
Working:


Download the PICKIT2 software from here. Here is the programming tutorial described in 4 simple steps:
Step 1: After successfully burning pic kit 2 bootloader, plug the PICDUINO via USB.
Step 2: Connect the PIC kit to your microcontroller according to the given schematics or through ZIF socket.
Step 3: Start the PICKIT 2 software, and it will automatically detect the IC. Sometimes for the new PIC we need to download the operating system which is automatically redirected when clicked, under the tools menu > update operating system > opens a folder > select HEX > wait > done.
Step 4: Choose the HEX file (BLINK code) and then click write it will take a few seconds and dump the code in your IC and message back : programmed successfully.