PS2 keyboard
State of the part
This part is fully built and tested. We are currently working on integration testing.
Participators: Ferdinand, Johannes K., Julian D., Mona
Protocol
Schematics
Layout
Flash Program:
Main Pinout
INT | A0 | A1 | A2 | A3 | D0 (clk enable) | D1 (PS2_clk pull) | D2 (latch shift) | D3 (interrupt) | INT | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||
1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | |||
2 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | |||
3 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | |||
4 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | |||
5 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | |||
6 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | |||
7 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | |||
8 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | |||
9 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | |||
10 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 6 | |||
11 (end of protocol) | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 10 | |||
12 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | |||
13 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | |||
14 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | |||
15 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
Addressing
0x0008-0x000f on address bus
Equivalent to A4=1, A5-A16=0
So at address 16-31 D4 is high
Testing
We used an Arduino Mega in order to simulate address and data bus and resolve the received keycodes to chars.
The code can be found here.
Limitations
As of now, our design is not able to handle print screen, pause, arrows and other multicode keys.
Findings
- First proof of concept of our hardware interrupt setup successful
- Keyboard buffers data until our hardware is ready to receive
- Scan codes are very different for each standardized keyboard layout