Close

LCD output experiment

A project log for BeanZee

Z80 development board

stephen-willcockStephen Willcock 02/12/2025 at 14:310 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

Discussions