Author Topic: Parkbd - Connecting XT keyboard to a PC in Linux  (Read 3409 times)

0 Members and 1 Guest are viewing this topic.

Offline JBert

  • Thread Starter
  • Posts: 764
Parkbd - Connecting XT keyboard to a PC in Linux
« on: Sun, 13 September 2009, 10:54:11 »
Well, there hasn't been a thread nor wiki article dedicated to this topic, but there should be a way of getting an XT keyboard to work in Linux.
This thread can be used to document process and gather feedback.


Let's start at the beginning:
A couple of years ago, Vojtech Pavlik coded up a Linux driver that could read the parallel or serial port and use it as keyboard input.
For the XT protocol, he envisaged a simple adapter circuit to be plugged on the parallel port: (schematic can be found in the driver's source)
Code: [Select]
To connect an AT or XT keyboard to the parallel port, a fairly simple adapter can be made:
Parallel port            Keyboard port

    +5V --------------------- +5V (4)
 
                ______
    +5V -------|______|--.
                         |
    ACK (10) ------------|
                         |--- KBD CLOCK (5)
    STROBE (1) ---|<|----'
   
                ______
    +5V -------|______|--.
                         |
    BUSY (11) -----------|
                         |--- KBD DATA (1)
    AUTOFD (14) --|<|----'

    GND (18-25) ------------- GND (3)
   
The diodes can be fairly any type, and the resistors should be somewhere around 5 kOhm, but the adapter will likely work without the resistors, too.

The +5V source can be taken either from USB, from mouse or keyboard ports, or from a joystick port.
Unfortunately, the parallel port of a PC doesn't have a +5V pin, and feeding the keyboard from signal pins is out of question with 300 mA power requirement of a typical AT/XT keyboard.

The adapter needs a 5V Vcc, so check if you got an old power supply or a free USB port from which you can leech some power. Also, I think the resistors are necessary.

Anyway, in my case it didn't work. I don't know if my keyboard is bust, the circuit is wrong or there is some other compatibility problem. It just spew errors about "Unknown scan code 0xFF" and stuff like that - as if it read data from the clock line.
I do have to note though that my current circuit is a bit of ghetto work. I didn't have any perfboard, so I just cut some pieces of PCB with usable traces from some old appliances. As a power source, I cut a 5V voltage regulator from a busted PSU and feed it 6-9V to get the desired output.

Once I build a cleaner version, I'll try to post an update and a schematic.
IBM Model F XT + Soarer's USB Converter || Cherry G80-3000/Clears

The storage list:
IBM Model F AT || Cherry G80-3000/Blues || Compaq MX11800 (Cherry brown, bizarre layout) || IBM KB-8923 (model M-style RD) || G81-3010 Hxx || BTC 5100C || G81-3000 Sxx || Atari keyboard (?)


Currently ignored by: nobody?

Disclaimer: we don\'t help you save money on [strike]keyboards[/strike] hardware, rather we make you feel less bad about your expense.
[/SIZE]

Offline Rajagra

  • Posts: 1930
Parkbd - Connecting XT keyboard to a PC in Linux
« Reply #1 on: Sun, 13 September 2009, 11:01:17 »
That seems to be designed as a bidirectional connection. I thought XT keyboards could only transmit, so you should only need the Gnd, +5V, Ack and Busy connections.

Offline JBert

  • Thread Starter
  • Posts: 764
Parkbd - Connecting XT keyboard to a PC in Linux
« Reply #2 on: Sun, 13 September 2009, 11:17:39 »
AFAIK this isn't a problem as long as you don't write to the parallel port.
IBM Model F XT + Soarer's USB Converter || Cherry G80-3000/Clears

The storage list:
IBM Model F AT || Cherry G80-3000/Blues || Compaq MX11800 (Cherry brown, bizarre layout) || IBM KB-8923 (model M-style RD) || G81-3010 Hxx || BTC 5100C || G81-3000 Sxx || Atari keyboard (?)


Currently ignored by: nobody?

Disclaimer: we don\'t help you save money on [strike]keyboards[/strike] hardware, rather we make you feel less bad about your expense.
[/SIZE]

Offline microsoft windows

  • Blue Troll of Death
  • * Exalted Elder
  • Posts: 3621
  • President of geekhack.org
    • Get Internet Explorer 6
Parkbd - Connecting XT keyboard to a PC in Linux
« Reply #3 on: Sun, 13 September 2009, 17:37:17 »
If I did that on my computer, I'd have to switch off the keyboard to use the printer!
CLICK HERE!     OFFICIAL PRESIDENT OF GEEKHACK.ORG    MAKE AMERICA GREAT AGAIN MERRY CHRISTMAS

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
Parkbd - Connecting XT keyboard to a PC in Linux
« Reply #4 on: Sun, 13 September 2009, 17:41:38 »
I almost forgot about those dark days where people actually had to connect their printer directly to their computer... =P

Offline InSanCen

  • Posts: 560
Parkbd - Connecting XT keyboard to a PC in Linux
« Reply #5 on: Mon, 14 September 2009, 07:16:38 »
Network Attached Printers rule...

As does Storage, and well, anything else I can thing of that I can bung on a GigE port.

Every PC/Seat has access to it (Given permissions/shares). Love it.

I will be interested in this project though, I was researching something similar myself, but my coding, well, BASIC and Z80 ASM (Sinclair Spectrum! Woohoo!) is where it's at, though I am trying to learn C++.
Currently Using :- IBM M13 1996, Black :
Currently Own :- 1391406 1989 & 1990 : AT Model F 1985 : Boscom 122 (Black) : G80-3000 : G80-1800 (x2) : Wang 724 : G81-8000LPBGB (Card Reader, MY) : Unitek : AT102W : TVS Gold :
Project\'s :- Wang 724 Pink-->White Clicky : USB Model M : IBM LPFK :
Pointing stuff :- Logitech MX-518 : I-One Lynx R-15 Trackball : M13 Nipple : Microsoft Basic Optical\'s
: