8-bit Breadboard Computer

by GilDev in Circuits > Electronics

7061 Views, 42 Favorites, 0 Comments

8-bit Breadboard Computer

GDBC-Isometric.jpg
GDBC-TopDown.jpg
GDBC-TopDown-Wiring.JPG

This is an 8-bit computer, made entirely on a dozen breadboards, mainly using 74LS TTL logic chips. It features an operating frequency from 0.5 Hz to thousands of hertz, 256 bytes of RAM, 16 instructions, an input keyboard and an output display.

I built it in order to learn more about computers’ inner workings and to have a visual piece to show people interested in learning more about how a computer works.

It was a really fun project and I learned a ton! I went all the way by simulating the whole computer in a logic simulator and then a CPU simulator, which proved to be very insightful.

Supplies

  • 12 long breadboards
  • 40 integrated circuits (details on the schematics)
  • 84 LEDs
  • More than 600 wires, hand-stripped and hand-bent (pliers may help)
  • Multiple common components like DIP switches, potentiometers, capacitors, 7-segment display…
  • Patience

Define the Architecture

Screen Shot 2022-06-18 at 14.09.48.png
Screen Shot 2022-06-18 at 14.11.07.png
Screen Shot 2022-06-18 at 14.10.31.png
Screenshot.png

I imagined the different modules that would make up my computer, which makes the 12-blocs architecture you can see here.

At the same time, I designed the instruction set I would like to have, which is made to be easily usable by hand, with simple instructions that allows to do anything I would like to do with it.

Then I had to make the microcode which links all the modules through the main 8-bit bus, passing data around until the operations of the instruction set are properly executed. Each instruction runs for some number of cycles (3 to 8 depending on the instruction’s complexity) which I call “steps” and consist of a number of microcode signals that have to be activated at this point in time.

I created the whole CPU of the computer in CPUSim, which allowed me to check that the instruction set would be suited to write proper programs.

Draw Schematics

1-Clock.jpeg
2-RAM.jpg
3-MARandIR.jpeg
4-ControlLogic.jpeg
5-PC.jpeg
6-Registers.jpeg
7-ALU.jpeg
8-Output.jpeg
9-Input.jpeg
Draft-Architecture.jpeg
Draft-ClockControlCircuit.jpeg
Screenshot.png

Next step was designing all the circuits and draw the schematics for each module. It’s easier to work on smaller parts, hence each module is designed, built and tested individually, before being assembled together to form the whole computer.

The logic is pretty straightforward, I tried making it as simple as possible, keeping only the necessary things for the computer to be useful. I added lots of LED everywhere so you can see at a glance the whole state of the computer, at any time.

I also drew all this out in Logisim, which allowed me to simulate everything and adjust the needed signals.

The microcode is made using two 28C16 EEPROM which are used as a boolean logic array, because for any set of input, the output is always the same. Without these EEPROMs, dozens of additional logic chips would have been needed, making the computer a lot bigger and more complicated!

Build and Assemble Modules

GDBC-ALU.jpg
GDBC-Bus.jpg
GDBC-Center.jpg
GDBC-Clock.jpg
GDBC-EEPROMProgrammer.jpg
GDBC-Microcode.jpg
GDBC-Output.jpg

I would say “now, onto the fun part”, but actually the whole project is fun. 🙃

Building was obviously pretty time-consuming: there are 40 integrated circuits, 84 LEDs and more than 600 hand-bent wires (I actually hand-stripped the wires with scissors, as I didn’t have a wire stripper and it’s actually a technique I’m pretty at ease with).

There is an independent breadboard used as my EEPROM programmer (used for the microcode as explained in the previous step). It uses an Arduino Nano with the attached program.

I had an unexpected issue concerning the ALU, the flags would have an erratic behavior from time to time. I bought an oscilloscope almost specially to troubleshoot this issue and it was worth it: I had some bounces on some lines near the flag register when the clock would fire, I added a few capacitors to smooth things out and had no issues since! Driving the LEDs directly from the ICs without using current limiting resistors is not the greatest of things, but was needed to have this build as simple as possible with the fewest components possible for the wished specs.

The clock module has a potentiometer to set the frequency from 0.5 Hz to around 500 Hz, it’s better to have it run slow, you can see all the pretty blinking lights this way. 🙂 There is also a button to switch from run mode to step-by-step mode, and another one to switch to programming mode.

Programming is done through the lower DIP switches on the RAM module: one to set the address, the other one for the value. Pressing the step clock button writes the value to RAM at the specified address.

Downloads

Make Programs

Screen Shot 2022-06-18 at 14.10.56.png

Time to make the computer do things! I created a spreadsheet to automatically assemble programs (convert them to binary machine code that can be entered through the DIP switches mentioned above), inspired by the Kenbak-1 programming sheets that I have used to create programs for my replica.

Here are a few sample programs I wrote to check the proper working of everything. The Input and Output modules are pretty useful to make interactive programs. I tested the programs beforehand in CPUSim as explained in the first step, it was easier to develop more complex programs this way, like the Fibonacci sequence calculation (see attached files).