Z80 Project

Nathan's Z80 Project Mark 2: Overview

Last updated: Aug. 17, 2009, 7:50 p.m.

I've actually started building this Z80 project already, so this one might get to do something more than just a debug pattern on some LEDs. The design for this is fairly minimal and is based around two main factors; stuff I've done or planned before (so understand to a certain degree) and parts I have lying around. As such the components might be a bit odd, and possibly unavailable (sorry).

The basic idea for this version is to produce a Z80 machine that I can tinker with some software on with as little hardware as possible. However feature creep started to work its way in and I added a couple of extra bits. The system consists of a minimal Z80 and memory core with a PIC providing reset timings and a clock source for the Z80. The PIC also contains a basic bootloader image for the system in its FLASH memory which is loaded into the Z80s RAM at boot. The PIC also acts as an interface to an SD card for mass storage. The primary input/output device on the system is a UART which I intend to couple to a serial terminal (possibly a small one based around a Propeller chip). I've added to this a debug port on the PIC which is another serial port, suitable for attaching to a PropPlug USB to serial adapter, and allows the PIC to act as a PC connected in-circuit-emulator for debugging. Also available is a write only port on the IO bus with 8 LEDs to display an arbitrary binary value for debugging. Finally I put a Real Time Clock and counter chip with a battery backup so the system will be able to keep track of time, but can also provide timer based interrupts, which I have some ideas about using for task switching.

The details of the components are in separate articles. See below.

CPU and Bus Buffering Basic buffering of the buses from the Z80 is done with some TTL/HC components to make sure the signal levels are good at all the other chips on the bus.

CPU Supervisor A PIC18F4520 provides a lot of the glue and features that would otherwise be more expensive and space intensive, such as mass storage on an SD card, ROM from its internal flash, and clock generation with one of the counter peripherals.

Memory The memory layout is probably the simplest part of this system, there are 2 32KB SRAM chips that fill the whole memory space (actually I had some FRAM lying around so I'll use that but it's not particularly significant). There is no complicated ROM selection because the "ROM" is stored in the PIC and loaded into the RAM at boot time.

Real Time Clock and Counter This is just one, discontinued part that I picked up a couple of years ago when Farnell had only one left. Looks really good, but I've never actually got around to using it in anything. As I mentioned above, the timer based interrupt from this makes me think it would be handy for some sort of time-slicing multi-tasking OS, but I don't really know a lot about how best to do that.

UART I've used a good old 6402 chip with its own clock source and a level shifter chip to make a simple RS232 port. The only odd bit about how I wired it up is the status port that I buffered with an extra chip to allow an interrupt on receive function.

Debug Ports I have put two features in specifically for debugging, the PIC has control over all the Z80s control pins when it is in reset or DMA mode (well the important ones; MREQ, IORQ, WR and RD at least). This allows it to probe devices on the bus and the memory, it can report these findings and receive instructions from a PC via its own serial port without affecting the state of the system UART. A simpler debug feature is the debug port on the IO bus that has 8 LEDs attached to a latch which allows software to display single byte values with a single OUT command.

If none of that made any sense to you, and I am quite prepared to accept that it didn't. Please take a look at the PDF circuit diagrams available below. The slightly odd division of components and extra connectors with lots of signals routed to them is because I've built this on two stacking boards with pins that flow from the upper board (containing Z80, PIC and a bit of glue) to the lower board (with the memory, and most of the IO stuff on it).

UPDATE 22/09/09 The connector for the SD Card was labelled the wrong way round on the main cricuit diagram so I've updated main.pdf

AttachmentLast UpdateSize
memio.pdfApril 23, 2014, 9:06 p.m.88.4 KB
main.pdfApril 23, 2014, 9:06 p.m.110.9 KB
Section:
Z80 Project
Tags:
Z80,
retro-puting,
Z80 Mark 2

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

Mastodon: @hairymnstr@mastodon.social