Building a computer from scratch!

James Bray
17 Sep 2021

I had an interest in electronics long before I had written a single line of code. Over the years I had built many small electronic kits, but in my final year at university, I was looking for a challenge. I remember seeing a YouTube video showing the process of making a simple single-board computer with just 8 Chips. After finding the schematics online I decided to bite the bullet and head to eBay to buy some parts.

Hardware

I decided to construct the circuit on Veroboard as I had some lying around. I already had all the passive components (resistors and capacitors) and wire in storage. So all I had to buy what the chips. As I only needed small quantities of components, eBay was the best option.

The RAM and ROM were easy enough to find. As, surprisingly, was the CPU for a chip released on to the market in March 1976 new ones are still been made, the date code on mine indicates that it was manufactured in 2016.

Z80 Ad from 1986
Z80 Advert from 1976

The only chip not still been manufactured was the 68B50 Asynchronous Communications Interface Adapter. This component is responsible for the serial interface with the PC. For this, I had to look at the seedy world of second-hand chips and indeed the first one I received was DOA.

Construction took around a week on and off with writing my university dissertation and at the end of it I had a completed circuit on a single piece of Veroboard.

And after all let's have a look at the specs...

  • Z80 CPU Clocked at 7.3728MHz
  • 8K ROM
  • 32K RAM
  • 115200 Baud serial interface over USB

So it's not the fastest thing in the world, but that doesn't mean it's not versatile. Below are some pictures of its construction.

Software

With the machine build it was time to run software on it. However, before we could it was necessary to write a small BIOS and operating system onto the ROM (Read-only memory) chip.

When the Z80 is reset after it receives power the first thing it does is reads an instruction from address 0x0000. From there, the 68B50 is sent some commands to initialize, a stack is setup and then we jump into the boot loader. It's important that this happens every time the machine boots so we burn this small program (Around 8K) onto a chip on the board that is preserved between power cycles. To do this an EEPROM programmer is used, but at £50+ the price was prohibitive. So I build my own from a £3 Arduino nano, a cheap breadboard, and some wires.

First Program
The best photo I have of the breadboard EEPROM programmer

After a lot of wire jiggling and even more luck, Success. Then after some final checks, discovering the aforementioned faulty chip and a dodgy socket. We had first boot!

First Program
My first BASIC program

In a later article, I'll discuss what it's like to program and use.

You can try out my SBC for yourself using its online emulator.