Introduction: Simple 3 Resistor PIC Programmer

Picture of Simple 3 Resistor PIC Programmer

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

Picture of 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

Picture of 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

Picture of 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.

Comments

amila_adikari (author)2017-07-12

I made this programmer. But there is a problem. I used picpgm software. It detected programmer and serial port(com1). But there display 'pic no connected'. what is the problem. Can you help me.

eLab (author)amila_adikari2017-07-12

Hi. Probably some bad contact in any connection. Or the PIC might be damaged.

amila_adikari (author)eLab2017-07-12

Thanks, I will try.

GiovanniA23 (author)2017-01-22

On the 2 pin connector, 12v supply is what im gonna put there? Im a little confused..

AbhilashH3 (author)2016-11-24

db9 is male or female connectors ?.The Pin numbering differs for both

rabehrock (author)2016-08-28

i made it and it dose detect the programmer but dosent detect the pic16f84a, it dosent support pic1f84a

eLab (author)rabehrock2016-08-28

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.

mmansour8 made it! (author)2016-02-25

works great for pic 16f877a

ysin2 (author)mmansour82016-03-26

hey mmansour8 can you tell me what cable are you using for connecting the db9 female connector to your laptop ...thanks ??

canterburyflyer (author)ysin22016-04-03

As far as I know it would be termed a D-Sub 9 pin or RS232

eLab (author)mmansour82016-02-25

Very glad to see that! Congrats.

mmansour8 (author)2016-02-24

hello
thanks for the tutorial
I am using pic 16f877a
the program detected the programmer but not the pic
while every thing is connected right
I am using a phone charger ( 5.7 v ) and a 7805 and two 10 uF capacitors
so my output voltage is 4.92 v
and the voltage on the vss between vdd is 4.65 v is this the problem ?

mmansour8 (author)mmansour82016-02-25

fixed it and it works fine
many thanks

AlvarF (author)2015-10-21

Would this work for PIC16F887 too? thanks

eLab (author)AlvarF2015-10-21

Yes, it should work.


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
and PGC are in the same place as PIC18F4550 for example. If they match,
is very likely that this programmer will work.

AlvarF (author)eLab2015-10-23

Wow! I'll try it as soon as I can. Thank you very much eLab!

KadourK (author)2015-09-29

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

eLab (author)KadourK2015-09-29

Yes and yes! ;)

KadourK (author)eLab2015-09-30

im going to build and try it, thanks elab

Ayman1 (author)2015-07-26

the 2 pins 1 & 2 one goes to +5v and the other to 0v ?
at the same time 1 to pin 11 and 2 to the pin 10
am i right?!!

eLab (author)Ayman12015-07-26

The power supply comes from the connector P1.

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

Kunal4you (author)2014-10-20

yess it works with my PIC16F877A. Thanx a lot..

IsmailH1 (author)Kunal4you2015-01-02

deer did it work with USB to DB9, beacuse I don't have DB9 Port on my laptop

6ejaz (author)IsmailH12015-01-04

No dear because USb to Serial COnverter has only TX, Rx, Vcc and Gnd ..

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

eLab (author)6ejaz2015-05-31

You're right! Most converters do not have all the auxilliary pins necessary for this converter. Besides the voltage levels are usually lower.

IsmailH1 (author)6ejaz2015-01-04

thankx brother

eLab (author)IsmailH12015-05-30

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.

eLab (author)Kunal4you2015-05-30

Thank you!

gokulraja (author)2014-02-08

tell a alternative way for laptop

eLab (author)gokulraja2015-05-30

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.

joao.granado (author)2015-04-03

PICPgm does not detect the programmer.
Can you please help?
(using PIC18F4520 )

eLab (author)joao.granado2015-05-30

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.

trin1993 (author)2015-03-10

i am using pic16f877a. Programmer software tell no programmer found no pic detected.Can any body help me.

eLab (author)trin19932015-05-30

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.

prashantmanedesh (author)2013-07-18

i designed system according to this but picpgm dosnt detect ic

eLab (author)prashantmanedesh2013-10-03

We had that problem when we were using other values than 5V in the external voltage source connector. But it could be something else.

OmarS5 (author)eLab2015-02-05

what else ?

eLab (author)OmarS52015-05-30

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.

OmarS5 (author)eLab2015-02-05

warning :unable to open parallel port i/o driver! >.. what that?

eLab (author)OmarS52015-05-30

Try using a different computer, use a real serial port, not any converters.

OmarS5 (author)2015-02-05

thats proplem

eLab (author)OmarS52015-05-30

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’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.

OmarS5 (author)2015-02-04

pls help me my computer find the programmer but dont find pic 16f877a

eLab (author)OmarS52015-05-30

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’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.

looneys (author)2015-01-12

Hey dude

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 ?

Thanks

eLab (author)looneys2015-05-30

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.

abhavikthakker (author)2015-01-06

Getting error for 16F877A......

Verify Error: Too much errors in Code Mem, giving up!

Programming finished with verify errors!

Please Help its urgent......

Thanks in Advance......

eLab (author)abhavikthakker2015-05-30

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.

abhavikthakker (author)2015-01-06

IS it working for 16F877A with same circuit or need some modification ?

PGM pin is required to be connected on kept open?,,,,.............

Thanks........

eLab (author)abhavikthakker2015-05-30

For PIC16F887A you can use the programmer without any modifications.

About This Instructable

26,550views

49favorites

License:

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