I've been learning a lot building and modifying the ben eater 6502 project, and reading this forum along with Garth's primer.
Currently I have the 20x4 LCD hooked to a VIA with port A for 8-bit data, and 3 pins of port B for the LCD's enable, r/w and r/s pins.
This makes the code a bit fiddly since you need to set up port A and B with the right data while keeping enable low, and then re-write on B to strobe the enable.
Is there any reason not to replace the VIA port B pins with something like the address decoding scheme used to route to ram/eeprom/via?
I think I saw an example of this somewhere. e.g. connect LCD r/w to the 6502/6522 r/w, connect LCD r/s to address line 0, and LCD enable to (say) address line 4. With the idea that I can (say) read to VIA_ADDR + 16 + 0 for chip-enable read of LCD reg 0, or write to VIA_ADDR+16+1 for write to reg 1.
Would something like that work? It seems more elegant than the port B approach so I suspect I'm missing something.
On a related note, I've seen some other threads talking about "clock-qualified" chip select as either a good or bad thing. e.g. here:
viewtopic.php?p=87825 Is that to ensure the data lines are set up before the CS happens? Do I need to worry about that with a simple 1MHz setup? That didn't seem to feature in the ben eater discussion.