Close

RC 2022/10 Day 8: 4004 LCD Display

A project log for Flounder Z180 Computer

Standalone single-board computer based on the Zilog Z180 CPU

colin-maykishColin Maykish 10/09/2022 at 01:250 Comments

I'll start with the most exciting update. I upgraded the 1602 LCD to the planned 4004:

As you can see in the picture, I also have pieces of my monitor input loop displaying on the LCD. Going from the 1602 to the 4004 doesn't change a lot on the hardware side aside from the extra enable pin. This display is actually set up as two 2x20 panels stuck together. All of the data and control lines for both segments are wired together except for the chip-select line. I had to add another output from the address decoder CPLD and map the bottom two rows as a separate I/O device.

The big drawback to this configuration is that you have to keep track of the state of each panel and update them independently to give the illusion that it is in fact one continuous display. I tried to hide this behind some basic putc()- and puts()-type functions because I wanted smooth vertical scrolling as new lines come in. It's transparent to the monitor program, but the internals are a bit messy. The user experience seems pretty good though. When a cursor is on the last row and a new line comes in, the bottom three rows shift up one and the whole screen redraws. I was afraid this would be noticeably slow, but it's instantaneous. I'll have to upload a video of this in action.

In other news, I made some more progress in understanding z88dk. I was able to utilize the embedded Z180 CRT code instead of having to hack together my own, but in the process, I broke my interrupt support. Back to the docs to figure out the "official" way to implement ISRs.

Discussions