10/11/2013
The Z80 based mini-system board
The board has 32K of EPROM, 32K of RAM and runs at 4MHZIt has 3 8bit General I/O ports which includes a bit-banged serial port. With the addition of a USB-TTL serial adapter It can communicate to my PC. Using a terminal application on the PC I'm able to modify & view memory, list (dis-assemble) code and assemble code.
With the help of a couple of PC command line utilities I'm able to upload and download code to/from the board in the form of Intel hex files.
It even supports a tiny version of MS BASIC.
History:
The project began on 10/11/2013 and I had an acceptable working 1.0 version on 11/22/2013
Here's another example of a project that came into being simply because we had some parts that "might" make it work. Having completed my EPROM programmer a few days before, I started wiring the board on 4pm Friday afternoon and had it blinking an LED at 2:30pm the next day after correcting only about 4 or 5 wiring errors.
By 10/13 I had a working serial interface running at 1200 baud which later was increased to 9600.
Resources and Tools:
Thankfully the Z80 was quite a popular CPU used in early TANDY computers, TI calculators and the 1st Nintendo Game Boy.
This made finding resources online easy. (see http://www.z80.info )
I found Thomas N. Anderson's TASM assembler worked quite well. Once a reliable serial interface was developed I could work within a Z80 Emulator ZEMU - Z80 Emulator by Joe Moore. This freed me from needing to burn an EPROM with each code iteration.
Once the HEX file upload feature was working I could also use SDCC
(see http://sourceforge.net/apps/trac/sdcc) to compile C source code that could be uploaded and run on the system.
6/2023 Update
Added a hardwired LED and speaker to this board (see updated schematic link below) and updated the monitor software to support them. Now there's a spiffy red LED that blinks every second while the system is waiting for input and a short beep is emitted from the speaker after reset.
Routines for blinking and beeping the new hardware are in the updated ROM code.
Also added a LINUX versions of the .hex file transfer utility.
For assembling Z80 code on my linux box I'm using zasm from: https://k1.spdns.de/Develop/Projects/zasm/Distributions/
Since TASM won't run on Windows 10, I'm now using zmac from: http://48k.ca/zmac.html
12/2024 Update
Recently I was contacted by someone who had built a version of this project and needed the .hex
file for the ROM code which I was happy to supply.
This renewed my interest in the Z80 project so I pulled it out and started to mess around with it.
Looking more closely at the monitor ROM code I found the bit-bang serial I/O routines were not
very efficient and although they worked fine on MY version of the board they might not work on
others. Probably due to the fact that some timing values were determined more by experimentation
than calculation. This resulted in a re-write of the SENDBYTE and GETBYTE functions that were greatly
improved. So much so that by tweaking the delay values I was able to achieve a baud rate of 19200.
This rate was quite unreliable so we’re sticking with 9600. The new version 8.2 ROM code is available
for download now.
While I had the system out and with Z80 assembly fresh in my mind, I coded several
demonstration projects involving LCD displays I happened to have and even an interface to a PS/2 style
keyboard! (also now available for download) Enjoy!!
Software:
The current code takes up about 16k of the ROM space which include the BASIC interpreter.
Some more screenshots with examples of various functions:
The Z80 Mini System connected to various LCD display modules
Attachments Details:
EMK_Z80_SYSTEM001C.pdf Z80 Board schematic (updated 6/21/2023)
Z80MON082.ASM Monitor Source Code V8.2 NEW!
Z80BASIC.ASM BASIC Source Code
Z80pgmr.zip Source and binary for command line utility to upload a HEX file to the Z80 system
Z80save.zip Source and binary for command line utility to retrieve a HEX file from the Z80 system
Z80BLoad.zip Source and binary for command line utility to upload BASIC source text to the Z80 system
Z80pgmrx.zip Source and binary for the LINUX utility to upload a HEX file to the Z80 system
lcd04.asm Source for driving a 16x2 character LCD
lcd5110.asm Source for driving a 84x48 5110(NOKIA) LCD
oled1306.asm Source for driving a 128x64 OLED LCD
mmind.asm Source for a terminal version of the Master Mind game.
ps2kbd1.asm Source to interface a PS/2 type keyboard.
servo1.asm Source to drive an RC hobby servo motor.