Most of my electronics experimentation so far has been with a smallish breadboard, which is pretty handy for putting together simple circuits very very quickly (ok, quickly apart from bending up new wire links which is tedious, but at least you can reuse them). On the other hand, I'm now wanting to experiment with my PIC chips, and the first one I can really work with is the PIC16F873 (much much easier for me to program ATM- for one thing there's a woeful dearth of PIC programming software for Linux, and most of what there is either doesn't work with my programmer circuit or doesn't work with the other PIC chips I bought; I intend to sort that out after I've worked with this one).
Unfortunately, for various reasons that particular PIC chip would not really work well plugged straight into the breadboard (for starters, it's half as long as the board, which is a bit of a problem). And yet it remains the sort of chip that would be nicely suited to general experimentation and prototyping etc. So my plan, is to make a small stripboard-based circuit which holds the PIC chip itself and fulfills the various requirements that it needs to work (described later). Then the ordinary I/O pins that would usually be all you want to work with for a project, are brought out to either a header or a SIL socket or just a bunch of wires soldered in (the latter option would be kinda inflexible though).
Then, whatever pins you want to use for a project, you connect straight to where you want them in the breadboard circuit, and don't have to worry about whether the PIC itself has everything it needs to work, nor about pins you don't want to use interfering with random parts of the circuit that happen to be in that part of the board.
The initial version described here will probably suck quite badly, but the idea is just to get started. And I'm putting the page up partly for querying the PIC forums about whether it seems reasonable, partly for notes for myself, and partly for any other newbies that might find the design worthwhile. So it's a bit long. For the benefit of those other newbies though, I'll point out that the PIC 16F873 is apparently pin compatible with the 16F876 (the latter just has more memory). I'm not sure if they're also pin-compatible with the 873A and 876A chips though.
I mentioned that the PIC chip has various requirements. These include (I may have forgotten some):
Version 1 of the Experiment Board
I also drew it before I thought very hard about the !MCLR problem, so it shows it set up to give a reset button. I guess it might still be compatible with the programmer when the switch is open, if the resistor is big enough, but otherwise I'd probably replace that part with just a jumpered link to Vdd.
Supply pin detail
This version features two bypass capacitors- one for each ground pin. That might be overkill, I really couldn't say. If only using one capacitor, then where should it go? The one at the top right of the diagram would be mechanically sound but a bit far from the other ground pin. One between the DIL rows (like the one shown or positioned higher up) should be electronically better, but mechanically awkward, having to be on the track side of the board. Apart from the question of it making the board need feet to prevent it sitting on the capacitor, it could be somewhat tricky to solder.
As the message from people in the Microchip forum seemed overwhelmingly to be along the lines of "don't sweat the small stuff", I'm going to take the approach of using just the one capacitor on the component side of the board, and then adding in another on the other side later if troubles seem to crop up. As the PIC goes in a socket, I should be able to take it out again when I do the soldering.
The usual value chosen for bypass caps seems to be around 100nF- and I'm going to choose exactly that, because I have no other sizes of ceramic capacitor above 10nF but that. I have a bunch of poly film caps at 68nF each, but their leads are too far apart for these tracks. Actually, the 100nF's leads are really at a 0.2" pitch rather than 0.1", so even they will be quite awkward to fit...
In fact, in the course of writing this I've realised that I can only just about fit these caps in diagonally if I want the pins to go in adjacent holes. Trying to get them into horizontally adjacent holes would contort the leads of the capacitor far too much. So in fact, I might as well just put the cap on the bottom of the board after all! Hopefully it won't be a problem.
Note that the wire link connecting the ground pins together, is on the component side of the board, where it lies just under the DIL socket- so it can't be too thick. It might even be worth trying to cut a tiny bit of a groove into the board to help recess the wire, but that might be too much bother.
The diagram also shows on the left, the path that the link would have to follow if it was on that side of the board: if it went directly, it would almost certainly short to the Vdd track. Even if it went the way illustrated, it could easily short against the other surrounding tracks, as the breaks in stripboard are rarely very wide. And no, insulation on the wire would not really work out here- the wire's too short, and the solder would be right next to the insulation. You'd simply end up with a rubbery mess and a short.
So I picked a 68pF capacitor to be reasonably fast but not too unstable, and a 4K7 resistor even though that's sorta pushing what they recommend, because the next higher I have past that would be 10K and that'd be pretty slow. The graphs suggest, based on the figures shown for values around the ones I chose, that this might give a clock speed of about 2MHz. If it was simply 1/(R*C) Hz, then it'd be about 3.1 MHz instead. Either way, this is fast enough to be comparable to the standard processing speed of most PICs, and slow enough that there's little risk of overclocking it (the 873 can go up to 20MHz).
Last edited: Thursday August 10th, 2006