• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
makerhacks-logo

Maker Hacks

Ideas, news & tutorials for makers and hackers – Arduino/Raspberry Pi, 3D printing, robotics, laser cutting, and more

  • Home
  • About
  • 3D Printing
  • Laser Cutting
  • YouTube
  • Free Arduino Course
  • Recommendations
  • Contact

Z80 on a Breadboard: Homebrew Retro Computer Part 1

You are here: Home / Electronics and Hardware / Z80 on a Breadboard: Homebrew Retro Computer Part 1
FacebookTweetPin
Author: Chris Garrett

How to make a homebrew z80 microprocessor computer on a breadboard – the best way to understand how things work at a fundamental level.

Z80 CPU running on a breadboard? – how very 1970s!

Creating a “Homebrew Computer” using the Zilog Z80 processor is a right of passage for a certain segment of nerds of a certain age, but since Ben Eater started his series on his 6502 breadboard computer a lot more interest has been generated in the whole DIY computer area.

In this video I present a variation on the most simple “test circuit”, just enough to ensure the chip actually works (many Z80 chips are actually recovered from recycled machines from the 1980s, and there are even clones sold online!).

To my shame, this video was meant to be the start of a series. Unfortunately I dropped the ball when our family had its life turned upside down (like many families out there over the last few years).

It’s time to return to this and see it through to the end for you all!

Homebrew Z80 Computer Options

There are a few options for getting a minimal homebrew Z80 working, ranging from the absolutely bare-bones hardcore “as they would have done it in the 70s” to much more convenient options, even some that don’t actually use real Z80 hardware.

Agon Light
Agon Light

In this series I will share my experience with several of them, and over on Retro Game Coders we will code up some programs and see how things are different, but I wanted to start with the setup I think most hardware fans will want to at least check out – The breadboard z80.

Breadboard Z80 with Arduino Clock

After I published the video above, I continued the project making an actual ‘useful’ retro computing machine, and I was able to program it in machine code, running from ROM. I laser cut a “front panel” with switches allowing full auto or instruction stepping, using programmable logic for address decoding etc.

All of this has gone astray during our move from Canada back to England so I need to recreate it.

z80 with rom and ram

I will share full schematics incrementally as I return to the experiment and rebuild.

Z80 Pin Diagram

  • A0-15: Address lines
  • CLK: Clock (rising edge trigger)
  • D0-D7: Data lines
  • +5V: Power
  • INT: Interrupt request
  • NMI: Non-maskable interrupt request
  • HALT (active low)
  • MREQ: Memory request (active low)
  • IORQ: IO request (active low)
  • REFSH: Refresh timing (active low)
  • MI: Maskable interrupt request (active low)
  • BUSRQ: Bus request
  • BUSAK: Bus acknowledgement (active low)
  • WR: Write (active low)
  • RD: Read (active low)

Symbols with the line over are active low but can be represented in many ways including / or ! in some diagrams.

Minimal Z80 Test Circuit

A Z80 will start running when supplied 5V and if reset is held low. It will look for the first operation instruction at Address 0000.

Here is what you need for just the minimal circuit to power up and see that it is operational:

  • 5v power and Clock (in my case, supplied by Arduino Uno – see code below)
  • Data lines held low (AKA NOP, or ‘no operation’)
  • Address lines connected to LEDs via resistors (not something you should do long-term as the z80 is not rated to supply much current via the pins)
  • Control lines set (see below).
Rails connected to 5v and Ground, with Z80 connected to ground, 5v, and control lines held High
Rails connected to 5v and Ground, with Z80 connected to ground, 5v, and control lines held High

Hooking up the “Test” circuit

z80 breadboard test circuit schematic
  1. Insert the Z80 and connect the Arduino Ground and 5v. Connect your breadboard power and ground rails.
  2. Connect the INT, NMI, BUSRQ, and WAIT on the Z80 to 5V, these are activated when held low.
  3. Connect the data lines (D0 to D7) to ground.
  4. Connect Reset to 5v.
  5. Connect LEDs to resistors and the address lines. I am using 1k resistors to limit the current on these fragile pins.
  6. Connect Clock (pin 6) to the Arduino pin 5. Optionally also connect an LED and resistor.
Z80 with just 4 address lines for illustration purposes
Z80 with just 4 address lines connected to LEDs for illustration purposes

Arduino Clock Code

Rather than use a crystal or even a 555 chip, my project uses an Arduino to control the clock. This has a lot of convenience, especially if later you want to mimic a ROM chip using the Arduino memory, but does have timing and speed challenges due to the way Arduino code works and the little 8 bit processors on them.

Connect the Z80 “Clock” pin and optionally, an LED on Pin 5.

Previously I used a library that allowed the Arduino to “multitask” called Eventually, but we are running at such slow speeds for these tests it was unnecessary, so here is the simpler code.

On start, the Z80 is reset using a wire on Pin 9, and then the Arduino will keep pulsing the clock on pin 5 with a delay of whatever you choose in the setting int speed = 500;

#define CLOCKLED 5
#define RESET_PIN 9

// Initialize the speed 
int speed = 500;
int steps = 0;

void sleep(int sleep_time)
{
  long start_time = millis();

  while(millis() < start_time + sleep_time)
  {
    // do nothing
  }
}

// Tick the clock
void toggle_clock()
{
  digitalWrite(CLOCKLED, HIGH);
  sleep(10);
  digitalWrite(CLOCKLED, LOW);
  sleep(10);
}


void setup() {

  // set up the pins and the event listeners
  pinMode(CLOCKLED, OUTPUT);  
  pinMode(RESET_PIN, OUTPUT);

  // initialize serial communication 
  Serial.begin(115200);

   // Reset the computer
  Serial.println("STARTING ...");  
  digitalWrite(RESET_PIN, LOW);
  sleep(5000);
  toggle_clock();
  sleep(speed);
  toggle_clock();
  sleep(speed);
  toggle_clock();
  sleep(speed);
  toggle_clock();
  sleep(speed);
  digitalWrite(RESET_PIN, HIGH);
  Serial.println("STARTED");  

}

void loop()
{
  sleep(speed);
  toggle_clock(); 
}


Next Steps

Currently we can see something is happening because we have LEDs on the address lines, but that only means the chip is looking to the bus. Really we should have more indicators to tell us what exactly is happening at each stage.

Even better, rather than just count up addresses we will want to do some actual instructions. For this we will need to hook up a button so we can step to the next program instruction, and we will need some ROM or RAM to store those instructions.

Check out Part 2 now.

Beyond the Z80

Ben Eater's 6502 breadboard computer
Ben Eater’s 6502 breadboard computer
6502

As well as the Z80, I also plan on using a 6502 processor, which was the chip family most-famously powering the Commodore Vic 20, C64, Atari, Apple II, and BBC microcomputers!

Like many people, I particularly enjoy Ben Eater’s videos, and despite already having everything I need, and have made a 6502 board before (not as good as his of course), I bought his kit to support his endeavours and encourage him to keep making great YouTubes!

If you want to dig into all the information around the z80 and how to get it running before my tutorials, or in addition to, there is an excellent resource at http://z80.info/

Another famously useful resource is Grant’s at http://www.searle.wales/

Please share if you have other recommendations, feedback, or ideas!

Category: Electronics and HardwareTag: arduino, raspberry pi, z80
FacebookTweetPin

About Chris Garrett

Marketing nerd by day, maker, retro gaming, tabletop war/roleplaying nerd by night. Co-author of the Problogger Book with Darren Rowse. Husband, Dad, ?? Canadian.

Check out Retro Game Coders for retro gaming/computing.

☕️ Support Maker Hacks on Ko-Fi and get exclusive content and rewards!

Previous Post: Makeblock mBot Ranger Robotics Kit Review
Next Post:Pico as Z80 RAM & RAM: Homebrew Retro Computer Part 2Z80 using Pico as ROM/RAM

Sidebar

  • Facebook
  • Twitter
  • Instagram
  • YouTube

Join the Newsletter

Sign up and get a free Arduino course + more!

Subscription Form

Recently Popular

  • xTool S1 Review
  • xTool P2 Review (first look)
  • IKIER K1 Pro Max Review
  • Gweike Cloud Review
  • How to choose the right 3D printer for you
  • Glowforge Review – Glowforge Laser Engraver Impressions, Plus Glowforge Versus Leading Laser Cutters
  • Flux Ador
  • Prusa i3 Mk3S Review
  • Best 3D Printing Facebook Groups
  • xTool D1 Pro Laser Cutter Review
  • Elegoo Mars Review – Review of the Elegoo Mars MSLA Resin 3D Printer
  • Glowforge ‘Pass-Through’ Hack: Tricking the Front Flap of the Glowforge with Magnets to Increase Capacity
  • How to Make a DIY “Internet of Things” Thermometer with ESP8266/Arduino
  • Wanhao Duplicator i3 Review
  • IKEA 3D Printer Enclosure Hack for Wanhao Di3
  • Creality CR-10 3d printer review – Large format, quality output, at a low price!
  • 3D Printed Tardis with Arduino Lights and Sounds
  • Anet A8 Review – Budget ($200 or less!) 3D Printer Kit Review
  • Make your own PEI 3D printer bed and get every print to stick!
  • Upgrading the Wanhao Di3 from Good to Amazing
  • How to Install and Set Up Octopi / Octoprint
  • Creality CR-10 S5 Review
  • Glowforge Air Filter Review
  • Thunder Laser Review

30 Days to Arduino

Arduino Tutorials
  • 3D Printing
  • CNC
  • Electronics and Hardware
  • Laser Cutting
  • News and Reviews
  • Software and Programming

arduino budget cad cnc diode laser glowforge Hacks Ideas laser cutter linux Makes making python raspberry pi resin Reviews technology tips xTool Lasers

.

Maker Hacks Blog Copyright © 2026 · All Rights Reserved · Privacy Policy