Close
0%
0%

BeanZee

Z80 development board

Similar projects worth following
A small Z80 based single-board-computer designed for experimentation.

Z80 CPU, 10 MHz clock, a simple reset circuit, 32K ROM, 32K RAM, FTDI UM245R USB module and the necessary glue logic.

Connectors provided for interfacing with the Z80: address, data, read, write, IO request, memory request, clock and reset.

The internal clock may be overridden by an external clock, and the internal memory and USB module may also be disabled via jumpers so that external devices can be used, or additional memory and IO selection logic added.

There is also an accompanying monitor program which can be used to load and execute programs from a host computer.

BeanZee Z80 development board

This project started out as the Z80 breadboard computer and the schematic is largely the same. I wanted to move to something more robust and permanent before going on to a more complex design, but I also realised that by building a development board (a little like the Arduino UNO) this could provide a reliable base for experimenting with further designs.

The board has a 10MHz Z80 CPU, a clock module, 32k RAM, 32k EEPROM - which needs to be programmed externally, a simple reset circuit and an FTDI UM245R USB module.

Marvin is a very simple monitor program, through which it is possible to load, inspect / modify (in hex) and execute a program on the BeanZee via the USB interface and a terminal emulator. 

High level design

For a minimal but usable design I have used an FTDI USB development board. This choice was guided by Keith's Hackaday project

I want to have some software that can run from power-up, which will be preprogrammed onto EEPROM. This will be loaded with a monitor program, and interpreters which will allow other programs to be loaded into RAM and executed from a computer connected via USB.

Schematics

At the heart of the board is the Z80 CPU. Those control inputs which for our purposes need to remain inactive (/NMI, /INT, /WAIT, /BUSRQ) are wired high. We'll be ignoring some of the control outputs like /BUSAK, which are left disconnected.

For memory I have an AS6C62256, 32K x 8 SRAM and an AT28C256 32K x 8 EEPROM. This makes for a very usable small system, but the simple memory map also keeps the address decoding really simple - device selection based on A15.

I/O decoding is minimal. When operating as a self-contained board, we only have to consider the USB module - from which the CPU reads and writes data on one port (1) and reads status on another port (0). To keep the logic as simple as possible, in effect: port 0 will be read for any even-numbered port, port 1 will be read for any odd-numbered port, and port 1 will be written to for any port number.

However, if we want to connect external I/O, this logic will be insufficient. JP1 allows us to accommodate this. 

With JP1 connecting pins 1 and 2, the board will operate as above - with the USB.

With JP1 connecting pins 2 and 3, the USB will be disabled, and external I/O devices may be connected.

If no jumper is present, an external circuit may be connected to pin 2. Additional external logic may be used for example to enable the USB for a specific port range.

JP2 provides the same options for adding external memory.

The clock module has an input to enable / disable operation. This has been made  accessible as /CLKINH on a socket alongside CLK - see the connectors diagram, below.

If /CLKINH is left disconnected the on-board clock will operate normally. If /CLKINH is taken low the clock will stop, and the clock module output will go into a high impedance state. This means that an external clock generator could be connected to CLK.

The USB module has /TXE (transmit ready) and  /RXF (buffer has data) outputs. To make these accessible to the CPU, I have connected them to the data bus on D0 and D1 via a tri-state buffer. The glue logic then opens the buffer allowing these signals onto the data bus when requested.

Note that the board can be powered via the USB interface.

As a development board, there are a number of connectors for experimentation. Address and data bus connectors, /RD, /WR, /IORQ and /MREQ allow the CPU to address external memory and ports.

PCB

I designed a double-sided PCB in KiCAD, and had this produced at JLCPCB.

gbr.zip

BeanZee Gerber files

Zip Archive - 32.60 kB - 01/15/2025 at 07:55

Download

BeanZee.pdf

BeanZee schematics

Adobe Portable Document Format - 492.99 kB - 01/15/2025 at 07:53

Preview

  • Marvin the Monitor v1

    Stephen Willcock6 days ago 0 comments

    Finally Marvin, my tiny monitor program, is sufficiently complete to be usable / useful with BeanZee.

    https://github.com/PainfulDiodes/marvin

    With it you can now:

    • Read from memory as hex data
    • Write hex data to memory
    • Load a program from an Intel HEX format file
    • Execute a program from a specific address

    This means you can build a program on your host computer using a cross-assembler or cross-compiler, and so long as you can produce an Intel HEX file you can load and run the program on BeanZee via a terminal emulator.

    The repo includes a couple of really simple test programs.

    I have been using SjASMPlus for assembling Marvin, but this does not include the means to generate Intel HEX output. For this I am using z88dk-appmake. 

    I will be taking another look at z88dk, as this seems to have a comprehensive toolset for Z80 work.

  • LCD output experiment

    Stephen Willcock02/12/2025 at 14:31 0 comments

    I’d like to provide direct inputs and outputs for  BeanZee. I have some ideas around a fairly minimal keyboard matrix for input and for output, having considered several options I’ve decided to use an LCD character display.

    My reentry into hobby electronics in 2020 was via an Arduino starter kit, which conveniently includes an LCD device. On further investigation, this device uses a Hitachi HD44780 LCD controller which was developed in the 1980’s and appears to be the de facto standard for character (as opposed to graphics) LCD drivers. There are many variants, but most seem to adhere to a standard 16 line interface.

    I want to work out how I might hook this up to a Z80, and I am going to get the display working with an Arduino UNO (r3). There is an LCD library for the Arduino which provides a bunch of simplifications for using the device, and the source for this is on GitHub and should help me to understand how to interface and use the device.

    Following the Liquid Crystal Displays (LCD) with Arduino article I very quickly got a hello world output from the device:

    I also wrote a sketch to simulate the behaviour I will be aiming for – reading keystrokes from the USB interface and printing them to the LCD.

    This was actually very useful, as it helped me understand how I will use the available commands in the LCD controller to implement terminal output to the LCD – handling backspace, CR/LF, line wrapping and scrolling.

    Reading the LCD library source code was also useful. Following the flow of outputs it seems that the natural sequencing of the Z80 control and data lines for I/O should also work, subject to the speed/timing being compatible.

    Subsequently I looked to see if there is a RC2014 example of a Hitachi HD44780 LCD, and was pleased to find that there is: https://rc2014.co.uk/modules/lcd-driver-module/

    This page also links to Mike Sutton’s blog post on Connecting an LCD to a Z80 with Two Glue Chips which very helpfully describes in detail timing, including nuances between using /RD rather than /WR to control R/W, so next steps with the Z80 are looking promising.

    Experiment files: https://github.com/PainfulDiodes/experiments/tree/main/arduino-lcd-experiment

  • Noisy BeanZee

    Stephen Willcock02/02/2025 at 17:16 0 comments

    At one point I had intended widening the ground and power tracks on the PCB, but didn't do it in the end. Having shared the design around for comment, the puny power tracks were called out, and I had a couple of suggestions to upgrade to a 4 layer board. This would allow for generous ground and power planes, and make the layout actually much easier.

    Aside from the easier layout, the suggestion was that this arrangement would clean up the power to the chips across the board.

    To check this out I tested the board with my 40 year old oscilloscope:

    The top trace is the clock, and the lower trace is the +5v measured at the opposite end of the board from where the supply enters the board. 

    As a matter of interest, I tested one of the address lines (again at the edge of the board). The CPU was running in a loop waiting for input, so the pattern was stable:

    Finally for comparison I checked the clock and power on the prototype (matrixboard/wire construction):

    This is a lot cleaner than the PCB. 

    I plan to rework the PCB into 4 layers, and will do a 3-way comparison then.

View all 3 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates