Sooo…. After some agonizing days trying to get the PS/2 interface to work we finally found how to get it to work, more or less. But it would never be great, or even good. And it would also require more logic chips in a already full spot. It would not have a buffer, it would not be able to transmit (setting the leds on the keyboard) and the IRQ would be very finicky. So I went back to the drawing board and started looking at ways to do what I want, but in a good way.
And then I realized that with a simple microcontroller I would be able to do all the things I wanted it to, and then some more!
So I collected all my requirements (what pins are needed for interfacing) and realized that the trusty old ATmega328p (Arduino someone?) would have the perfect amount of pins for the job. And then I found out that it would also be possible to do some RTC work in it as well, with the addition of an 32kHz crystal, battery and some extra diodes. I just had to add 2 more address lines (There will be 8 registers in total instead of 2).

And after some coding I even realized that I can pick a smaller ATmega, the ATmega88 seems to be a perfect fit for this.
And after some rough estimate it seems like the battery will hold for almost 10 years, but I added some error flags to the registry info for good measure.
With this update I can lower the chip count by 8 chip, and the price for crystal and battery will make this a almost break even upgrade. With a lot of new features.
- 64 byte FIFO on both mouse and keyboard data.
- Transmission to the keyboard (to set LEDs) with buffer as well.
- IRQs that behave as expected (releases at read of the register).
- RTC, YY-MM-DD HH:MM:SS + DayOfWeek
- Battery backup of RTC
So it will be a huge upgrade to the Stage 3. And I also made myself a prototype board so I can test this out before I order the Stage 3 board.
