Z80 Project

Nathan's Z80 Project Mark 2: Debug Ports

Last updated: Aug. 24, 2009, 8:19 p.m.

One thing I've learned about Z80 systems is that they are quite hard to debug, at least compared to modern micro-controller based things that you can always get to flash an LED at you or dump data through a serial port. To help with the inevitable debugging that this system is going to require I built in a couple of debug features. One is that I connected more control lines that were absolutely necessary to the PIC. These extra control lines coupled with its design requirement to be able to take over the whole data and address bus mean that it can run as an in-circuit emulator, with access to all the RAM and IO devices in the system. To make this access useful to me, I added a 4 pin port compatible with the Parallax PropPlug, a simple USB to TTL serial adapter. Basically it's like any serial to USB adapter but with only the receive and transmit lines, and without all the annoying RS232 signal level issues. So the plan is to write a basic debug mode for the PIC that accepts commands via the serial port and responds with data, pausing the Z80 and reading data from the main memory etc. if necessary.

Schematic of the debug ports on the Z80 project.

The second debug peripheral that required a bit more than just a connector and some wire is my debug LED port. Basically I added a latch to the IO bus with LEDs attached to its outputs so that I could write any byte and get an immediate visual read-out of it. The way I've done this may not be "textbook", the current driving capacity of the poor 574 latch with a value of $FF will be tested, but from experience it should work okay. Since the output is for a human not a fault-intolerant computer system I think I'll risk it and save the space and effort that a Darlington array would incur.

Section:
Z80 Project
Tags:
retro-puting,
Z80 Mark 2,
Z80 homebrew

Comments

Posting comments is not currently possible. If you want to discuss this article you can reach me on twitter or via email.


Contact

Email: nathan@nathandumont.com

Twitter: @hairymnstr

Links