Skip to content

Hardware

Vlad Todosin edited this page Sep 3, 2021 · 5 revisions

Overview

As the name of this project implies, the main component of this computer is the Z80 CPU. However, a CPU cannot function on its own and therefore multiple hardware components are required.

The CPU uses a 32K parallel EEPROM chip (see parts list below) and a 32K SRAM chip (as the name implies, this type of RAM is static and therefore doesn't require refreshing).

Unlike many CPUs from its era, the Z80 starts executing instructions from address 0x00, therefore the memory was organized as follows:

  • 0 - 7fff ROM
  • 7fff - ffff RAM

The A15 address line and the /MRQ signal are used to control the logic chips responsible for selecting between ROM and RAM. Conveniently, the Z80 has a separate I/O space and a separate signal pin (/IORQ) for communicating with I/O devices and therefore the system doesn't require any additional decode logic for I/O addresses.

The I/O is entirely controlled by the Z80 PIO, a parallel input/output device designed by Zilog specifically for their CPU. For simpler setups, there probably is a way of controlling an LCD display directly form the CPU data bus; however, controlling an LCD directly from the data bus can be difficult and would probably require the LCD to be used in a 4 bit mode.

The PIO chip handles both the LCD and the sound chip and will probably handle the keyboard as well. The sound chip could've been directly connected to the CPU as an I/O device, but that would've required additional I/O decode logic so doing it this way was easier - hardware wise.

Additionally, the ports of the PIO can be configured as either an input or an output by sending special control words to it, but that will be discussed in detail in the software section.

Parts list

In addition to these, you'll also need some passive components, such as various resistors and capacitors and preferably a button for resetting the CPU.

Main components:

  • Z80 CPU (Z84C0008PEC)
  • Z80 PIO (Z84C2006PEC)
  • 32K parallel EEPROM (AT28C256)
  • 32K SRAM (HM62256ALP)
  • SN76489AN (sound chip)
  • SN74HC00N (NAND gate)
  • 74HC04D (hex inverter)

Clock generator and divider:

  • 74LS04N (hex inverter)
  • CD4040BE (binary counter)

Sound amplification:

  • LM386 (low voltage audio amplifier)

The main purpose of this list is to help you get an idea on what you'll need. Equivalent components can also be used, there's no need to use specifically these parts. As I've said before, try to understand how your system works instead of blindly following schematics/instructions. As an example, when it comes to the clock, even a 555 timer will do if you don't plan on running your computer at higher speeds.

Schematics

The schematics of the system are available in the schematic directory. More information on how the memory switching works can also be found in the README file that's located in the same directory.
The main schematic includes the main components of the system: CPU, ROM, RAM and PIO. As stated before, the PIO is responsible for all communications between the CPU and sound chip/LCD. A schematic for those connections will be provided later.
The clock schematic can be replaced with any sort of circuit that can generate a square wave (even a button). Personally, when I first began testing this system I was using an Arduino and some simple code to generate a square wave. ICs like the 555 timer will also work just fine.