Micro-controllers play a very important role in electronics, as they are able to perform tasks in automation, control, image processing, among others. Their usage is immense. There are various families of micro-controllers, one of those is the Microchip’s PIC (Peripheral Interface Controller). PICs are very popular as they are relatively cheap and because of their characteristics, for example their low power consumption, internal oscillator and free development tools.

This is an example of a very simple 40 pins PIC programmer, it only needs 3 resistors:

Step 1: Schematic

As shown above, there are only three 4,7k resistors connected between the DB9 connector and the PIC. According to the schematic, these resistors are connected to the following pins of the PIC: MCLR (1), PGC (39) and PGD (40). The pin no.8 from the DB9 connector is connected to the PGD pin (40) in the PIC.

This programmer operates at 5V DC. Therefore, an external voltage source must be connected to the 2-pin connector.

Step 2: Design

We used the KiCad software to design the PCB, it is free!

Then we started making the PCB, first we printed the layout on an acetate sheet. Then we used the UV exposure method to transfer the circuit to the board and for last, we corroded the PCB with iron perchlorate.

Then we soldered all the components in place:

1 - DB9 connector;
3 - 4,7k Resistors;
1 - 2 terminal connector;
1 - 40 pin socket;

Step 3: How to Use

These are the steps to use the programmer:

1. Connect it through a serial cable to a computer;
2. Plug in the desired PIC on the board, for example, the PIC18F4550;
3. Using an IDE, like MPLAB or MikroC for instance, write, compile the code and generate the .HEX file;
4. Through a programmer software like PICPgm, send the .HEX file to the PIC.

And there you go, the PIC is ready to use and you got a new programmer for 40 pins PIC micro-controllers.

Project: here.

On the 2 pin connector, 12v supply is what im gonna put there? Im a little confused..
<p>db9 is male or female connectors ?.The Pin numbering differs for both</p>
<p>i made it and it dose detect the programmer but dosent detect the pic16f84a, it dosent support pic1f84a</p>
<p>Please notice that this programmer is made for PICs with 40 pins and PIC16F84A has 18 pins. If you want to use it, you must make sure that the right connections correspond to the appropriate pins. Which might differ from PIC to PIC.</p>
works great for pic 16f877a
<p>hey mmansour8 can you tell me what cable are you using for connecting the db9 female connector to your laptop ...thanks ??</p>
<p>As far as I know it would be termed a D-Sub 9 pin or RS232</p>
<p>Very glad to see that! Congrats.</p>
hello<br>thanks for the tutorial<br>I am using pic 16f877a <br>the program detected the programmer but not the pic <br>while every thing is connected right <br>I am using a phone charger ( 5.7 v ) and a 7805 and two 10 uF capacitors<br>so my output voltage is 4.92 v<br>and the voltage on the vss between vdd is 4.65 v is this the problem ?<br>
fixed it and it works fine <br>many thanks <br>
<p>Would this work for PIC16F887 too? thanks</p>
<p>Yes, it should work.</p><p><br>We tested this programmer with PIC16F877, PIC16F887 and PIC18F4550. For other PICs all you have to make sure, is to check if the pins VDD, VSS, MCLR, PGD <br>and PGC are in the same place as PIC18F4550 for example. If they match, <br>is very likely that this programmer will work.</p>
<p>Wow! I'll try it as soon as I can. Thank you very much eLab!</p>
is the pin 5 of the DB9 connected to the ground? and if it is, is it the same ground of the power connector? thanks
<p>Yes and yes! ;)</p>
<p>im going to build and try it, thanks elab</p>
the 2 pins 1 &amp; 2 one goes to +5v and the other to 0v ? <br>at the same time 1 to pin 11 and 2 to the pin 10 <br>am i right?!!
<p>The power supply comes from the connector P1. </p><p>The 5V (pin number 2 from the power connector) goes to pins 11 and 32 of the microcontroller. The ground or 0V (pin number 1 from the power connector) goes to pins 12 and 31 of the microcontroller. These PICs use double pins for power, two pins for positive and two pins for negative, you must connect them all </p>
<p>yess it works with my PIC16F877A. Thanx a lot..</p>
<p>deer did it work with USB to DB9, beacuse I don't have DB9 Port on my laptop</p>
<p>No dear because USb to Serial COnverter has only TX, Rx, Vcc and Gnd ..</p><p>While this programmer uses other PINS of DB( as well. Sorry but u have to use a real/original serial POrt of a Desktop Computer</p>
<p>You're right! Most converters do not have all the auxilliary pins necessary for this converter. Besides the voltage levels are usually lower.</p>
<p>thankx brother </p>
<p>Right, not only you might have a problem with the voltages, but also that question of the extra pins of the DB9 connector, required for the programmer.</p>
<p>Thank you!</p>
<p>tell a alternative way for laptop </p>
<p>You can't use USB to Serial converters. Many of them only use the absolutely necessary pins for communication. In this case you must make sure the converter internally creates the auxiliary pins, like DTS, CTS and RTS. Additionally, the voltage levels of the converter must be high enough to program the microcontroller, and they usually are quite low. </p>
<p>PICPgm does not detect the programmer.<br>Can you please help?<br>(using PIC18F4520 )</p>
<p>If it doesn't even detect the program it means that there is something wrong with the circuit of the programmer or with the serial port itself. Dont use USB converters, but a real DB9 port instead, check for continuity tests, power up both sides of the PIC and use a good and stable 5V power supply. Also might want to try with a different computer, maybe an older one.</p>
<p>i am using pic16f877a. Programmer software tell no programmer found no pic detected.Can any body help me.</p>
<p>Usually means a problem in the power supply. Dont use any converters, use a real serial port and not a USB to DB9 converter, use a stable 5V supply, for example from USB. Check if both sides of the microcontroller are powered up.</p>
i designed system according to this but picpgm dosnt detect ic
We had that problem when we were using other values than 5V in the external voltage source connector. But it could be something else.
<p>what else ? </p>
<p>Also look for any instability in the power supply voltage. Don't forget to power up the 2 sides of the PIC. Do continuity tests on the tracks.</p>
<p>warning :unable to open parallel port i/o driver! &gt;.. what that?</p>
<p>Try using a different computer, use a real serial port, not any converters.</p>
<p>thats proplem</p>
<p>It'r probably a power supply issue. Try using a different, more stable power supply, like an old 5V cell phone charger or USB power supply and make sure you&rsquo;re powering the 4 power pins of the microcontroller. Also check all the connections, it could be a bad contact somewhere. Some people with similar problems were able to make it work trying different computers. You might also want to check with a different PIC.</p>
<p>pls help me my computer find the programmer but dont find pic 16f877a</p>
<p>Usually that means that the power supply might have a problem. Try using a different, more stable power supply, like an old 5V cell phone charger or USB power supply and make sure you&rsquo;re powering the 4 power pins of the microcontroller. Some people with similar problems were able to make it work trying different computers. You might also want to check with a different PIC. Also check all the connections, it could be a bad contact somewhere.</p>
<p>Hey dude </p><p>my question may be a little bit stupid but i don't get it ,why do you use PIC 18F4620 up there in the schematic picture ? Or it is just an example and i can use my PIC16F877 instead ?</p><p>Thanks </p>
<p>ahah We didn't even noticed that. Thanks for bringing it up. It was just an example of a 40 pin PIC. You can use either one of them, they both work.</p>
<p>Getting error for 16F877A......</p><p>Verify Error: Too much errors in Code Mem, giving up!</p><p>Programming finished with verify errors!</p><p>Please Help its urgent......</p><p>Thanks in Advance......</p>
<p>Many things could be happening, it's hard to diagnose but check for continuity in all the tracks, verify that the power supply is stable, be sure to power up the two sides of the microcontroller, use a real serial port and not any converters, maybe try with a different PIC.</p>
<p>IS it working for 16F877A with same circuit or need some modification ? </p><p>PGM pin is required to be connected on kept open?,,,,.............</p><p>Thanks........</p>
<p>For PIC16F887A you can use the programmer without any modifications.</p>
<p>Does this programmer works with usb to ttl converter?</p>
<p>Of course there is also the problem that the converters usually don't have all the DB9 pins.</p>
<p>Usually no. The logic levels are different and don't have the required voltage to power up the programmer properly.</p>

About This Instructable




Bio: eLab Hackerspace
More by eLab:3D Printed DNA Lamp eLab Hackerspace GSM Access Control System Dual Boot Ubuntu and Windows 8 UEFI 
Add instructable to: