Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/no0ne/ps2pico
USB keyboard to PS/2 / AT / XT interface converter using a Raspberry Pi Pico
https://github.com/no0ne/ps2pico
at-keyboard hid keyboard pc-at pc-xt pcat pcxt pio ps2 ps2-keyboard raspberry-pi-pico rp2040 usb-keyboard xt-keyboard
Last synced: 13 days ago
JSON representation
USB keyboard to PS/2 / AT / XT interface converter using a Raspberry Pi Pico
- Host: GitHub
- URL: https://github.com/no0ne/ps2pico
- Owner: No0ne
- License: mit
- Created: 2022-07-16T17:40:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-26T08:02:37.000Z (6 months ago)
- Last Synced: 2024-10-30T21:04:03.735Z (13 days ago)
- Topics: at-keyboard, hid, keyboard, pc-at, pc-xt, pcat, pcxt, pio, ps2, ps2-keyboard, raspberry-pi-pico, rp2040, usb-keyboard, xt-keyboard
- Language: C
- Homepage:
- Size: 1020 KB
- Stars: 120
- Watchers: 14
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ps2pico
USB keyboard to PS/2+AT or XT interface converter using a Raspberry Pi Pico|![hw1](https://raw.githubusercontent.com/No0ne/ps2pico/main/doc/hw1.jpg) |![hw2](https://raw.githubusercontent.com/No0ne/ps2pico/main/doc/hw2.jpg) |![hw3](https://raw.githubusercontent.com/No0ne/ps2pico/main/doc/hw3.jpg) |![hw4](https://raw.githubusercontent.com/No0ne/ps2pico/main/doc/hw4.jpg) |
|-|-|-|-|Keyboard + Mouse variant: https://github.com/No0ne/ps2x2pico
# Usage
* Download `ps2pico.uf2` or `ps2pico-XT.uf2` from https://github.com/No0ne/ps2pico/releases
* Copy `ps2pico.uf2` or `ps2pico-XT.uf2` to your Pi Pico by pressing BOOTSEL before pluggging in.
* Afterwards connect a USB keyboard using an OTG-adapter and PS/2+AT or XT 5V to Pico VBUS.
* Also works with wireless keyboards with a dedicated USB receiver.
* 3.3V/5V conversion is done with two NPN transistors, two zener diodes and four resistors as shown below:
```
PS/2+AT / XT CLOCK
| ____
|__________|10k |___________ GPIO 14
____ | |____| |
GPIO 15 ___|2k2 |____|/ BC547 __|__
|____| |\e / \ 3V6
| |
____|__GND________________|___PS/2+AT / XT DATA
| ____
|_________|10k |____________ GPIO 17
____ | |____| |
GPIO 16 ___|2k2 |____|/ BC547 __|__
|____| |\e / \ 3V6
| |
____|__GND________________|___
```
![ps2pico](https://github.com/No0ne/ps2pico/assets/716129/b0133c44-c170-40f4-a3ad-c545aee92532)# NuXTv2
If you have a [NuXTv2](https://monotech.fwscart.com/NuXT_v20_-_MicroATX_Turbo_XT_-_10MHz_832K_XT-IDE_Multi-IO_SVGA/p6083514_19777986.aspx) you can build an internal version of the ps2pico-XT! Replace U10 with the pico, remove RN13 and add two 4k7 pull-up resistors as shown below:|![hw5](https://raw.githubusercontent.com/No0ne/ps2pico/main/doc/hw5.jpg) |![hw6](https://raw.githubusercontent.com/No0ne/ps2pico/main/doc/hw6.jpg) |![hw7](https://raw.githubusercontent.com/No0ne/ps2pico/main/doc/hw7.jpg) |
|-|-|-|# Build
```
export PICO_SDK_PATH=/path/to/pico-sdk
mkdir build
cd build
cmake ..
make
```# Resources
* https://wiki.osdev.org/PS/2_Keyboard
* https://github.com/Harvie/ps2dev/blob/master/src/ps2dev.cpp
* http://www.lucadavidian.com/2017/11/15/interfacing-ps2-keyboard-to-a-microcontroller/
* https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf
* https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol
* https://github.com/AndersBNielsen/pcxtkbd/blob/master/XT_KEYBOARD.ino