Main Content

Raspberry Pi to Z80 interface

Connect a Z80 CPU to your Raspberry Pi and run machine code on it!

This project aims to create a Z80 to Raspberry Pi interface which will be used to map out and run use-case scenarios on the Z80 CPU. This will allow us compare real world results against subsequent emulation code. This document will describe the hardware, software and Python code required to interface directly with a Z80 CPU. An Intel 8080 compatible Z80 was chosen for its widespread adoption, excellent documentation and relatively simple 40-pin IO package. I will utilise a Raspberry Pi with multiple MCP23017 GPIO extenders to connect directly to the CPU and interact with it at the Logic level. I will also provide a Python script to send machine code to the CPU, handle RAM and external connectivity.

· To be able to interact directly with the Z80 CPU at the machine code/Assembler level.

- The interface should be able to pass machine code to the CPU and receive & store the results in pseudo RAM.
- We should be able to compare the status of the CPU with subsequent emulation code. I.e. be reusable.
- Be able to pause and resume execution.
- No specialist prototyping equipment is to be used. The hobbyist should be able to re-create this project.
- We should have good visibility of the CPU, i.e. address and data bus status.”

Link to article