Notes on Building and Operating the Z80 Computer

Quality tools, parts and wire are important. The wire-wrap tool I use is the WSU-30 made by O K M and T Corporation, Jameco catalog number 34585EX, price $49.99. It is expensive, but mine has lasted for years. Jameco 30 gauge wire-wrap wire is also very good. I have soldered small LED's that have current-limiting resistors built-in to DIP headers for indicators. (Use a low-wattage soldering iron, like 15W). This is the cheapest and best way to show data. Components are also soldered to a DIP header. This way, the whole thing can be made by wire-wrapping underneath. (Note: I used some old large LED's and external resistors on the indicator board seen in the picture because I ran out of the small ones). The 5V and ground pins are single wire-wrap posts pushed into the board. I use an old 15 watt, 5V regulated power supply. The computer draws 1 amp maximum.

You need some basic instruments to debug your circuits. A multimeter is handy to test continuity. A logic probe is needed to check the activity of IC pins. I use the LP10A by Beckman Industrial.

The computer has 4 control switches. One is for reset, the other three select which system clock to use. The single-step clock is implemented by a wire that can be moved between two contacts, seen at the bottom of the board. Some Z80's don't run well when single stepped, but all Z80's I have ever used will run with the slow clock. It is slow enough to allow you to see what is happening in the system by watching the indicator lights on the plug-in board. This is mainly used to debug the circuit.

When taken out of reset, the Z80 loads and executes the instruction found in memory location 0000h. In the current ROM, this is a JP 0020h instruction. This instruction allows you to correct errors in your ROM program without erasing. The ROM has all 1's when erased, and during programming you write 0's. If you make an error as you enter data into the ROM, you can enter the code again in the higher, unused memory. Then you can simply write 0's over the JP 0020h instruction. The Z80 treats 0's as no-operation instructions (NOP). Enter another JP instruction at location 0003h, with the target address the start of your new corrected code. The ROM is 2,000 bytes long, so you have room to re-enter your code several times.

The ROM program, shown here starting at 0020h, loads an address from the input ports, then jumps to that address. This allows you to select which ROM program to run. Address 0027h is a simple port reflector that allows you to test the computer. A simple counter is at 0032h, and a count to 1,000,000 program is at 003Ah.

The program at 004Eh enables the user to load a program into RAM using the input ports. To load a program, place a machine code byte on the switches of input port 0, then close and open the bit 0 (rightmost) switch of input port 1. The output port lights turn on, then off to show that the byte has been received. The code is entered into RAM starting at address 0800h, one byte after the other. When all bytes have been entered, close the bit 7 (leftmost) switch on input port 1, and a jump is made to the beginning of RAM and execution of the user's program begins.

Return to main Z-80 computer page.

Donn Stewart 2004