Introduction: Building Your Own Bare-bones Computer
Computers have become ever more increasingly difficult to penetrate and learn how they work. With this setup, utilizing an old z80 8 bit microprocessor, you can learn about how a computer works in more detail and use this to expand upon your electronics projects! Here is a link to my other page where I encourage you guys to share your projects, questions, and anything else you need! I also am sharing my current work on this page : https://www.instructables.com/id/SIMPLE-z80-compute...
DISCLAIMER: You know, your normal safety things. Soldering isn't super dangerous, just be careful, make sure you are in a ventilated space and don't burn yourself! Also this is BARE-BONES computer. It doesn't get much simpler than this. Straight forward binary calculations!
for my design at least :
z80 CPU (1)
HM62256 SRAM chip (1)
555 timer (1)
LED blocks (2)
7414 inverter chip (1)
4066 analog switch chip(1)
74LS125AN buffer chip (4)
DIP switch blocks (3)
1K ohm resistors (20)
10 micro farad capacitor (1)
330 ohm resistor (1)
Output arduino sockets (optional, there's no ports in this version so its not super important)
Step 1: Step 2: Get Your Design!
I got my design from a variety of resources. This is an extremely simplified version that I found after looking at kits on http://cpuville.com/computer_details.html and emailing its creator. He guided me and showed me a simple starter z80 circuit diagram that I could use to learn from. I had also been reading from Steve Ciarcia's book Build your own z80 to get inspiration ( It is available on google books for free! Check it out!) . Utilizing his basic design I also added a few other details (after breadboard experimentation, that's step 3 :P) like a RAM programmer, and some displays.
Step 2: Step 3: Do a Quick Breadboard Run!
This step is optional but highly recommended. It will be very educational if you run through the whole circuit first, that way you can learn all the ins and outs of how your computer calculates
Step 3: Step 4: Quick Binary and Hexadecimal Overview
Computers run on something that is called binary. Binary consists of 1's, and 0's the correlate to numbers and operations. In a circuit an electrical signal is represented as a 1 (regardless of what its voltage, etc. is in this case) and when there is no electrical signal, it is notated as a 0. You may also hear these called HIGH or LOW. Same thing applies there.
So binary works like this:
Four bits is a nibble, and eight bits is a Byte.
Each position represents another number
0 0 0 0 0 0 0 0
(128) (64) (32) (16) (8) (4) ( 2) (1)
Here is an example of a byte.
1 0 1 0 0 0 0 1
This would be figured out as:
128 +32 + 1= 161 (just by added all the HIGH, or 1 values)
Next hexadecimal is just binary, but you can represent a full nibble (4 bits) in one symbol! There conversion goes like this:
0000 - 0
0001 - 1
0010 - 2
0011 - 3
1000 - 8
1001 - 9
1010 -A (instead of 10!)
1011 -B (instead of 11! so on...)
Step 4: Step 5: Awesome! You Breadboarded Your Computer! Next Programming!
Now we are going to tackle programming this puppy! I am going to include a very simple test program that can be hand programmed, since its only a few bytes. There's many resources for programming the z80 as it is a popular CPU, I even purchased Programming the Z80 by Rodney Zaks, but I only recommend going this in depth if you are going to expand upon this project. Anyway, download an assembler for the z80 of some kind. I use the Z80 assembler by Peter Hanratty on this page : http://retrospec.sgn.net/game.php?link=z80asm . The assembler you use is not super important, most are similar. For my test program I utilize a symbol z80 command called LOAD. Its syntax goes as such:
LD (destination) , (source)
My program looks like this :
LD A, 0ffh ; Load register A with ff in hexadecimal
LD (0008h) , A ;load address 8 in memory with A
halt ;stop program execution
This assembles to this in Hex-
3e ff 32 08 00 76
*Now I really cannot take credit for this, at the time I was getting help from Donn Stewart at cpuville.com (mentioned earlier) so definitely check out his site if you are interested
Step 5: Step 6: Now Make Your PCB!
I used Eagle CAD software for this, as it is free and easy to use. I definitely suggest it as there are many tutorials available for it all over the internet, so I will not go to in depth in its usage here. Take your schematic and create how you want your PCB to look! Lay out is all up to you so have fun! I used the auto routing tool because there are many connections, but I did try my best to check it all. Now save that and etch your board! I sent mine to a board house to be etched as I am not experienced in that, but if you are by all means go for it.
Step 6: Step 7: Solder Your Board!
You received your board and you are ready to go! Take soldering slow, as it is easy to damage components. I suggest using DIP sockets to avoid this. I suggest using your multimeter to make sure all the connections go well and nothing shorts. Good luck! Remember be safe when soldering, keep your room ventilated and do not burn yourself!
Step 7: Step 8: What Else Can It Do?
This design is super simple. Yet after this there is so much more you can do! Start trying to tackle other challenges like selecting more than one chip in your circuit, input and output ports and ROM monitor (simple OS). I am doing these on my other page! I will probably make a tutorial on it once I am finished too!
Anyway thanks so much for checking it out!
BIG THANKS to Donn Stewart at http://cpuville.com/ who helped me countless time while I was learning! Definitely check out his kits they are AWESOME!