An Easy to Build Real Homemade Computer: Z80-MBC2!




Introduction: An Easy to Build Real Homemade Computer: Z80-MBC2!

About: aka SuperFabius

If you are curious about how a computer works and interacts with "external things", nowadays there are a lot of boards ready to play like Arduino or Raspberry and many others. But this boards have all the same "limit"... they hide the inner part because they use a MCU (Micro Controller Unit) or a SOC (System On Chip) so you can't touch the CPU, I/O, the internal bus and all these stuff that are what makes a computer work.

There is an other option using some older part as 8bit CPUs (the so called "retrocomputing"). They are simple to understand and you can find a lot of documentation and books for free, and allow to build real computers with all the needed function blocks (CPU, I/O, RAM, ROM/EPROM, etc...).

But generally they use hard to find parts, and require outdated instruments like an EPROM programmer and eraser or a GAL programmer, and simpler ones have very limited features.

So I've mixed old and "new" parts to make an unique design that doesn't need any legacy EPROM programmer or fancy ICs, using easy to find components. The Atmega32A MCU acts as an I/O subsystem, "emulating" the EPROM and all the I/O components. More, using an Arduino bootloader, It can be easily programmed with the well known Arduino IDE.

The needed ICs are:

  • Z80 CPU CMOS (Z84C00) 8Mhz or greater
  • Atmega32A
  • TC551001-70 (128KB RAM)
  • 74HC00

If you want the 16x GPIO expansion (GPE option) add a MCP23017 too.

The Z80-MBC2 has a multi-boot capability and can run CP/M 2.2, QP/M 2.71 and CP/M 3 (128KB banked memory supported), so you can use a very large amount of SW with it (e.g. you can easily find Basic, C, Assembler, Pascal, Fortran, Cobol compilers, and some of these are already provided in the virtual disks on the SD).

Hard Disks are emulated using a microSD FAT16 or FAT32 formatted (a 1GB microSD is enough), so it is easy exchange the files with your PC (16 HDs for every OS are supported) using cpmtoolsGUI .

Of course you need a terminal to interact with the Z80-MBC2, and a common USB-serial adapter together with a terminal emulation SW will be a cheap and simple choice.

Step 1: Components and PCB

First thing is find all the components to build the board. I've prepared a file (A040618 BOM v2.ods) with all the needed components that you can easily find. Of course a basic skill is required, and it is supposed that you are able to find components "around"...

About the PCB I've prepared an "easy link" to order a small batch (5 pcs. min.) of PCB here.

Step 2: Modules You Need Too...

You need also to buy (if you haven't) some common cheap modules (see photos):

  • An USB-Serial adapter;
  • A microSD module;
  • A DS3231 RTC module (optional);
  • An USBasp programmer (to flash the Arduino bootloader into the Atmega32a);
  • An AVR 10pin to 6pin adapter (optional).

Step 3: Build the Board

To build the board follow the Assembly Guide (A040618 PCB Layout with the position of the components on the PCB (with both the parts references and the values). Also the Schematic (A040618 - SCH.pdf) will be handy.

Start to solder the thinnest components like resistors and diodes, then the ceramic capacitors and so on. The connectors and the electrolytic capacitors will be the last ones.

Step 4: Install the Arduino IDE and "MightyCore"

To load the Arduino "sketch" into the Atmega32a, you need to install the Arduino IDE and the "MightyCore" from here using the Arduino IDE "Board Manager".

In this way the support for the Atmega32a will be added to the Arduino IDE, and you will be able to select the Atmega32a as target device (see photo).

Remember to select the other options as in the photo.

Step 5: Flash the Bootloader

To make the Z80-MBC2 operative you need to flash the Arduino bootloader into the Atmega32a.

This will enable you to compile and load the Sketch into the Atmega32a using the Arduino IDE.

There are many ways to flash the bootloader. The way I suggest is to use a cheap USBasp programmer and burn the bootloader using Arduino IDE.

To connect the USBasp to the ICSP connector of the Z80-MBC2 you can use a common 10pin-6pin adapter (see the photo).

Remember to disconnect any other connector when using the ICSP. Also both SD and RTC modules (if present) must be removed from the board when the ICSP port is in use.

More info on this step can be found here.

Step 6: Load the "sketch"

Now is time to load the sketch into the Atmega32a using the Arduino IDE. For that you need to connect the USB-serial adapter (see photo) to the SERIAL port (J2) of the Z80-MBC2.

You must connect the GND, +5V/VCC, DTR, TXD, RXD pins of the USB-serial adapter and the SERIAL port of the Z80-MBC2.

Now unzip the sketch zip file "" into a folder, compile it and load it with the Arduino IDE..

Step 7: Add the SD and the RTC

Now unzip the SD zip file "" into a FAT16 or FAT32 formatted microSD (a 1GB microSD is more than enough).

Disconnect the USB-serial adpter from the PC, and add to the Z80-MBC2 the SD module (with the microSD inside) and the RTC module (if you have it).

Pay attention to install the modules exactly as shown in the photo, because they aren't "swappable" in their positions, and permanent damages may occur if you exchange them!

Now you are ready to run the Z80-MBC2 using the USB-serial adapter and a terminal emulator!

Step 8: How Enter in the "Select Boot..." Menu

To enter in the "Select boot mode or system parameters" you must press the RESET key (SW2), release it and press immediately the USER key (SW1) and keep it pressed until the IOS led starts to blink.

An other way is to press both keys, release the RESET key holding the USER key down until the IOS led starts to blink, or you see the menu on the screen.

Step 9: More Info...

You may find more info and technical details about the Z80-MBC2 here.

Electronics Tips & Tricks Challenge

Participated in the
Electronics Tips & Tricks Challenge

9 People Made This Project!


  • For the Home Contest

    For the Home Contest
  • Big and Small Contest

    Big and Small Contest
  • Make It Bridge

    Make It Bridge



6 days ago

I was making a shopping cart on Digikey, but I can't find any 16MHz Thru hole HC-49V crystals, just S, U and US. Arrow, Newark and Mouser all had a range of HC-49 packages, but not the V type. Is there a package I can substitute ?


Question 3 months ago

Is there an article on how the software works?

In particular:
1) Use of Busreq- to force data into Z80
2) generation of clock pulses
3) the use of T count for Z80 instructions: LD HL,value ; LD (HL), n ; JP aaaa; INC HL
4) the consequence of a non-continuous clk on Z80.
5) The iLoad boot process, Z80 code in Flash, the Intel Hex loader
6) Description of the available Z80 i/o functions emulated on Mega32
7) Interrupt vs non-interrupt I/o emulation on Mega32 IO processor
8) Z80 interrupt modes supported on mega32 IO processor



Question 3 months ago

Is there any test software available?
The mega32 is working fine and the menus. However, the Z80 does not appear to work.

1) Test DMA to databus mega routine to count on databus D0-D7
2) Toggle control bits: RESET-, WAIT-RES-, INT-, RAM-CE2, BUSREQ-
3) Set Bank bits: 00 - 11
4) display state of i/ps: USER, INT-, BUSREQ-, RD-, WR-, A0, WAIT-
5) Single pulse Z80 clk
6) force instruction to Z80
7) Z80 JP addr



Question 1 year ago

I don't manage to communicate with the board! Using putty at 9600 bauds, 8 bits,... I receive some 550 (?) characters , but It is gibberish! I replaced both processors, still same thing! Any idea?


2 years ago

Pretty cool idea and a well-written tutorial! Bravo!


3 years ago

Can You make a video series please?


3 years ago on Step 9

Cool project!
My idea was very similar. Low chipcount, an atmega chip for eprom emulation, I/O, especially serial communication, for control this small computer.
The port expansion is a brilliant solution (this (mbc2) is better than previous one).
I'm ready to build and I will restructure it with a little +.
Thanks for sharing.. It's a worth!

Flexible solution for home or industrial automation, etc..
Im just waiting for PCB now..

PCB arrived!


4 years ago

I made RC2014 mini, a Grant Searle 7 chip z80 simple computer (universal pcb and lots of kynar), and now i ordered pcb's for z80-mbc2. Z80 cpu is my new love :)


4 years ago

Beautiful, lookin forward to designing my own Z80 computer soon


4 years ago

...we build our own computers, the homeschool family! (clap clap)
That's an Adams Family parody that came to mind when I saw this.