Skip to content

Commit

Permalink
Add info on electrical connections
Browse files Browse the repository at this point in the history
  • Loading branch information
lindi2 committed Jul 31, 2021
1 parent ce25409 commit 3cc35e1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Expand Up @@ -18,6 +18,24 @@ Further reading:
* https://www.avrfreaks.net/sites/default/files/PS2%20Keyboard.pdf (PS2 specification)
* https://github.com/ndusart/ps2-keyboard (similar library using timers instead of delays)

# Electrical connections

The following is an easy way to get started:

* Take a PS/2 mouse apart without cutting any cables.
* Desolder the socket that the PS/2 cable is connected to.
* Use a multimeter to find the pinout of the socket.
* Solder the socket to an Arduino proto shield. If the pitch does not match you can also consider simply using mounting the socket vertically with super glue and soldering wires directly to the socket.
* Solder three wires on the Arduino proto shield as follows.

| Arduino pin | PS/2 pin | example color (on a HP mouse) |
| ----------- | -------- | ----------------------------- |
| 2 | DATA | brown |
| 3 | CLK | orange |
| GND | GND | green |

There is no need to connect the VCC. If you want to use different pins on the Arduino side you can just adjust the call to the PS2dev constructor. In theory this should allow you to emulate multiple keyboard on one Arduino but this has not been tested.

# Notes

* If you are implementing keyboard you should read the commands from computer quite often. I don't know how often, but 1 second is not enough. You will miss stuff like num/caps/scroll LED changes and maybe even more important stuff needed for proper ps2 protocol initialisation.
Expand Down

0 comments on commit 3cc35e1

Please sign in to comment.