-
Marvin the Monitor v1
7 days ago • 0 commentsFinally 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
02/12/2025 at 14:31 • 0 commentsI’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
02/02/2025 at 17:16 • 0 commentsAt 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.