[PLUG] PC/XT keyboards and the 2.6 kernel driver

Carlos Konstanski ckonstan at lunarlogic.com
Mon Feb 21 18:14:36 UTC 2005


Thanks for verifying that the SUN schematic is not what I'm looking for.

It's clear enough that the idea is to tie a parallel port input/output
pair to a single keyboard pin, and to block data going out to the keyboard
(because XT keyboards don't listen for incoming signals).  The only
question not explicitly answered is: in each pin-pair on the parallel port
side, which is input and which is output?  This will be very easy to
deduce from a pinout diagram, or from trial and error if all else fails.
I'm not even sweating this one.

I've consulted the pinout diagrams, and all the pins mentioned by Vojtech
are accounted for.

I found some info on how to draw power from the parallel port, but you
can only get ~5mA.  I'm not sure that will be enough to drive the
keyboard.  It seems like the best option is to get power from a USB
port.  It appears the USB ports are supposed to supply up to 500mA.
This keyboard was not manufactured in an era of conservationalist
thinking.

http://www.hut.fi/Misc/Electronics/circuits/rspower.html

A appreciate all your help, Galen.  The last time I did any electronics
was in high school 20 years ago.  It was traumatic.  I blew up an
electrolytic capacitor - dielectric everywhere, covering a double-size
classroom from floor to ceiling.  The bang was incredible.  It's amazing
how violently a little blue thing can explode.  Good thing there are no
caps in this schematic.

Once I get the thing working, I will follow up with a full schematic.

On Mon, 21 Feb 2005, Galen Seitz wrote:

> Date: Mon, 21 Feb 2005 09:05:35 -0800
> From: Galen Seitz <galens at seitzassoc.com>
> Reply-To: General Linux discussion and assistance <plug at lists.pdxlinux.org>
> To: General Linux discussion and assistance <plug at lists.pdxlinux.org>
> Subject: Re: [PLUG] PC/XT keyboards and the 2.6 kernel driver 
> 
> Carlos Konstanski <ckonstan at lunarlogic.com> wrote:
>
>> It apears I found another copy of the website that contains the schematic
>> diagram that is missing from the page that was found by the guy in the
>> groups-beta.google.com post:
>>
>> http://atrey.karlin.mff.cuni.cz/~vojtech/input/adapters.html
>>
>> This is aimed at SUN keyboards.  I'm not a hardware geek, so I don't
>> know yet if this applies to then IBM XT keyboard.  I think the SUN
>> keyboard and the IBM XT keyboard have different issues to overcome.  But
>> the pinout at the DB-25 end is what the kernel driver cares about, and
>> this is where useful info can be gleaned from this schematic.
>
> The Sun keyboard uses a conventional serial interface, so it is different
> from the XT keyboard.
>
>>
>> One big question is: is the xtkbd driver dependent upon the parkbd
>> driver, or are they totally independent?  Do they expect the same DB-25
>> pinout?
>
> I think xtkbd uses parkbd, thus it would use the same pinout.
> http://lxr.linux.no/source/drivers/input/serio/Kconfig#L67
> http://lxr.linux.no/source/drivers/input/serio/parkbd.c#L191
>
>>
>> There's still confusion, however.  The web page says this circuit works
>> with the parkbd driver, but the schematic plainly shows a DB-9 connector.
>> This fight is a long way from being won.  Maybe one is supposed to wire
>> up a DB-9 connector as shown, and then plug it into a DB-9 to DB-25
>> adapter.  Who knows.  I do know one guy who knows - Vojtech Vavlik.  If
>> I can't make headway, I will have no choice but to pester him a bit.  He
>> should have commented his code.
>
> You should ignore the schematic with the DB9.  You need a schematic that
> shows the XT signals connecting to a DB25.
>
> Here's what Vojtech said:
>  It's really simple, just two diodes and two resistors in this
>  arrangement:
>              ______
>  +5V -------|______|--.
>                       |
>  INPUT PIN -----------|
>                       |--- KBD PIN
>  OUTPUT PIN ---|<|----'
>
>  Now for KBD CLOCK you use STROBE and ACK pins on the parallel port and
>  for KBD DATA you use AUTOFD and BUSY pins on the parallel port. I
>  don't remember the value of the resistor used, but something like 5k
>  should work OK. It's not completely necessary anyway.
>
>  And then you'll also have to connect the keyboard +5V and GND pins. For
>  +5V you can either use the real keyboard or mouse connectors, get +5V
>  from the joystick connector or from an external power supply.
>
>
> Here's the parallel port pinout:
>  http://repairfaq.ece.drexel.edu/REPAIR/F_Pinouts2.html#PINOUTS_013
> Here's the XT connector pinout:
>  http://repairfaq.ece.drexel.edu/REPAIR/F_Pinouts2.html#PINOUTS_017
>
>
> Suggested diodes would be 1N914, 1N4148, or similar.  Use a 4.7K for
> the resistor.  Don't forget that you will need +5V from one of the
> suggested sources.  You can look through the pinout FAQ to find the
> connector pinout for whatever source you choose.
>
> galen
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



More information about the PLUG mailing list