Full picture
5

Clock circuit

5.1 Overview

The clock in a computer plays a major role: it generates the heartbeat of the CPU and all components related to it. It determines how fast the CPU will execute instructions and so how fast other components should reply to each memory or I/O request made by the CPU.

5.2 Hardware description

Zeal 8-bit computer uses an active oscillator, referenced X1. It is a standard 4-pin squared oscillator, its footprint is as followed:

Oscillator footprint
Oscillator footprint

It outputs a square-wave signal at 10MHz, with a 50% duty cycle. In other words, the signal goes high and then low for the same amount of time: 50 nanoseconds. Thus, the period of the clock is 100ns.

Clock signal
Clock signal period

What determines which frequency to choose depends on the components themselves. In the case of Zeal 8-bit Computer, the CPU is marked to handle up to 10MHz, but this is not enough, it also means that the logic glue, the MMU, the RAM, and the ROM should also be able to reply to the CPU within 100ns. The Z80 does present a way to interface slower components with ~{WAIT} signal, but it is not used in our case. More about this signal in the section dedicated to the CPU.

This clock signal goes to three components: the Z80 processor, the Z80 PIO, and the 50-pin extension port.

5.3 Underclocking and overclocking

Replacing the active oscillator with a lower-frequency oscillator is possible, it is called underclocking. However, keep in mind that the whole system will be slower, because the clock period will be longer, and so, each instruction will take more time to execute. One benefit from it however is that the components on the boards will have more time to reply to a memory or an I/O request, so it would be possible to use slower components.

Symmetrically, replacing the active oscillator with a higher-frequency one is called overclocking. While it is often possible to do it with slightly higher frequencies, 11MHz or 12MHz for example in our case, it is highly not recommended. The computer can simply fail to boot because the components like the RAM or MMU cannot reply fast enough to the CPU, but it can also get the CPU to get warmer than usual and also increase its temperature.