home   |   primer index   |   1. Intro: Why 6502?   |   2. addr decode   |   3. mem map req.s   |   4. IRQ/NMI conx   |   5. 74 families & timing   |   6. clk gen   |   7. RST   |   8. mystery pins   |   9. AC performance construction   |   10. exp bus & interfaces   |   11. get more on a board   |   12. WW Q&A   |   13. custom PCBs   |   14. I/O ICs   |   15. displays   |   16. getting 65xx parts   |   17. project steps   |   18. program-writing   |   19. debugging   |   20. pgm tips   |   21. workbench equip   |   22. circuit potpourri

6502 PRIMER: Building your own 6502 computer

Construction: Avoiding AC-Performance Problems

All links verified or updated 12/13/20.

#1:  Yes, number one!  Avoid plug-in (solderless) breadboards for this kind of work!  These are the worst of all worlds for computer performance.  They require the connecting wires to be the longest of any method (meaning most inductance), have extra capacitance between neighboring tie points, and there's no chance of getting anything even remotely resembling a ground plane.  (And no, a piece of sheet metal underneath, connected to ground, does not qualify.  Not at all!)  Unfortunately people insist on using solderless breadboards for computer construction, and we frequently find the resulting problems reported on the forum with pleas for help to figure it out, when the builder has the connections right but the solderless breadboards' stray inductance and capacitance are keeping his circuit from working.  It causes so much grief, yet the builder has a hard time believing that that's the problem!

If you really must use solderless breadboards, then at least put a lot of extra power and ground wires across from one breadboard to its neighboring ones, not just at the ends but divide the length of the breadboard into three or four, and put wires at the divisions, to shorten the ground return paths for the various signals.  A major cause of problems is connecting them like a neighborhood of cul-de-sacs:

If the resident of the house at the end of the cul-de-sac below the middle of the picture wants to give back a tool borrowed from the neighbor right behind him on the next street and had to take the streets rather than just hand it over the fence, it'd be a long route.  On breadboards whose power and grounds are only connected at the ends, the loop area enclosed by that long path must be charged up with an electromagnetic field, and that takes energy and time, and with capacitive effects it will set up more ringing and groundbounce, and it will also have unwanted effects from coupling into other wires too.  (Keep in mind that the wires really only direct the energy rather than carrying it.)  A grid of "streets" works better.  Jeff Laughton (forum name "Dr Jefyll") applies this to solderless breadboards in a post here.

Keeping the connections short makes a big difference.  In this post, forum member "tmr4" shows pictures of two solderless breadboard layouts he did, having done the second one much more compact after the first one was giving him trouble at higher speeds, and says the second one worked at 10MHz whereas the first only only got to 2MHz.  AIUI, they are schematically the same.

#2:  Do not run the processor's own buses off the board (as for an expansion bus) unless you plan to never go over a couple of MHz.  This is expanded on in the next section, Expansion Buses and Interfaces.  (This forum topic, also mentioned elsewhere here, discusses getting good high-speed performance, and, on page 2, taking advantage of synchronous serial interfaces as much as possible.)

#3:  An actual custom PC board is best, preferably a multilayer with a ground plane (no, pours & fills don't qualify—they're pretty worthless for this kind of work).

This section could be huge; but I'll just refer you to the links at the bottom of this page, and here only make this comment about VDD trace width, since someone just asked me about it.  For cost-sensitive situations where someone feels limited to a 2-layer board, I frequently see recommendations to make the power traces super wide.  This has been very much overemphasized and misunderstood.  It's hard to get the myths to die though.  Resistance is not the problem, and an .008"-wide (0.2mm) trace can handle 500mA with ease.  The real enemy is inductance, and making a trace wider on a 2-layer board with no ground plane has very little effect on its inductance.  Doubling the width of a 2"-long trace on 1oz copper, from .010" to .020", only brings the inductance down about 10%, according to this flat-wire (trace) inductance calculator.  IOW, it has almost no effect.  Wanna go wider?  If we widen it from .010" to .050", ie, multiplying the width by five, the reduction in inductance is not even 25%.  Bypass capacitors at each IC will reduce the need to minimize VDD trace inductance anyway, and the ground connections will handle much of the signals' return currents.

So if you're limited to two layers, it might be best to route a nice grid of ground connections, so there's the least impedance from the ground pin of any one IC to the ground pin of another IC, then get the bypass capacitors connected with the shortest practicable connections from each IC's VDD pin to its ground pin (which might mean putting them on the back of the board, under the IC).  Then route all the signals, and then sew-in a VDD grid with the room that's left.  An autorouter won't have the intelligence to do a very good job at that; so I would do the ground and VDD connections by hand.

I should get into power planes next, because they're usually not done right.  Do see the many links at the bottom of thie page though.

#4:  Otherwise, use wire-wrap.  Admittedly, wire wrap (WW) supplies have become more expensive since I originally wrote this (as they've lost the economy of scale); but WW gives good density and lets you get parts close together so the connections are short and relatively straight, improving AC performance.  Here is the bottom of my primary workbench computer:

bottom of Bench-1

and of a small Commodore 64 expansion board I made in 1997:

bottom of C64 expansion board

These don't have any plane (and from the oscilloscope displays of waveforms with lots of ringing, the larger, faster board above could sure use one), but it would be all the better if you have at least a ground plane, which you can get inexpensively with protoboard like Twin Industries' 8100-series boards (see this page and click on "8100 Series Plated Through Holes - Single Power/Ground Plane," if not also a Vcc (or VDD—same thing) plane (ie, a power plane) which you can get inexpensively with their 8200-series boards (see the same page, and click on "8200 Series Plated Through Holes - Dual Power/Ground Plane"), shown here:

Twin Industries double-plane protoboard

To make the ground plane work for you to best advantage, before you start wire-wrapping an IC socket, connect the ground pin(s) to the ground plane immediately around it by soldering a tiny piece of wire, or a tiny washer if you can get the right size (I think Vector used to sell them), from the base of the pin to the plane around it so the total hop is less than 1/16".  Having longer pieces of wire to make it easier will partly defeat the purpose.

If you go for a power plane (on the component side of the board) in addition to the ground plane (on the wire side of the board), it gets a little trickier.  Probably the best for performance (but hard to do) is to put a strand of wire through the hole before putting the socket in, and solder the strand to the power plane without getting solder in the hole itself.  The strand needs to be small enough that the socked pin will still fit in the hole with it.  After the socket is in, you can solder the strand to the pin (which will then fill the hole with solder) and cut the end of the strand short, or leave it long enough to wrap with the wire-wrap tool.  Keep the solder off the upper part of the pin so you will be able to wire-wrap it later if necessary.

Next, add the wires that distribute the clock signal, before you do the other wires, so that you can make the clock-distribution wires lie flat against the ground plane, rather than elevated somewhat.

You may be asking, "So what's this about groundbounce and other potential problems?  Do I need to worry about it?"

I see a lot of ringing and groundbounce on the oscilloscope with my home-made computers so I know it doesn't take 50 or 100MHz to run into trouble.  What I get is pretty astonishing, and I don't think the rise and fall times could get much faster without bringing orderly operation to a halt.  Note that rise and fall times do come before actual clock frequencies in this regard.  Jack Ganssle's YouTube video, "I Only Probed the Board With a Scope - Why Did My Board Crash?," the part from about 2:20 to 3:00, graphically shows on a high-end oscilloscope that the ugly ringing remains unaffected as he turns the clock frequency up and down.

When I built the one shown above, I did not yet know as much about high-speed digital (or what might be "high-speed" for this type of construction), even though I worked in the mid 1980's in applications engineering at a company that made UHF and VHF power transistors.  (I also initially used slower parts and a lower clock speed on the workbench computer.)  My next, faster one, if not on a multilayer PCB, will be built with PLCCs instead of DIPs, on perfboard with power and ground planes and thru-plated holes.  See the list of links below for explanations.

Reduce your home-made computer's chances of trouble by keeping the parts close together and the wires as short as possible.  Put IC sockets right up against each other with almost no room between them.  For home construction, go for a board no more than 6" (15cm) square (at least the part that is used for the processor's immediate buses).

If you don't have a ground plane, it's good to put a power-and-ground hub in the middle, with a star-type arrangement connecting all the ICs' power and ground pins to the distribution area in the center, then in addition, also daisy-chain them to get short power and ground connections between the various ICs, not just to the center, kind of like a spider web.  Also put a .01µF capacitor across each IC at the power and ground pins with leads as short as possible.  It should be monolithic ceramic or multilayer ceramic.  Things like the temperature coefficient won't really matter for this application.  The distribution area in the center will have such capacitors from +5V to ground as well as a tantalum, or better yet, an OS-CON capacitor.  OS-CON capacitors' high-frequency impedance is much, much lower than electrolytics'— even lower than tantalums'.  OS-CON (Organic SemiCONductive electrolyte) is a capacitor type made by Sanyo and a couple of other companies.

If you later want to get into higher speeds, I strongly recommend this sticky forum topic ("Techniques for reliable high-speed digital circuits") for the why's and how-to's, with a load of links.  Additionally, and partly included there:

    Note 5/4/19: The Fairchild ap. notes went offline after ON Semi took over Fairchild; but I requested that they put them back up, and they did so and sent me the new links, which are below.

If you want to go further in understanding the matter of PCB transmission lines, layering, the importance of the return current's path, etc., here are some more videos I came across.  They're long, but helpful.

(and of course after you've watched one or more, you'll get suggestions for related videos down the right side of your screen.)

mystery pins <--Previous   |   Next--> expansion buses & interfaces

last updated Mar 2, 2022