# How do I build a computer with a Z80 microprocessor?

I've got the chip, so how would I add: a clock, RAM, hard drive (maybe EEPROM?), a screen (LCD graphical screen?), input method (keyboard, mouse) ?

• What do you want to use it for? That determines your requirements. – stevenvh Mar 24 '12 at 17:56
• The Z80 genuinely was a very very very wonderful processor in its day, but its day is long gone. Unless you very very very specially want to and must use a Z80, don't do so. Use something else. Put your Z80 in your own private museum as a sample of a processor that made a large difference in the path to what we have now. – Russell McMahon Mar 24 '12 at 20:19
• I think you'll have a hard time finding a (cross)assembler or (cross)compiler that runs on a current PC, not to mention the peripheral chips, an EPROM and matching programmer that you require to get it running. I'd go for Arduino which has a lively community on Internet, loads of libraries for all sorts of hardware, developtment support for Linux and Windows. – jippie Mar 24 '12 at 21:41
• @jippie It's not hard, but it doesn't make much sense unless you are seriously into retrocomputing. There's sdcc as a compiler and Farnell lists all the Z80 peripheral chips as available, though the prices are rather steep. – starblue Mar 24 '12 at 21:51
• I have a Z80 running a darkroom timer I built in 1980. The timer still works, but it outlived my need to time exposures and chemical baths in a darkroom. It is still a working intervalometer, but I currently don't have a use for it. – Olin Lathrop Sep 21 '12 at 15:00

Don't listen to the others saying that the z80 is too old or too hard. The z80 was designed for this task. It's the oldest continually produced CPU around for a reason, it's easy to build computer systems with it. It's an excellent choice for your project.

There are some great books like "z80 microcomputer design projects" and "the z80 handbook" that will really help you out. Also, look at z80.info, they have a ton of information you'll want.

Your design goals are realistic. The hardest part will be the LCD screen, assuming you want to drive a VGA or NTSC display. But even that, once you get into it, is not that hard. That'll be a recurring theme you'll encounter in this project, things are much easier than you expected. Early microcomputers were remarkably simple machines, expecting you can duplicate them to some degree in 2012 is a very realistic goal. Aside from the custom sound and video chips, the rest of the machine is still available as off the shelf parts and easily understandable even as a newbie.

The simplest usable z80 system will have the z80 CPU, some flash memory or EEPROM you can get for free from old motherboards, ram and a uart for serial communication (plus a max232 for level shifting). All of this is available at any electronics distributor, are through hole components and can be built on a breadboard. The only special equipment you'll need is the flash/EEPROM programmer (which I built myself from an Arduino). Oh, and a few other things like some 74 series logic chips for address decoding, reset circuit, etc and a crystal oscillator.

Alternatively, you can replace the uart with a z80 pio chip to communicate with a modern parallel mode LCD character display. It won't really do graphics, but it's easy to use and your z80 can print things early on. A ps/2 keyboard will be rather simple to interface.

But anyway, the z80 is a good choice for your project. This might sound complicated, but in the end its just not all that bad. Build incrementally, start with the z80 test circuit, wire up a EEPROM so it can run some code and just build from there.

• The most critical part of the project will be coming up with some sort of eprom replacement to which code can easily be downloaded from a development PC; that's where things were primitive in the z80's era compared to today's microcontrollers with in-circuit-programming. Alternatively, if you get a serial bootloader validated (possibly with a bitbang SPI SD card interface "disk") and put it in an actual EPROM, you can easily use static ram for your code under development. – Chris Stratton Sep 21 '12 at 15:23
• To develop your code easly use an eprom emulator connected to your PC. Works like ICP. – user54389 Oct 1 '14 at 19:46

Luckily there's a book - "Build your own Z80 Computer" and although it's now out of print, the author Steve Ciarcia has generously allowed it to be distributed freely as a PDF: http://retro.hansotten.nl/index.php?page=z80-sbc

You might also want to take a look at the N8VEM Home Brew Computer project. It's a Z80 SBC (single board computer) that can run CP/M and can be built very cheaply - the PCBs are $20 plus shipping. There are now a variety of expansion boards available (S100 bus!) and there is knowledgeable & helpful community behind it all. But first of all, why not grab a handful of components and build up the minimal Z80 tester to make sure your CPU works - http://www.z80.info/z80test0.htm This just hardwire's the data and address lines to continually execute the same instruction (NOP) to demonstrate fundamentally, the heart of a working Z80 based computer. • Awesome links. Now I'm even tempted to try myself ..;-) – Cees Meijer Mar 26 '12 at 12:04 Indeed the Z-80 is an old chip, but it can be a nice challenge to build a computer with it. Unlike all modern microcontrollers it does not have many built-in features so you will have to add RAM, EPROM and address decoding hardware yourself. And this is exactly what they did many years ago when Tandy built the TRS-80. Just take a look at the original Model-1 schematics : http://electrickery.xs4all.nl/comp/trs80/doc/westHWBook.pdf • You start to respect what hardware is integrated into chips like ATtiny and ATmega when browsing through that document. I'll probably have spontaneous nightmares just from data- and address bus wiring. – jippie Mar 24 '12 at 21:58 • Apart from the Z80 itself, most of what was in the TRS-80 was due to the video section and the dynamic RAM interface. Also, the chip count was rather higher than it might have been b/c for some reason they used a lot of 16 pin 'hex' parts (e.g. 74LS367) instead of fewer, 20 pin 'octal' parts (e.g. 74LS244). My point being, you could probably clone a TRS80 rolling your own Z80. +1! – JustJeff Mar 26 '12 at 1:51 I've had the chance to build a couple of computers from scratch based on the Z80 microprocessor, namely a Sinclair ZX80 (an improved version) and the Jupiter Ace from the company Jupiter Cantab. Both work just fine and these machines make use of a keyboard and generate black and white pictures (at a resolution of 240 x 192 pixels) onto a TV set. More information on them: http://www.jupiter-ace.co.uk/ http://searle.hostei.com/grant/zx80/zx80.html A successor of the ZX80, the ZX Spectrum, does not only all of this but also has all kind of interfaces like IDE disk interface, floppy disk interface, and also for more modern storage media like USB pen drives or SD cards. My recommendation: go ahead and do it! Research, learn a lot along the way and have fun. Things are a lot easier these days than they were in the 80s, we got the internet, CPLDs, FPGAs, as much static RAM as we want, etc.! Good luck and take care. You will have a very hard time building your own "computer" based on the Z80 with all the features that you described. However, if you can live without building the hardware yourself, a Z80 computer that you program yourself is completely possible. The old TI-83, TI-84 and similar (pre-TI-89, I believe) are Z80 based calculators. They are still very common calculators, and they can be had for around$100: http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=ti-84

The calculator features everything you want except for the mouse, and because the calculators are still common in schools, you will still find good numbers of Z80 developers. StackOverflow can help if you have questions: https://stackoverflow.com/questions/tagged/z80

I'm not sure how easy it will be to reprogram the Z80 with your own code, though.

• At high school, we had a course of Assembly programming using the z80 developemebt boards; we had all the toolchain to program it with its Assembler code, to light some LEDs and display some numbers with the 7-segment displays. So I think that for a more hardware-oriented learning it could be a good starting point, but who knows where they can be found... – clabacchio Mar 25 '12 at 8:58
• While there's merit in suggesting a potentially hackable development platform, the initial "very hard" claim is overblown. It's true that there will be a lot of stages of a project to do everything on the poster's list, but none of those things are particularly difficult, or out of the scope of what was commonly done by hobbyists either in the early 1980s or today. – Chris Stratton Apr 28 '13 at 14:18

There exist on the web several sites that document how to create Z80 based systems. I'm currently builing on and at the moment I have it set up with a floppy drive a serial keyboard and a VGA monitor and an SD card.

The project home :

http://n8vem-sbc.pbworks.com/w/page/44366173/Zeta%20SBC

I do not think the Z-80 is obsolete. It is a quite powerful processor in it's own right. You can find a free assembler + IDE at www.zilog.com. It is a very good tool.

If you are looking to replace a PC, don't bother. If you want to learn a lot about microprocessors, forge ahead.

There is a lot of printed material pertaining to the Z-80, interfacing, programming, etc.

While the Z-80 will never match a 3 GHZ quad core, it can still be quite fast in human terms. There are faster processors in the family too. Look at the Z80S180 family. You get a lot of power, many peripherals, all integrated into a single package. Yes, rom & ram are external, you didn't expect it ALL on one chip now did you? You would miss the entire concept of a bus! I would NOT try one of these high speed designs out of the box, however.

Arduinos, raspberry PI's, etc. Realize you are buying lego blocks, not designing them. Yes they plug together, but your contribution will be limited to software (OK, maybe you could design your own board - but will you ?)

The Z-80 remains a great learning tool. So is the 8051, and you get your RAM, ROM, CPU and 1 MIPS in a single package with the 51. Faster speeds too if you like.

Don't listen to the choices others have made. Decide what you want to do and then go do it. It is a lot easier to debug at 2 MHZ than 40.

Use the power of the internet & collect a few Z-80 schematics. There are a lot of them floating around out there. Consider "The Z-80 Microprocessor" by Gaonkar ISBN 0-02-340484-1 (Amazon can sell used copies for very few $). Actually, Gaonkar would answer every question you asked. The z80 is so out of date, you won't be able to build anything but a novelty retro-computer with it, but that doesn't mean it wouldn't be instructive and fun to attempt. If I just wanted to prove I could make an old z80 run, I'd probably put it with a 32Kx8 static RAM and a UART chip, and burn a modified TRS-80 Model I ROM image into whatever small EPROM/EEPROM is lying around. The entire memory map could be decoded with an MSI chip. It wouldn't take much s/w hacking to scrape out the TRS-80 keyboard matrix decode routines and replace them with a UART input routine, nor to find the character-out routine and replace it with a UART output routine. Then it could be hooked to a PC serial port, and the old BASIC could be brought up and interacted with. That ought to prove you're running a z80, w/o the hassle of trying to implement much I/O for it. • I don't think the Z80 is out of date...currently the TI-83 series of calculators use it as its primary processor, and the TI-84 also uses it in an ASIC. – fuzzyhair2 Feb 5 '14 at 21:54 • What's wrong with building a novelty retro-computer? Nobody builds anything from the chip level except for fun and self-education. Not when you can get an excellent pre-built motherboard for$5! – Isaac Rabinovitch Nov 12 '17 at 22:04