Author Topic: Help needed: hacking into an old XT (?) keyboard  (Read 1537 times)

0 Members and 1 Guest are viewing this topic.

Offline rayrikou

  • Thread Starter
  • Posts: 1
  • Location: Brazil
    • Martin's den
Help needed: hacking into an old XT (?) keyboard
« on: Sun, 28 May 2017, 11:16:28 »
Hi!

I friend of mine recently gave me a keyboard for a SID 501 - what seemed to be a brazilian model of an IBM PC XT. There's very little online, and I know the machine was manufactured in 1986:



I've disassembled the cover, and identified the VCC (5V), GND, DATA and CLK pins on the board. DATA and CLK pins are connected to a tri-state buffer IC and are pulled up by two 2k ohm resistors.
While idle, the keyboard exhibits the following behaviour (DATA line on top, CLK on bottom):



DATA line is being driven low and pulsed by the keyboard, and the CLK line remains high. This behaviour is constant, regardless of keypresses of any kind. Only these 30us pulses, 670us apart - nothing more.

However, if I drive the CLK line low during one of these pulses, the pulsing stops for about 80ms, and then there's a reply - which looks like a 0xAA, similar to a XT self-test response (DATA line on top, CLK on bottom):



(note that I've kept CLK low for 10ms, but keeping it low during one of these 30us pulses suffices). Zooming in on the response:



This pulsing behaviour doesn't seem to match anything I've read on both XT and AT. It also doesn't seem to match any of the protocols listed here: http://www.kbdbabel.org/signaling/index.html
The keyboard runs on a SHARP Z80A CPU. I haven't found any approximate match on kbdbabel (http://kbdbabel.org/schematic/index.html), so I'm in the dark about its exact model. 

For now, it's a useless brick :( Could someone shed some light on this? Is this odd keyboard using a different protocol, other than XT?

Any directions will be greatly appreciated :)

Thanks!

Code: [Select]

EDIT: Got it to work! (sort of...)

I've disassembled the keyboard, and found out that it uses foam element switches. They looked pretty beaten, and were mostly falling apart:



This also revealed the contacting plates under the keys. There are high frequency (~500kHz to 2Mhz) pulses running through the plates, so I'm assuming it's some sort of capacitive mechanism.
The mid trace still intrigues me - contact to it doesn't seem to be necessary in generating the keystrokes.



Shorting the larger pads with tweezers (w/ insulated handles) finally generated some comprehensible behavior on the scope. Make and break codes poped up for each key, and even typematic behavior seems to be there.

Here's part of the capture for a 'Q' keystroke:



I assume there's some bouncing going on, since the foam contacts reportedly prevent it. Also, the same pulse train is present after keystroke data is clocked out.
So, it seems that the keyboard runs on some weird protocol, not very similar to XT, IMHO.

Anyway, just wanted to document this in case anyone runs into the same oddity. Any new info will be appreciated!

Thanks!
« Last Edit: Sun, 28 May 2017, 22:45:59 by rayrikou »