Toad's z80 assembly and more

Minimal z80 Tester

Synopsis:

This is a small z80 tester I build to verify that the CPU works. It does nothing but increment the address bus and execute NOP’s. This is an expansion of a tester found on another website linked in the next section.

History:

In this phase of the project, the goal was to verify the z80 CPU was working properly. The only way to do this was to build a tester, building a whole computer would have been out of the question. I found a wonderful website that details many aspects of the z80, www.z80.info. On one of these pages, there was a small circuit that would test the CPU, the Minimum z80 Tester. The tester I built was inspired by information found here, I have made slight modifications to the original design. This tester seemed ideal for my needs, a simple entry project. It was very much motivational, I didn’t want a project that would frustrate and bog me down.

Operation:

Before I bore everyone with the details of how this thing works; let me briefly explain how this thing works. Don’t worry if you are confused by the material below.

When power is first applied to the circuit, the little red reset button is pressed for atleast 4 clock cycles. I’ve found that when M1 goes high, enough time has passed. When the reset button is released, the address lines go low, and M1 goes high. The z80 is now reading the data from address $0000, which happens to be a NOP. After M1 goes high, the address is incremented. After about 4 clock cycles have passed, the cycle is repeated. The processor is now fetching the 8-bit value at $0001.

(I’m not sure about M1, it seems that its operation should be reversed due to the use of an open-collector inverter. I will need to investigate this further.)

Modifications of the original tester:

Since I was not trying to make a true minimal tester, I didn’t mind the extra IC’s or wires. I have made two important changes from the original, a different IC for the clock signal, and inverting buffers for the address lines. I also added an extra address LED that the original didn’t have.

I was having trouble getting the 7400’s series equivalent of the 4093 to work as a clock signal. For what ever reason, it just wouldn’t oscillate. A simple google search solved my problem, a site with a wonder 555 timer page. The useful section was the Astable mode, about 1/3 down the page. I used values that would give me a frequency of 6.8Hz or 0.68Hz. It was really quite a joy to use the 555, I got it working almost instantly. (relatively speaking) I’ve had some rather fustrating experiences with the 555.

It seemed to me that the address outputs of the processor should be buffered. Especially since 5 milli-Amperes of current could flow, with a 1K Ohm resistor and a 5 volt potential. This is shown by an application of Ohms law, I = V/R. If I understand the z80 datasheets correctly, the maxium output is 2mA. I could have gone with a non-inverting buffer, but decided against it. Im not entirely sure what my reason was, but I think it was because I knew an inverting buffer would work. One would connect the Vcc to the 1K resistor, the other leg of the resistor to the long leg of the LED, and the short leg of the LED to the output of the inverter. When the address line is low, the buffer flips this, and the output becomes high. This causes little potential across the LED and resistor, thus the LED stays off. When the address is high, the inverter output becomes low. This causes a ~4-5 volt potential across the LED and resistor, and thus it lights. This conveniently gets around the inverting action.

Construction:

This project was constructed on a breadboard. This allows me to work out the bugs in the system before creating a circuit board. I’m debating creating a circuit board for this project. It’d might be nice to have a functional tester that is much more compact than the breadboard its currently on. It also has the advantage of being much more reliable, there is little chance a wire can be dislodged or a component removed.

(I really need to get some pics up, it would really improve this page. Maybe I can take a short video of it working as well. 🙂 )

1 Comment »

  1. Google Play Music

    Comment by Yaeko Hawn — March 23, 2018 @ 10:57 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.