40-pin ( PIC 16F887 ) DIY Protoboard

Francesco has a love obsession with his 16F887 and as we’re developing tutorials it was clear I needed to be ready to work with this product. My solution was a very basic development I put together from stuff lying around the bench.

An overhead shot of the breadboard. Note that the resistor is on PIN 1 pulling the /MCLR pin up out of reset. the /MCLR pin is also connected to the ICSP connector for programming purposes.

An overhead shot of the breadboard. Note that the resistor is on PIN 1 pulling the /MCLR pin up out of reset. the /MCLR pin is also connected to the ICSP connector for programming purposes.

Tired of DIY circuits with obscure parts? Me too.. this is a simple one and everything will be readily available. I used an Adafruit Perma-Proto Breadboard. This PCB is laid out just like a breadboard but you solder it. Their perma boards are handy for projects like this were you have something simple enough for the breadboard but want to keep it permanent. Radio shack has smaller ones for smaller circuits. I used the Minty version of the Perma board because I had a bunch on hand but their 1/2 size board should work fine for you. I also recommend a 40 pin DIP socket so you can use this for other microcontrollers, and perhaps a 0.1uF bypass capacitor. I scored some snap-away 90 deg 2.54mm headers from eBay for the ICSP (6 position). They are $2 with shipping or source them from a local supplier if available. I use my PICKit3 to program; if you’re using something else you may want to customize your own ICSP connection. I recommend putting headers on your board which I did not, but this will make connecting item to it easier in most cases.

Just in case I haven’t sold you on this, there is a bonus! This board works with many of the 8-bit line of microcontrollers available in 40 pin DIP sockets, not all of them but many. Examples: 18F452, 18F4520, 18F45K20, 16F1519, 16LF1907, etc.

Step 1. Gather your parts (list at bottom of the article).

This is the bare minimum of parts required for the breadboarding of the 16F887. The socket could be left out but that's a poor idea.

This is the bare minimum of parts required for the breadboarding of the 16F887. The socket could be left out but that’s a poor idea.

Step 2. Wire parts to the protoboard:

Connections you need to ensure you make:

Pin 11 & 32 : Wire these to the positive (Vdd) rails (I also recommend connecting your rails together as I did.

Pin 21 & 31 : Wire these to the negative/common/ground (Vss) rails. (also connecting them together.

Pin 1 : Solder a resistor from Pin 1 to the positive rail. I recommend 4.7K to 10K. This is needed to pull your pick out of reset. You can optionally add a push button reset switch wired normally open from Pin 1 to Ground/Common.

Going to program this on a different board and don’t need a crystal? well you’re done..  I do like to ICSP if I can free up the ports easy enough so:

If you’re looking towards the pins as if you were the programming tool being plugged in, we will call the left pin Pin A, then to the right B, C, D, E and F.

Pin A will go to Pin 1 on the PIC (/MCLR).

Pin B  wire to Vdd rail (+5V)

Pin C wire to Ground/Vss

Pin D is the ICSPDAT pin and will go to the Pin 40 on the microcontroller.

Pin E is the ICSPCLK and will be wired to Pin 39 on the microcontroller.

Pin F is not connected to anything.

I use the internal oscillator most of the time but if you’re feeling a burning hurt to use an external oscillator check out Page 64 in the Microchip specification guide for the PIC 16F887 ( DS41291F ). I’ll give you a sneak pic of it embedded…

xtal

Step 3: That’s it, add headers and customize for your circuit! I recommend adding a ground loop attachment for a meter/scope probes/logic analyzer minigrabbers, etc.. see the photo below for an example:

I recommend putting in a sturdy ground loop for minigrabber yest leads to grab on to. You can power your board this was or just use it as a ground point with a meter of oscilloscope. I also use machined socket DIPs for cheap wire sockets on the boards. Shown is a DIP I've been cutting up to put in plugin jumpers on the board.

I recommend putting in a sturdy ground loop for minigrabber yest leads to grab on to. You can power your board this was or just use it as a ground point with a meter of oscilloscope. I also use machined socket DIPs for cheap wire sockets on the boards. Shown is a DIP I’ve been cutting up to put in plugin jumpers on the board.

In my first board I added an LED with current limiting resistor (270 ohm) so that I could have a “heart beat” LED on my test circuit. This is a quick indicator that your oscillator is working and you have power.

My first protoboard with some "extras" .. I put a 47uF capacitor across the rails and a 0.1uF bypass capacitor across the rails as well. Finally I added and LED w/ a current limiting resistor on a header so I could add this to any pin I wanted.

My first protoboard with some “extras” .. I put a 47uF capacitor across the rails and a 0.1uF bypass capacitor across the rails as well. Finally I added and LED w/ a current limiting resistor on a header so I could add this to any pin I wanted.

Bill of Materials:

  • Adafruit Perma-Proto Breadboard https://www.adafruit.com/products/571
  • Microchip PIC 16F887 Digikey P/N PIC16F887-I/P-ND
  • 40 Pin DIP socket (eBay <$1) You may consider a “ZIF” socket if you know you’ll be swapping microcontrollers every so often.
  • 10kOhm resistor (Radio Shack, your scrap bin, eBay..  look for 1/8th or 1/4 watt)
  • Headers (eBay or a local shop, pick something that works for you.. I used a machined DIP socket cut up)
  • 90 deg 2.54mm header — Something like Jameco p/n: 103271 though I got mine from eBay.
  • Bits of wire and the tools to do the job including a soldering iron, etc.

 

 

Print Friendly
Add Comment Register



Leave a Reply