How can I build a simple computer around a retro cpu like the Z80?

I am interested in building a small computer and had previously opted to build a very minimal computer out of discrete components (think 4- bit). Due to cost constraints and my skill level in electronics I don't think I can do this at the current time. So, I have opted to try building a small computer with a pre-built retro cpu.

First, my two goals:

<>I do not want a computer with extra capabilities like serial output or the ability to drive a display. I want a "bare bone" computer. This entails a dip switch input and led indicating output. I would also like the option to switch to some sort of latching system for the inputs and outputs so my computer can control and be controlled by peripherals as my skill level increases.

<>Ideally I would like to have as few chips as possible.

I was initially planning to use a Z80 as the cpu because wikipedia says it had the need for less supporting ic's than its predecessors. Also, there is a lot of documentation out there on the cpu. You may be asking why I am asking for advice then but the truth is because the Z80 computer building tutorials I have found all involve a screen and are more complex than I can manage. If there is another processor that is easier to work with, please tell me!

As best I can figure, for my basic computer I would need: the processor, a ram chip, a rom chip, 8 latches for the input and for the output (for an 8 bit processor), an 8 switch dip switch, a clock, and an 8 led display. Are there any other chips I am missing (buffers or the like)?

Also, how can a program be written to the cpu? My thoughts on this were that the very first address of the rom section would have instructions to read say bit 1 and bit 2 of the input. It would keep doing this if both were low.

When bit 1 goes high it triggers the cpu to jump to a section of rom which performs a loop where it reads the input->stores it in a certain memory address allocated to storing programs-> increments this memory address by 1->reads and stores the next input.

If it read a bit 2 initially it would jump to the memory address where program starts.

All in all this seems like a very bad way to program, what is the best way to program? I am fairly certain that some startup program will need to be written to the first address of memory in the rom. Thanks for your help.

sort by: active | newest | oldest
Gelfling63 years ago
Despite all the "Why Would You Want to?" notes above, I too, am trying to construct a simplified Z80 based micro.. I too, lived through the Pre-1980's computer era, likewise owned quite a few CP/M based machines.. The 1st remark, does give some good tips, though.. Instead of needing an EPROM, why not a 8-bit EEPROM? A Flash EEPROM as your BIOS/OS, 32 static RAM (or could go higher) for operating space, I/O control would be simple through even an older 8255 chip.. Though, I would still look at Serial I/O, or at least some method of going from USB to Serial, as there doesn't seem to be any 8-bit USB driver code around. (even in the ARM technology world).. At least this way you can monitor the device, and control it through a simple terminal. Networking IS possible, but slow. You might even want to look at some of the more recent Super-Z80's, like the old Toshiba HD64180 that started the rebirth in 8-Bit computing. (Even Zilog themselves made a Z180.. I built a experimental computer a good 20+ years ago, that a experimenter in Canada created, called the YASBEC (Acronym: Yet Another Single-Board, Eight-bit Computer), which CP/M was used as the base OS, boosted to handle larger memory & hard drive space. (pre-gigabyte period)) What the nay-sayers here seem to forget, the Z80, based on the Intel 8080, was a simple CPU. Nowhere near as complex as the 8086/88.. Granted, the 8052 would include it's own I/O, but that's what the 8255 was for. I'm looking for mine, as a Robot controller, having tinkered with the Arduino AVR, the 3.3V limitations of the Raspberry Pi, these both have their pluses, but they also have their minuses (limitation of I/O, limitation of voltage conversation between 3.3 & 5V, without needing extra level shifting. Open-Collector Darlingtons were simple enough for driving +12V devices from the 5.) The 6502 is a good choice, if you want memory-mapped I/O.. Pretty sure the Z80 could also do this if programmed right, but 8255 controlled expanded beyond just memory.
Granzeier6 years ago
Back in 1976, Popular Electronics published a series of articles about the Cosmac Elf (http://www.incolor.com/bill_r/elf/html/elf-1-33.htm for the first, with links to others), based on the 1802 microprocessor. The author of these articles, Joe Weisbecker, is the person who designed the 1800 series microprocessors. This tiny computer is almost exactly what you were asking for. The computer consists of one CPU (RCA’s 1802), two RAM chips (total of 256 bytes of memory, no ROM needed), a few (seven) CMOS support chips, a few switches and two LED displays. The displays were kind of expensive (and still are), but in part two, he tells how to replace the expensive displays with low-cost discrete LEDs. There are no fancy keypads/keyboards or monitors or LCDs (although they can easily be added.)

There is an active Yahoo group (http://groups.yahoo.com/group/cosmacelf) that has lots of helpful members and many files. There are also several emulators available. My favorite (due to it’s simplicity) is http://incolor.inetnebr.com/bill_r/computer_simulators.htm, but there are many others that are more powerful (http://www.elf-emulation.com/ is pretty good.) In addition, there are several sites that cover lots of stuff about the Elf (http://www.elf-emulation.com/ has more than just the emulator.)

Lee Hart has done a fantastic job of designing a modern-day Elf, called the Membership Card. This computer maintains the simplicity of the original, but he does give it some additional capability (additional RAM, embedded controller capability, optional PC connectivity) all without sacrificing the ease of use. This computer can actually fit inside an Altoids can (or leave it out or put it in another case.) One of Lee’s design goals was to have a system that can teach computing without needing to use an expensive PC (again, that can be an option.) Lee’s design process is documented here: http://www.retrotechnology.com/memship/mem_devel.html. This is a great read, just to learn about the design process. You can purchase his kit at http://www.retrotechnology.com/memship/memship.html, click on the Details and Prices link in the first paragraph.

When you progress beyond the basics, there are also several more modern systems based on the Elf. There were several systems from the late 1970’s and early 1980’s and even a few from recently. The Elf 2000 (http://www.sparetimegizmos.com/Hardware/Elf2K.htm) from Spare Time Gizmos, can go all the way up to a very nice 1980’s style business system (including lots of RAM, Hard Drive, Disk Operating System, Real-Time Clock, 80-Column Display and way more).

Take a look at the, above listed, sites – I think that you will like the Elf. Disclaimer: I am not related to any of those sites listed, I just like the stuff that they have. I do plan on getting a Membership board with my next income tax refund, though ;)

lemonie6 years ago

Here's a kit, 74.95stlg. (see add-ons)



NachoMahma6 years ago
. You might be better off trying to reverse-engineer an old Apple //e computer - a simple, 1MHz computer based on the 6502. It is well documented; you can (could) even get the source code listing for the BIOS and DOS.
Having lived through the Z80 period, I can't see any great reason to want to revisit it, using a modern microcontroller like an 8052 or an Atmega is close enough. You can try writing on the metal in assembler or machine code if you want the experience - which is very valuable, and a FLASH controller is vastly less complex than the designing an Eprom burner, writing code, burning EPROM, crashing, erasing eprom, rewrite etc etc.