Introduction: SIMPLE Z80 Computer
Hey everyone!
*** Most recent update -> I completed the main 'brain' of the system
This is my first time posting here on Instructables but I hope to do it regularly! I have always been interested in computers and I have wanted to understand them as detailed as I possibly can, so I decided to build one from scratch. I love computers, so I have already assembled full PCs, but nothing ever to this scale. Breadboarding is a hobby of mine so why not combine both!?
The product I eventually achieved was this simple z80 CPU, with RAM, some LED read outs, a Clock source and a way to alter the RAM. That's it. Completely bare bones. This project taught me tons and I have been inspired to build more complex machines, currently I am soldering a new one with RAM, ROM, and input and output ports. It will also eventually have a seven segment display.
EDIT : HERE IS MY TUTORIAL PAGE:
Step 1: Second Version
This is my second version of the z80 that I am building. It is in its early stages, but I plan to program it all and run much more code on it. The last machine only ran simple memory operations. I plan to interface it with a microcontroller of some kind....most likely a arduino.
I am not putting up a guide unless there is some interest. So if you want to learn how to do this I would be glad to know!
Also, here is a great kit and resource. I have been in contact with the owner of this website and he is a great help! I suggest purchasing his kits as well, they are fun to build! I have not bought his entire computer, but I plan to at some point!
Step 2: Here's a Better Picture
For now, unless anyone here wants to know how I built this simple machine I will not put up a guide. If you want a guide feel free to ask! I will be happy too. Here is a better picture of the board I designed and soldered. This is the BAREBONES z80 (with a few extra chips). I love seeing other projects so feel free to comment with your own projects! I will continue to update as I solder my next version!
Step 3: Quick System Checkup
Tested the memory (mainly the ROM, still need to test RAM) after soldering my Chip Select logic, and it works! I need test that RAM and check that it works too
Step 4: BRAINSSS.....actually Just Brain
Well its been a while! I got stuck on one problem for a while, the Chip Select mechanism. In logic I had it down, but hand soldering leads to many errors. Anyway, after a good amount of time testing, I fixed it and ran some assembly code that sent data to the CPU, then sent data to ram, the read from ram, and sent it back to rom. It worked! That means my main "Brain" is complete, including all the major components of CPU, RAM, ROM. I still have to solder an on-board time circuit as of right now I am utilizing my arduino to time, and I will also add some debugging tools on my board assuming I have room after IO, Oh, also some pull down resistors on the data bus, but those are not super necessary at the moment. Anyway just wanted to show my progress!
24 Comments
6 years ago
Hi dear 8bitBeliever,
nice project, you may be wanna check mine,
At last my monitor type OS (with inline assembler and disassembler )is ready
Please setup and try this v1.0b
you can find all necessary information in my Efex pages;
https://mkpeker.wixsite.com/efex
please send me your comments than I can improve software
Thank you
Reply 6 years ago
That's very impressive! I have been attempting to use the 8251 UART but was having issues getting it to work. Do you have your actual assembly code anywhere? I would like to see how you initialized it, sent, and read data from it! Thank you for your comment I would like to see more!
8 years ago on Introduction
Aah.. Good old Z80 :-)...
I've programmed it ages ago... It was in my final work for school, where I described a TRS-80 computer from Tandy. In 1982 :-)
Reply 8 years ago on Introduction
In 1982 I could not afford to buy a TRS-80 computer. I did manage to scrape up enough cash to buy myself a copy of Steve Ciarcia's Build Your Own Z-80 Computer book though. That inspired me to tackle a number of projects over time too. Not all of which I documented very well, or that even still exist anymore. Except perhaps as scraps in my old projects box.
Years later I did manage to take pictures of some surviving remnants of all of that though. There are actually two different circuits on the breadboard, the Z-80 computer itself, and on the top an EEPROM programmer I made for it to hold the monitor program. To the left of the breadboard is the hexadecimal keypad encoder I made for the project too.
The other image shows my latched data and address display board I made for my Z-80 computer.
Reply 8 years ago on Introduction
Oh by the way. How did you manage to convert the binary data values on your data bus to Hexadecimal values displayed above? I was planning on using an Arduino, or just the plain Atmega328 and setting up a simple circuit to run through updates on a clock. I cannot afford those little HP binary to Hex chips last time I checked
Reply 8 years ago on Introduction
Hex is just a representation of the binary data. Every 4 binary digits is one hex digit. There really is no conversion that I am aware of going on. It is just a different base counting, but they are directly related. I used 7447 binary to 7 segment LED drivers. They convert the binary data to the patterns of an LED display. There are better drivers I think today, but I forget what they are.
I haven't done any TTL circuits in a long time. It is just not my thing so much anymore. I still like it, but not enough to get involved with it I suppose. Today I'm more interested in high power circuits. I like the high current flow I guess?
I've graduated from milliamps to full amps. More power! I suppose it did have something to do with the power requirements of my more involved TTL circuits that lead me to it too. Towards the end I was driving my homebrew computer with a 5 amp power supply.
Reply 8 years ago on Introduction
Thats awesome! I would love to see more about it! Yeah I know but see I want the seven segment display to display a Hex representation of the binary, not just a decimal display. Thank you for the help though!
Reply 8 years ago on Introduction
That is what display drivers do. You input binary, and they output the sequence to light up a 7 segment display. Look at this schematic
ABCD are your binary inputs.
Reply 8 years ago on Introduction
Hmm yeah I guess you are right. I will probably implement that soon! Thanks for the help
Reply 8 years ago on Introduction
There are better display drivers today. The 7447 displays patterns for the hex digits above 9, but they are not always exactly like the letter representation. This is what the data sheet says the display looks like for the various numbers. It is what it is I guess.
Reply 8 years ago on Introduction
I read his whole book! One day I really want to build his computer! I need a little more experience but it is a terrific build!! That's so awesome!!
Reply 8 years ago on Introduction
I hated his PSU. It was way too complicated, and prone to failure. Heck it was designed to fail with that crazy over voltage crowbar circuit he had going on. I also made some modifications to his keypad where I could store each hex value in a latched buffer and shift between the high, and low hex numbers to make a full byte. Plus I found hand programing an EPROM basically impossible to do. I used an EEPROM. On the top of my breadboard is my stand alone EEPROM programmer I made. It has a single stepping automatic address generation counter. Just push a button and you have the next address location.
But yeah, overall the book is pretty inspirational to get going with building a Z-80 computer.
Reply 8 years ago on Introduction
Oh also, by the way, by any chance do you have the schematic for your EEPROM programmer anymore? I was planning on making one
Reply 8 years ago on Introduction
yeah, I ended up using a wall adapter to power mine, and I am using an EEPROM too. I guess it makes sense based on when it was written, for the EPROM, but on the power supply side of things I agree it was quite complex. I like your powersupply! I have not worked with anything that high power yet, but I plan to in the future. Just need more experience to avoid hurting myself :P
Reply 8 years ago on Introduction
That's awesome! It's a hobby of mine, with modern day technology becoming so impenetrable its nice to build something where I can understand its architecture completely!
8 years ago
A guide would be great!
Reply 8 years ago on Introduction
I will make one here soon! Glad you are interested!
8 years ago
This looks really cool! what is the ram and cache size? and the processor speed?
Reply 8 years ago on Introduction
The RAM is 4K and the Cache size for the z80 is small. Unless it has another set of registers inside of it 24 internal registers I believe. 20 8- bit, and 4 16 bit. The clock speed is run by a 555 timer on the first version, and it is slow enough that I can see the changes on the data bus. On my second version I plan to have an oscillator that goes in the Mhz scale ! :)
Reply 8 years ago
Oh ok cool, so but simple computer you mean very simple computer.