Design Tips

I've just finished building my breadboard CPU, so here are some design tips that you might find useful.

  1. Try to spread your components out more than I did. I wanted to squeeze my design onto two breadboards, but in hindsight I wish I had left myself some more room. In particular, wires have to cross between chips, and having some room to do this is a good thing.

  2. Use a colour code for your wires. The colour code that I chose was:

    This helped me spot quite a few wiring mistakes. I think I only shorted Vcc to ground once!

  3. Bring your wires up vertically from the breadboard 2mm or 3mm before you bend them horizontally. This allows you to get to the holes underneath, and it also gives you a bit of "wiggle room" when many wires run in the same direction. I found this most useful on the 8-bit address bus wiring.

  4. Add 330 ohm voltage drop resistors to your LEDs. I thought I could get away with just plugging a LED into a chip's output and to ground. This pulled so much current that in a few places it lowered the voltage enough to stop a high bit from being recognised as such.

  5. You don't need all your chips facing in the same direction. I found that I could save some wiring by having some chips upside down.

  6. If you have some chips that you expect to move in and out (e.g. to reprogram ROMs), then make sure that you can do that. I had to spend half an hour rewiring the address lines as I had wired some lines over the top of the control ROMs.

  7. If possible, simulate your design first. I used Logisim to do the logic design, and I wrote a software simulator as well. This helps to shake out any design problems, and lets you test things before you start wiring. Mind you, it didn't stop me from forgetting that some of my control lines were active low and not active high!

  8. Have some test tools. The LEDs are fine, but I needed a multimeter to spot the voltage drop caused by the LEDs with my voltage drop resistors. I also used my Bitscope Micro a few times to diagnose an analogue problem in the 556 circuit.

  9. Draw a schematic and, if possible, lay it out as close to the final design as you can. I used Kicad to do this, and I redrew all the components as physical chips. Then I drew all the wires running horizontally or vertically, to show me where the breadboard wires were going to run.

  10. Test each section on its own if you can. I tested that my ALU worked first. Then I wired up the two registers, and manually put values into the registers and checked that the ALU produced the right output. Then I wired up the RAM, and used patch leads to force a write to RAM, and then checked that I could read back from RAM.

  11. Keep a journal of your progress, with ideas, conjectures, what you tested, what might be the cause of a problem etc. It really helps you crystallise your thoughts, and provides you with a record that you can look back on. I used it to as an aide-memoire as well.

  12. If you create files (design files, scripts, software etc.), then use a version control system (e.g. git) to track your changes and why you made them. There were a few times that I had to undo the changes I'd made, and a version control system makes this so easy to do.

  13. I bought many more components than I ended up using, mainly as my design changed a few times. I was happy to have a few extra things lying around. Example: I'm still waiting for a 74LS469 8-bit register/counter for my PC, but it is obsolete and the only place I could get it from sent it by slow shipping. Instead, I was able to use two 74LS161 4-bit register/counters with just a few design tweaks.

  14. I added some bypass caps to my design near the ground lines for each chip. Basically I followed this advice on-line: When, in the distant past, I used to do discrete logic designs, the rule was to put a 100nF ceramic by each chip and one 47uF electrolytic for every 6 to 8 devices. I'm not sure if it had any effect, but I felt it was a good thing to do.

  15. I wish I had bought smaller LEDs. Trying to put eight 5mm LEDs in a row when the breadboard pin spacing is 2.5mm is not fun. I chose to solder the LEDs to a pin header, solder their cathodes together and add a resistor to the combined cathodes.
That's about it for design tips!