Building a Crystal Oscillator for a Z80 Computer

Published: 28 October 2026

The finished crystal oscillator board

This year I started exploring electronics by building a simple Z80 computer. The CPU needs an external clock, so the oscillator became my first project. I chose a 3.6864 MHz quartz crystal. It took me several weeks to get a working circuit, move it from a breadboard to a soldered prototype, and make my first PCB.

Circuit and components

Bill of materials:

I got the clock circuit from RC2014 and modified it a little bit. Here is the final schematic:

Scheme

Getting a clock signal

I first assembled the circuit on a breadboard and tried different capacitor values. I connected a USB logic analyzer to the output to inspect the clock edges.

First breadboard prototype connected to an Arduino and logic analyzer

The first breadboard prototype, with an Arduino Uno and logic analyzer in the test setup.

An early capture showed irregular pulse widths because of the wrong capacitor values.

Early logic-analyzer capture with irregular pulse widths

After trying different values, I settled on 22pF capacitors. The captured edges became regular. For a sample of 55 cycles, the analyzer reported a mean of 3.682 MHz.

Regular clock edges and a short measurement of 55 cycles

For a larger sample of 1,593 cycles, it reported a mean of 3.686 MHz, close to the crystal's nominal 3.6864 MHz.

Longer measurement of 1,593 cycles with a 3.686 MHz mean

From breadboard to soldered prototype

Once the circuit was running, I soldered a version onto a perforated board and checked it with the same logic analyzer. These photos show the test setup, the component side, and the wiring underneath.

Testing the soldered prototype

Testing the soldered prototype with the logic analyzer.

Component side of the soldered prototype

The component side of the perforated board.

Wiring on the underside of the soldered prototype

Point-to-point wiring on the underside.

Making the PCB

I then laid out a small single-sided board in KiCad. I transferred the printed traces to copper, etched the board, drilled the holes, and soldered the parts.

PCB layout in KiCad

KiCad PCB Editor.

Board after etching

The etched board, ready for drilling and assembly.

Soldering the PCB

Soldering the new PCB.

Finished PCB, component side

The finished PCB, component side.

Finished PCB, solder side

The finished PCB, solder side.

The finished board may look a little rough, but I think it's a good result for my first homemade PCB.

With the clock circuit built, I can move on to the next part of the Z80 computer: a ROM programmer.