/ps2pico

USB keyboard to PS/2 / AT / XT interface converter using a Raspberry Pi Pico

Primary LanguageCMIT LicenseMIT

ps2pico - PS/2 / AT version

USB keyboard to PS/2 / AT interface converter using a Raspberry Pi Pico

hw1 hw2 hw3 hw4

XT version: https://github.com/No0ne/ps2pico/tree/xt-version

Keyboard + Mouse variant: https://github.com/No0ne/ps2x2pico

Usage

  • Copy ps2pico.uf2 to your Pi Pico by pressing BOOTSEL before pluggging in.
  • Afterwards connect a USB keyboard using an OTG-adapter and PS/2 / AT 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 CLOCK
                       |           ____
                       |__________|10k |___________ GPIO 14
            ____       |          |____|     |
GPIO 15 ___|2k2 |____|/  BC547             __|__
           |____|    |\e                    / \  3V6
                       |                     |
                   ____|__GND________________|___


                 PS/2 / AT DATA
                       |          ____
                       |_________|10k |____________ GPIO 17
            ____       |         |____|      |
GPIO 16 ___|2k2 |____|/  BC547             __|__
           |____|    |\e                    / \  3V6
                       |                     |
                   ____|__GND________________|___

Build

make sure Pico SDK is on develop branch

export PICO_SDK_PATH=/path/to/pico-sdk
mkdir build
cd build
cmake ..
make

Resources