mac-plus-ps2/README.md

40 lines
1.6 KiB
Markdown
Raw Normal View History

2016-11-24 22:20:26 +00:00
# Arduino-based PS2 -> Macintosh Plus keyboard adapter
2016-11-24 22:33:17 +00:00
This sketch allows to use a PS/2 keyboard with the Macintosh Plus. Mapping between PS/2 keys and Mac keys is stored in the [keymap.ino](mac_plus_ps2/keymap.ino) file. Sketch uses a modified version of the [PS2Keyboard Library](http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html) --- all the logic except `getScanCode()` method have been stripped.
2016-11-24 22:20:26 +00:00
2016-11-26 22:04:35 +00:00
<img src="https://github.com/trekawek/mac-plus-ps2/raw/master/doc/arduino-ps2.jpg" width="50%">
2016-11-24 22:20:26 +00:00
## Connecting to Macintosh Plus
Get a phone cord with RJ10 plug and connect pin as follows:
2016-11-26 21:52:07 +00:00
1. Vcc -> Vin
2016-11-24 22:31:45 +00:00
2. +DATA -> pin 5,
3. +CLK -> pin 6,
4. GND -> GND.
2016-11-24 22:20:26 +00:00
The order of RJ10 pins is the same as in the computer connector:
2016-11-24 22:22:46 +00:00
<img src="https://github.com/trekawek/mac-plus-ps2/raw/master/doc/mac-plus-keyboard-pinout.png" width="50%">
2016-11-24 22:20:26 +00:00
## Connecting to PS/2 keyboard
For the Mini-DIN 6 plug, pins should be connected as follows:
2016-11-26 16:19:44 +00:00
1. +DATA -> pin 3,
2016-11-24 22:20:26 +00:00
2. -,
2016-11-24 22:31:45 +00:00
3. GND -> GND,
4. Vcc -> +5V,
2016-11-26 16:19:44 +00:00
5. +CLK -> pin 2,
2016-11-24 22:20:26 +00:00
6. -
2016-11-24 22:31:45 +00:00
Pinout for the female connector from front (copied from [Wikipedia](https://en.wikipedia.org/wiki/PS/2_port)):
2016-11-24 22:32:14 +00:00
<img src="https://github.com/trekawek/mac-plus-ps2/raw/master/doc/minidin6-pinout.png" width="25%">
2016-11-24 22:31:45 +00:00
## References
* [Similar project based on stm32f0discovery kit](http://www.synack.net/~bbraun/mackbd/index.html),
2016-12-16 13:21:31 +00:00
* Mac Hardware Info (ftp://ftp.apple.asimov.net/pub/apple_II/documentation/macintosh/Mac%20Hardware%20Info%20-%20Mac%20128K.pdf) - contains the description of the protocol,
2016-11-26 16:19:44 +00:00
* [Mac Plus keyboard rawcodes](https://github.com/altercation/tmk_firrmware_hhkb_teensy2/blob/master/protocol/m0110.c).