epooch wrote:
Maybe I could suggest a solution that does not seem well documented anywhere... Just use an MC6850 ACIA connected to a 74LS05 (for open collector I/O). When set to 1x clock, 8 bits, odd parity, 1 stop bit, the ACIA will do everything for you, including parity checking.
The only issue I can see is that the ACIA does not seem to get enough clocks with the PS/2 protocol to set the read register full flag. So, you end up one byte behind the keyboard. That seems to work fine though because you will get the key code when it repeats or sends the break code (on key up) anyway. So a key down/up cycle gives you this:
[previous key code]...[key code][$F0]
instead of:
[key code]...[$F0][keycode]
It is nice because it is does not take a lot of processor cycles, has a smaller footprint than using a VIA, and only one support IC with some pull up resistors.
Edit: Sorry, I missed the last page of posts and just realized that you already resolved this!
Always great to have alternatives! I'm happy I got it working with only an extra half '74 but it is a bit demanding on the software side - not too many cycles but it does require extra attention to IRQ handling.
Many 6502 builds will have an ACIA already and if it wasn't for the extra board space I would probably incorporate one - also because they too are relatively well available second hand.
I think I've see a minimal build or two with simply an ACIA, 6502, RAM, ROM and address decoding and I guess it wouldn't be that hard to use the ACIA for both keyboard input and serial output - but that would be missing the TX clock.. I guess the 6502 could run at a multiple of the common serial clocks.