So how does a PS/2 keyboard interface work?
Channel:Ben Eater · Length:33:07 · Published:2021-03-06 · Views:571758
Summary
Ben Eater explains how the PS/2 keyboard interface works, covering its clocked serial protocol and scancodes. He builds up the hardware-level understanding needed to read keypresses.
Why HN recommends it
HN commenters point to it as the clearest explanation of the PS/2 protocol, usually when keyboard interfaces come up.
There's a good video on how PS/2 works here — HN, 2021
Electronics & circuit design · Embedded systems & DIY electronics
Subtitles (excerpt)
keyboards are one of the most familiar computer input devices and for many years this ps2 interface was ubiquitous it also happens to be a relatively simple interface which makes it great for interfacing with a home built computer like the 6502 and if you don't happen to have a home built computer well check out eater.net 6502 for kits and links to all the videos on my channel on how i went about building this but anyhow if we look at this ps2 connector you can see there are six pins in here and actually only four of them are used two of them pins three and four provide power to the keyboard and then the other two pins five and one are clock and data for communication with the keyboard so that the keyboard can send information about keystrokes now to connect to these pins i'm going to use a cable here that has the opposite connector and i can just use this and i'm just going to cut this end off and then strip off the insulation to get to the wires inside and inside here we've got looks like four wires red black orange brown as well as the shield so go ahead and strip these as well they're thin enough i can just use my fingernails and i'll just twist these to kind of clean everything up so there we go
On Hacker News
There's a good video on how PS/2 works here: [VIDEO] It's pretty straight-forward. There are also pre-made kits for digitizing typewriters if that interests you. — zackbloom, 2021-04
I'd imagine it would be very difficult, and would require a relatively powerful MCU. Ben Eater's made a few videos discussing how PS/2[0] and USB keyboards[1] work. USB's a vastly more complicated protocol compared to PS/2. [0] [VIDEO] [1] [LINK] — RJIb8RBYxzAMX9u, 2021-10
think might be at end of this one < [VIDEO] > though there's a few he's done recently on USB spec — bear8642, 2021-09
Piggy-backing this comment to add some context for the OP video: This "USB device discovery" video is actually the latest in a series of videos where Ben Eater is building a simple 8-bit computer on breadboards. He hooked up a PS/2 keyboard as an input device, and then got sucked into a tangent of investigating and explaining keyboard protocols. - He investigates the PS/2 keyboard protocol: [VIDE… — thristian, 2021-07
Related videos
- AT&T Archives: Similiarities of Wave Behavior (Bonus Edition) · AT&T Tech Channel · 28:02
- 8-bit computer update · Ben Eater · 6:53
- Reverse emulating the NES to give it SUPER POWERS! · suckerpinch · 22:21
- “Hello, world” from scratch on a 6502 — Part 1 · Ben Eater · 27:24
- Finding the Missing Memristor - R. Stanley Williams · The Qualcomm Institute · 47:52
- [LIVE] How to Achieve Proper Grounding - Rick Hartley - Expert Live Training (US) · Altium · 2:19:51
- Shenzhen: The Silicon Valley of Hardware (Full Documentary) | Future Cities | WIRED · WIRED Investigations · 1:07:51
- I bought 1000 meters of wire to settle a physics debate · AlphaPhoenix · 22:48
- "Programming a 144-computer chip to minimize power" - Chuck Moore (2013) · Strange Loop Conference · 40:12
- What your Differential Pairs Wish You Knew with Rick Hartley - AltiumLive Keynote · Altium · 1:03:22
- The world's worst video card? · Ben Eater · 32:47
- The Art of Making a Nixie Tube · Dalibor Farný · 37:50
- How does a USB keyboard work? · Ben Eater · 34:15
- Watch electricity hit a fork in the road at half a billion frames per second · AlphaPhoenix · 26:29
- BlueHat IL 2019 - Andrew "bunnie" Huang - Supply Chain Security: "If I were a Nation State...” · Microsoft Israel R&D Center · 45:37
- Old pinball machines are amazingly complex · Technology Connections · 50:08