Electronics > Projects, Designs, and Technical Stuff

PS/2 keyboard behaviour

(1/1)

Dan Moos:
Trying to get a PS/2 keyboard controller working. Right now I just have the keyboard hooked to power and a scope.

With just power, and pull ups on clock and data, the keyboard is sending a byte of data every ~60 mS.

The data it sends is always 11 clock ticks (as it should be), and its a stop bit (0), 8 data bits that are always 55 hex, a parity bit (1) and a stop bit (1)

I feel like I need to reset the keyboard or something. If it helps, I'm using one of those Digilent PS2 adapters, which has built in pull ups. I'm aware that the rev 1 of that little board had an incorrect silkscreen. I'm confident my wiring is correct. Everything its HIGH between data bursts as it should.

As an aside, this is for a homebrew 6502. I am willing to skip the PS/2 interface completely, and tie into the keyboard matrix to do it manually. Is there a standard to how those are laid out on the zebra strip? I know I can brute force figure it out, but I'd rather not!

magic:
There is no standard matrix layout. It isn't simple either, traces make zigzags to avoid ghosting in common key combinations.

0xAA is self-test-ok, maybe you've got the bits backwards?

At any rate, I would just connect it to some host and see what it does to initialize it and do the same.

If you kb supports it, you could avoid dealing with the idiotic extended scancodes and things like 0xE0 0xF0 0x7C 0xE0 0xF0 0x12 by switching to scancode set 3. Google it, I guess.

edit
This is my favorite, highly detailed reference on old PC keyboards.
https://www.win.tue.nl/~aeb/linux/kbd/scancodes.html

See table in 1.2 for non-scancode messages the keyboard may send.
Chapter 12 deals with commands you can send to the kb.
Chapter 10 is scancode maps in various scancode sets. Use set 2 for compatibility with any random keyboard, use set 3 to save your sanity if you can.

Whenever they speak of translated/untranslated, untranslated is the raw bits from the wire and translated refers to what software sees after the bits pass through the byzantine hardware of the PC. Ignore this nonsense when building your own host.

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod