Recently Till Harbaum added a PS2 converter for the MiST. Since the IO is handled by the ARM processor the exchange with the FPGA goes via SPI. This makes it difficult to use existing HDL sources because often a PS2 interface is assumed.
Grant’s multi computer tutorial expects a PS2 keyboard as well. With the new converter I gave the project another go.
Putting the sources together and connecting the required pins was easy but it didn’t worked out. I still wasn’t able to type something on the screen. I had a little mail exchange with Till and asked him if he sees some obivious error done by me.
He replied pretty quickly and found the problem. I drove the PS2 converter with the CPU clock and that was too much. I read in the converter sources that it needs a clock between 10-16 … kHz but I blindly ignored the kHz and used the cpu clock which was around 12 MHz. 🙂
After I added a simple frequency divider which I found here and used 12 kHz for the PS2 converter clock the keyboard worked and I was able to type in some simple commands.
Below is a crappy image taken with my mobile:
As usual the sources can be found in my github repository: https://github.com/wsoltys/multicomp