This really is a cute 'minimal' computer design.
I was wondering what kind of 'minimal' hardware might be used to drive my little 2-pin 8-bit LCD backpack (see below) instead of an LED display? I need a single latched pin to drive the backpak 'CLK' line along with an active high pulse on the backpack 'E' line after loading all eight bits into the shift register IC. The RC time constant on the LCD backpack requires 10-uS per bit, including a 1-uS 'CLK' pulse, which may be a bit fast for a 2-MHz 65C02 so those RC values might need to be changed. So, I would just need one of the two 74HC273 latch ICs, right?
Cheerful regards, Mike
Code:
/* *
* K8LH 2-Pin 8-Bit 74HC595/74HC164 LCD low level driver *
* */
void PutLCD(char work) // write byte to 74HC595 & LCD
{ char bitctr = 8; //
do // load 74HC595 shift register
{ if(!work.7) clk = 0; // if a '0', set clk = 0
delay_us(9); // charge or drain cap (3*tau)
clk = 0; clk = 1; // clock bit into shift register
work <<= 1; // shift next bit into b7
} while(--bitctr); // until all 8 bits clocked out
if(rs == 0) clk = 0; // make clk pin = rs flag
ena = 1; ena = 0; // latch 595, pulse lcd 'e' pin
clk = 1; // leave clk pin high
}