Close

construction and testing

A project log for C64 LCD display

a LCD display, connected to the expansion port of the C64

frank-bussFrank Buss 06/04/2017 at 18:280 Comments

First I wrote an Arduino script to test the display (a 1602A display, 16 characters, 2 lines, as you can get cheap on eBay), but without any display library, to make it easier to port to the C64, see the file arduino-test.c. Then I used a NOR gate and a 8 bit latch and soldered it to my cart-proto board, as you can see in this circuit diagram:

You can download the Gerber files for the board from here and e.g. buy boards from Electrow or any other PCB manufacturer. The finished test setup with display looks like this:

Then I ported the program to a C program for cc65 for the C64, see the file lcd-test.c. Instructions how to compile it are at the top. The compiled program is lcd-test.prg, which I copied to a SD-card and the load from a SD2IEC drive to my C64. The result:

Some interesting notes: if you use a "poke" command from BASIC, then a "STA($14),y" is executed, which results curiously in two impulses on the IO1 line:

But if you use a "STA $DE00", then only one impulse is generated:

To allow to use the hardware from BASIC, too, I used the NOR gate to qualify the IO1 impulse with the RW impulse: only when both impulses are low, the 74LS273 latches the new values from the data bus of the C64 with the rising edge on the clock input.

Discussions