RC2014 Z80 NOP Tester
I’ve already talked about my Z80 CPU Tester (Fail) and how I ended up building one from existing designs. This is actually running code from a ROM and using those instructions to figure out what kind of Z80 is in use.
There is a much simpler, more basic “does it even work” test that can be done – the NOP test. At the most minimal, this is pulling the appropriate INPUT Z80 bus control lines HIGH (so not active), and all the data lines LOW. Then when power is applied, as the Z80 reads instructions off the address bus it will always read back the instruction corresponding to 0x00 which is a NOP (“no operation”) and then move onto the next instruction. As the data lines are all fixed to the same value, this too will be a NOP and so on through the entire 16-bit address space (if you wait long enough). All this really needs to work is power and a clock.
There are a number of designs published, from simple breadboard circuits, to stripboard, to bespoke PCBs, to off-the-shelf kits to buy. Searching for “minimal Z80 configuration” will find a number of them. I already have this one, which is easy to build, very simple to use, and works really well: https://lectronz.com/products/z80-nop-tester.
But given my messing about with Watching a Z80 from an RP2350 I thought it would be really useful to have one in a RC2014 bus form factor, so I put one together. Not for use with other RC2014 modules, but more for use whilst I’m prototyping RC2014 related modules myself.
https://makertube.net/w/pQNYpWJTcpsKVj5LBc5qmN
The Circuit
The tester I have has been published online by the designer, Alberto Gonzalez, and as I know how it is working, I’ve essentially ported that circuit over to the RC2014 bus.
The original design supports the following:
- 555 based timer clock with frequency adjustment from approx 4Hz to 90Hz.
- LEDs for address and control lines.
- Reset switch.
- USB powered.
I’ve made the following changes:
- I’m not powering from USB, instead linking into the 5V from the RC2014 bus.
- I’m not bothering with a power on/off switch.
- I’ve added LEDs for all of the Z80 bus control signals in case I want to see what the bus is doing.
- There are options to take /INT and CLOCK from the RC2014 bus. /NMI, /WAIT and /BUSREQ are all fixed HIGH (i.e. inactive).
- I’ve added header pins to allow the data lines to pulled either HIGH or LOW.
- And of course I’ve added a RC2014 bus interface.
Why the last option? Well there are some other single byte Z80 instructions that will give different patterns on the address lines as they function, so I thought that might be interesting to play with. Any instruction that is followed by a data read would work, but of course the data value will be fixed to the same value as the instruction byte.
I’m using the same 555 clock circuit as my bought tester.
The PCB Design
All the LEDs have been given a 3mm rectangular footprint and placed at the top of the board. I’m using 8-way resistor networks for all the LEDs and data line PULLs.
There is an option to power the board directly via two header pins, and jumpers for /INT, CLOCK and all the data lines.
The CLOCK control is using a trim pot, and the RESET button is a simple two-pin tactile switch.
There is a 100nF capacitor for the Z80, but I’ve stuck it under the footprint of the 40 pin DIP chip. It can be fitted on either side of the board, although the silkscreen is on the rear.
All LED bus signals are labelled.
I’ve opted not to include the additional header footprint of the RC2014 extended bus.
Note: Like many RC2014 PCBs this is a 100mm long board, which means it can’t quite get all 40 pins of the RC2014 bus to fit in. The board does not include a connection for pin 40 (USER4).
One new KiCAD-ish for me – in order to stop VCC being renamed from being connected to the Nets for the signals being pulled up, I had to use a net tie. Then I needed a custom footprint to match the 0.25mm track width I was using.
The PCB Build
Bill of Materials:
- RC2014 Z80 NOP Tester PCB (GitHub link below).
- 1x Z80, 40-pin DIP to “test”.
- 1x 555, 8-pin DIP
- Resistors: 1x1K, 1x4K7, 1x5K6, 1x10K.
- Resistor Networks: 5x 9-pin 1K
- Ceramic Capacitors: 2x100nF, 1x10nF
- Electrolytic Capacitor: 1x1nF
- LEDs: 24x 3mm rectangular (colours to taste); 1x 3mm round LED (for power)
- 1x 200K trimpot (see PCB for footprint)
- Straight pin headers
- 40-way right angle pin headers
- 10x jumpers
- 1x 8-way DIP socket, 1x 40-way wide DIP socket
The build should be relatively straight forward. This is the suggested order:
- Resistors
- Ceramic capacitors
- DIP sockets
- LEDs
- Resistor networks
- Other components
- Straight pin headers
- Right angled pin headers
I recommend using a 40-way right-angled pin header for the RC2014 bus, but just leave pin 40 over hanging the board. Pin 1 is marked on the board.
Usage Notes and Errata
Usage is fairly straight forward:
- ENSURE NO OTHER BOARDS ARE PLUGGED INTO THE RC2014 BUS
- Insert a Z80 CPU to test
- Ensure jumpers are set accordingly (see photo)
- Plug in and turn on the power
- Adjust the clock as required
This is not designed to be used with other boards plugged in. It makes little sense anyway, as the Z80 can’t do anything other than read a fixed, single-byte data instruction word and a possible follow-up data word of the same value.
I’m not quite sure how I managed it, but there is a small indent in the PCB edge next to pin 1 of the RC2014 bus. It doesn’t seem to affect things however.
With hindsight, I’d probably allow for enough space to fit a 40 pin ZIF socket. One might just fit, but I think the 555 is probably too close.
Find it on GitHub here.
Conclusion
Really this is mostly a RC2014 toy – I can’t imagine it being a lot of use for most people. But for me, for testing the monitoring of the Z80 bus in a very simple way and to help understand how the signals work, this seems to work really well.
A massive thank you to Alberto Gonzalez for publishing their design. Do go and get one if you’re interested in this kind of thing (I have no links or affiliations – I just bought one and liked it and used it as my inspiration here).
Kevin
#pcb #rc2014 #z80