Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Programming all PIC chips with PICkit 2

Status
Not open for further replies.

richacm

New Member
Hi,

I have been playing around with the PICkit 2 programmer I bought and it comes with a 20 pin PIC16F690 microchip. However it appears that 20pin microchips are the maximum I can program on this board.

Is there a way for me to program a PIC16F887 or something similar using this board?

Thanks,

Craig
 
I have been playing around with the PICkit 2 programmer I bought and it comes with a 20 pin PIC16F690 microchip. However it appears that 20pin microchips are the maximum I can program on this board.

Is there a way for me to program a PIC16F887 or something similar using this board?
Just use a **broken link removed**. Simple, inexpensive and flexible. Excellent for experimenting and prototyping. For lots of photos and examples, have a look at my site.

This one is getting a tad crowded. :D I have bigger ones...
blehsm.jpg

The PICkit 2 (Junebug too) can program/debug almost the full line of PICs.
 
Last edited:
Except the 3.3V ones :) I hear that bill is or you is possibly working on a 3.3VDC one?
 
Sweet - thats good to know!

I have a breadboard already...just briefly do you have a circuit diagram of what pins I attach to what?

I see in one of your photo's you have resistors and capacitors across the values from the pin as well....its just a bit hard to see what pin number from the PICkit 2 kit goes to what terminals on the PIC chip.

I suppose P6 goes to Vdd for starters.

Thanks,

Craig
 
I see in one of your photo's you have resistors and capacitors across the values from the pin as well....its just a bit hard to see what pin number from the PICkit 2 kit goes to what terminals on the PIC chip.

I suppose P6 goes to Vdd for starters.
What the hell is P6? :p

Looking at the PICkit 2 from the top side, starting at the arrow (pin 1):
1. VPP - goes to MCLR (don't forget a 10K to 33K pullup resistor on MCLR)
2. 5V - goes to VDD
3. GND - ground
4. PGD - to PGD pin on the PIC
5. PGC - to PGC pin on the PIC
6. Not used
 
Last edited:
Fantastic - thanks heaps. I think I will go out and buy a 16F887 now :)

Sorry about P6....I saw a little P1 beside the right most pin, I assumed that was Pin 1. You've put me right though.

Cheers,

Craig
 
Except the 3.3V ones :) I hear that bill is or you is possibly working on a 3.3VDC one?

The PICkit2 can program 3.3V PICs just fine, my Junebug version of the PICkit2 does not have the 3.3V clamps.
If your target 3.3V PIC has its own power supply and the PGC & PCD pins are not analog you can just program directly with the Junebug.
 
OK, I have bought a PIC16F877A chip and I have wired it up as you described to the PICkit2 controller (see diagram for a schematic).

I start up the PICKit2 programmer and it recognises the PIC16F877A which is great.

I then Import the Hex (after compiling it for the PIC16F877A) and go to write it to the microchip...I then get an error message back "Programming failed at Program Memory address 0x000024". The number changes everytime I try to write.

Any ideas?

Thanks,

Craig
 

Attachments

  • Programmer.gif
    Programmer.gif
    9.6 KB · Views: 3,824
Ah, I didn't connect the Vss to GND on the PIC. I did that and it now worked.

Thanks again for the help guys.
 
I am not sure, but I think that you should connect pins 12 & 31 (Vss) to ground. Also, the 20k resistor is a "pull-up" -- to be connected to +5V (although this is probably not critical).
 
I am not sure, but I think that you should connect pins 12 & 31 (Vss) to ground.
Yes, connect ALL VSS and VDD pins.

Also, the 20k resistor is a "pull-up" -- to be connected to +5V (although this is probably not critical).
This IS critical. It must be a pullup. If you pull it down the PIC is in reset and halted. Nothing will happen until that MCLR pin gets pulled high. The only reason it works at all is that the PICkit 2 is connected and controlling it (overriding the pulldown).
 
Last edited:
Well seems the outage screw up all the uploaded attachments, hate when that happens!

-BaC
 
Yep it's me doesn't work in FireFox now, just in IE..damn this computer...sorry about that should have checked first!


What do you mean?
 
Last edited:
OK so do to the pullup I need to attach the 20k resistor between the Vdd (5V) and the MCLR - thats what a pullup is isn't it?

Thanks
 
Just for completeness here is the final circuit to program the PIC16F877A (in my case) from the PICkit 2 for anyone interested in doing the same.

Cheers,

Craig
 

Attachments

  • Programmer.gif
    Programmer.gif
    10 KB · Views: 508
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top