bjoernQ / ps2keyboard-esp32c3

ESP32-C3 interfacing to a PS/2 Keyboard (bare-metal Rust)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESP32-C3 interfacing to a PS/2 Keyboard (bare-metal Rust)

Very simplified example of connecting a PS/2 keyboard to ESP32-C3

You need to build it with the release profile (i.e. cargo run --release) since otherwise the interrupt latency is too slow.

Screenshot

Circuit

  • 2 x 2.2kΩ resitors
  • 2 x 120Ω resitors

    Keyboard                                    ESP32-C3

    5V      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  5V

    GND     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  GND

                                        ┏━━━━━┓
    DATA    ━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┫ 120 ┣━━━  IO1
                                 ┃      ┗━━━━━┛ 
                                ┏┻┓ 
                                ┃2┃ 
                                ┃.┃
                                ┃2┃
                                ┃k┃
                                ┗┳┛
                                 ┃
                                 ┣━━━━━━━━━━━━━━━━  3V3
                                 ┃
                                ┏┻┓
                                ┃2┃
                                ┃.┃
                                ┃2┃
                                ┃k┃
                                ┗┳┛
                                 ┃      ┏━━━━━┓
    CLK     ━━━━━━━━━━━━━━━━━━━━━┻━━━━━━┫ 120 ┣━━━  IO2
                                        ┗━━━━━┛                                                

About

ESP32-C3 interfacing to a PS/2 Keyboard (bare-metal Rust)

License:Apache License 2.0


Languages

Language:Rust 72.9%Language:Shell 27.1%