In my quest to build my first CPU, I am trying to hook up a PS/2 keyboard to my FPGA. The keyboard is a Perixx PERIBOARD-409P.
After a bit of reading, I hooked up the keyboard to a scope to verify its correct behaviour.
Unfortunately, what I get is a flow of continuous 0xAA codes. I am not able to see any other code, no matter what key I press.
This is happening immediately after the LEDs flash. I read here that the LEDs flash during the POST routine. If everything goes well, the keyboard should send a single 0xAA code to indicate a successful POST operation.
What I don't understand is why I keep getting this code and if there is a way to avoid it.
Does someone have any idea about this?
EDIT
I am using the FPGA's 5 V pins only to power up the keyboard. I connect data and clock directly to the scope. I also tried an Arduino, but the result was similar. The following picture shows my current setup:
From what I have understood about the protocol, what should happen is:
- The keyboard is powered-up.
- LEDs flash and the keyboard transmits
0xAA
(BAT) - When I press a key, the keyboard will drive CLOCK low 11 times, and the DATA is an 11-bit serial word:
data = [start, d0,..d7, parity, stop]
The problem I have is that the keyboard gets stuck at step 2. It keeps sending 0xAA
and it does not send any other code when I press a key.
I also tried to hook up the keyboard to a normal PC, and it works correctly.
What am I doing wrong?
EDIT - 2
After a lot of browsing, I found this post where they explain that the keyboard I am using implements a different protocol from the standard PS/2.
Basically the PERIPERI keyboard sends the 0xAA and waits for the host to reply back. This is the protocol implemented.
So, I ordered a new (very old) keyboard and I will try to see what happens.