Inspired by discussions at the TRS-80 Dutch Usergroup meetings, I created a board exorciser for Z80 CPU based computers. It allows memory inspection, writing to memory, I/O port reading and writing, and low level signal exercising. In short, a tool which can help troubleshooting Z80 boards.
As it does not use a real Z80, signals are easier to check as the Z80 refresh for dynamic RAM does not interfere. As a result a dynamic RAM test will not work, but all address, data and control lines can be exercised with simple patterns, slowing the process so a logic probe can effectively be used.
The Arduino Mega is the only expensive parts needed, other parts need some soldering experience. But beware, this will not fix your broken computer. It can only help you fixing it!
There are two modes of operation;
What it doesn't do is execute Z80 code. It is an Arduino Mega board with a passive shield, wiring pins to the Z80 socket. The Arduino Mega is used as it has the required 37 pins available needed to fully exercise the Z80 pins. Only the Clk signal is not connected to an Arduino pin.
To use the Z80 exer, the Z80 CPU is removed from its socket and the flatcable socket pod inserted. The other end of the flatcable is connected to the Arduino shield and the Arduino to a modern PC with a terminal emulator.
The exerciser is controlled by a simple command set via the Arduino USB port. This can be used via the Arduino IDE console or any terminal emulator. The wiring is quite simple, just connecting Arduino pins to the Z80 connector. The shield, flatcable and 40-pin socket connector are completely passive, only 1-to-1 connections. No diagram yet, but the connections are defined in the Z80pins.h and README.txt file in the download tgz-files.
-- Z80 exerciser 0.4 command set -- Aaaaa - set address bus to value aaaa Bpp or B#ss - blink pin p (in hex) or symbol: A0-AF,D0-D7,RD,WR.MQ,IQ,M1,RF,HT,BK D[ssss[-eeee]|+] - Dump memory from ssss to eeee (default 256 bytes) H - This help text Issss-eeee - Generate hex intel data records MRaaaa[+] - Read memory address aaaa, optionally repeating MWaaaa vv[+] - Write vv to address aaaa, optionally repeating PRaa[+] - Read port address [aa]aa, optionally repeating PWaa:vv[+] - Write vv to address [aa]aa, optionally repeating R[+|-] - Refresh on/off Qn - Repeat rate; 1, 2, 4, 8, 16, ..., 32678 ms (n=0-9,A-F) Sssss-eeee:vv - fill a memory range with a value TD - Exercise TRS-80 display memory TK - Reads TRS-80 keyboard matrix Ussss-eeee - test RAM range (walking 1s) V - view data bus, pins INT, NMI, WAIT, BUSRQ, RESET Wpp v or W#ss v - Write pin (in hex) or symbol: A0-AF,D0-D7,RD,WR.MQ,IQ,M1,RF,HT,BK; values 0, 1 Xp - exercise port p ? - This help text
Some commands have a repeat suffix; allowing the operation to be repeated. The repeat rate is determined by the Q command, and exponential: 1, 2, 4, 8, 16, ..., ms. Of course some commands like 'D' are so slow fast repeat times do not make much sense.
This shows a dump of the first two 256 byte blocks of the memory map. Clearly a TRS-80 model I with a 'Japanese' ROM. The commands were "?", "D0000", "D". (The latter uses the next block by default)
This shows three views of the keyboard area with respectively the SPACE, ENTER and 'A' key pressed.
For computers with static video RAM and a fixed character frame buffer like the TRS-80 Model I, III, 4 line, the exerciser can be used to fill the video memory with a known character value, which are immediatly visible on the screen. Bit errors are easy to find this way. Clearing the screen would be "S3C00 3FFF 20".
The code is currently ~11.5 kByte large, so plenty of room for future expansion (Mega has 256 kByte Flash memory). With code changes it could even work on a Uno, but this would make the shield more complex because a pin expander would be required.
The exersized pins can of course be checked with a multimeter or scope, but I usually use a logic probe which indicates the level of a signal; high, low or undefined.
The Z80exer Arduino sketch is released under the 3-clause BSD license.
Last updated: 2014-11-15