• Please review our updated Terms and Rules here

AT to XT Keyboard Converter

Great Hierophant

Veteran Member
Joined
Mar 22, 2006
Messages
1,928
Location
Massachusetts, USA
I want to know if anyone has ever designed a converter box that will make an AT keyboard, like the most of the IBM Model Ms and other more modern 101 and 104 keyboards, work properly in a PC/XT that expect an 83-key keyboard or need a keyboard with an XT/AT switch. I have heard of boxes that will let an XT keyboard work in a modern system that expects an AT keyboard, but has the reverse been done?
 
There has certainly been a box to do the opposite, and they go for about $100 if you can find a custom one online.. Perhaps they work in either direction?
 
If you feel like building custom ones for XT-to-AT I'd buy one.. Hopefully not at $100 tho :p
 
i'd like one of these boxes too. i have one of my 8088s on a KVM switch but it's a pain because i have to keep a separate keyboard sitting on top of the tower and make room for it on my desk when i switch to it.

making a converter would be pretty trivial with a very very low powered single board computer, 2 serial ports, and a little bit of ROM code.

read the tech details of the XT keyboard protocol here:

http://www.cs.cmu.edu/~jmcm/info/key2.txt



tech details of the AT/PS2 protocol:

http://www.beyondlogic.org/keyboard/keybrd.htm




a possible cheap-o solution would be wiring an AT style keyboard into one of the 8088's serial ports and using a specially designed TSR to interpret and move the data into the computer's keyboard buffer, but i'm not sure if that would work for all software or not.
 
Last edited:
making a converter would be pretty trivial with a very very low powered single board computer, 2 serial ports, and a little bit of ROM code.

With a decent small uC, you probably don't even need the serial ports--just bit-bang it.

And, in fact, most uC UARTS can't be used--while the keyboard sends a start bit, it sends the remainder of the data in clocked synchronous mode--and uses an 11-bit (start+8 data+parity+stop) format. Most UARTs can't handle 8bits+parity.

I'm first going to see if it'll fit in a PIC 12F629. That'd be very slick. Otherwise, I can use an ATMega8.
 
Last edited:
I just assembled the prototype in an old "Monitor Miser" box. It's scarcely anything--an 8 pin 12F629, a capacitor and a couple of resistors. (The LED is for debugging).

Given the right components (i.e. SMT), one could probably fit it inside a 5-pin DIN connector shell.

I'll be working on the code this week--I've already constructed the translation tables.

All in all, this looks like it will be very easy.

attachment.php
 

Attachments

  • xtatcon.jpg
    xtatcon.jpg
    24.4 KB · Views: 7
I just assembled the prototype in an old "Monitor Miser" box. It's scarcely anything--an 8 pin 12F629, a capacitor and a couple of resistors. (The LED is for debugging).

Given the right components (i.e. SMT), one could probably fit it inside a 5-pin DIN connector shell.

I'll be working on the code this week--I've already constructed the translation tables.

All in all, this looks like it will be very easy.

attachment.php

Thats it? I don't even see $5 worth of components there!

The interface on clickykeyboards is using a much larger chip, is the opposite conversion (XT to AT)more complex, hardware wise?
 
I just assembled the prototype in an old "Monitor Miser" box. It's scarcely anything--an 8 pin 12F629, a capacitor and a couple of resistors. (The LED is for debugging).

Given the right components (i.e. SMT), one could probably fit it inside a 5-pin DIN connector shell.

I'll be working on the code this week--I've already constructed the translation tables.

All in all, this looks like it will be very easy.

attachment.php

I would suggest building it into a small box that accepts both 5 pin DIN and 6 pin mini-DIN female connectors with a 5 pin DIN male cable coming out the other end. This way you can use any type of AT keyboard and you won't need an adapter. I would also include a small fuse just in case the KVM (or whatever) sends some bad voltage down the line.

Do you have a schematic yet?
 
Just a quick update--the converter is currently operating with an IBM Model M keyboard on an XT. I've still got to write some code to manage the keyboard LEDs, but otherwise, I don't have any unresolved issues.

The prototype is largely unchanged, other than getting rid of the LED (it's no longer necessary) and a couple of very minor wiring changes.

I'm not interested in building these myself unless there's a substantial interest in them, but I'll post the code and construction details for those who are. For those without a PIC programmer, however, I'm willing to furnish pre-programmed PICs for a small bit above my cost of the chip itself.

The PIC 12F629 is exactly right for this project--it's probably the minimum (about $1 in quantities) that will do the job, yet there's plenty of code space left in case someone wants to do something interesting, such as use the 128-byte EEPROM for keyboard macros for F11 and F12, for example.
 
Thats it? I don't even see $5 worth of components there!

The interface on clickykeyboards is using a much larger chip, is the opposite conversion (XT to AT)more complex, hardware wise?

Yup, that's it. If I'd wanted to wire it up inside of a keyboard, it wouldn't even be that. Just a dead-bug bit inside the case.

As far as complexity, it's a wash. Converting XT to AT keystrokes requires that the converter understand bi-directional AT protocol, but so does converting AT to XT.

I'd say that there's little difference. I was tempted to try a 6-pin PIC 10F series uC, but there's just not enough I/O on one of those.

Hobbyists like to use the 16F84 because it's got a fair number of I/O pins and there's a lot of existing code for it, so you see it in a lot of designs. But wasting real estate and resources bothers me.
 
The PIC 12F629 is exactly right for this project--it's probably the minimum (about $1 in quantities) that will do the job, yet there's plenty of code space left in case someone wants to do something interesting, such as use the 128-byte EEPROM for keyboard macros for F11 and F12, for example.

Would it technically be very difficult to allow XT or AT keyboards to work with a Tandy 1000/A/HD/SX/TX? I know Northgate's keyboard supported XT/AT/Tandy/AT&T/Amstrad and even some Amigas.
 
I'm not interested in building these myself unless there's a substantial interest in them, but I'll post the code and construction details for those who are. For those without a PIC programmer, however, I'm willing to furnish pre-programmed PICs for a small bit above my cost of the chip itself.

I am very interested in one, but the flashing option would work for me too (and sounds fair).

Have you tested it with a KVM?

Also, could one integrate a fuse into it, just in case there is some sort of surge from the keyboard side (ie a KVM, it happened to me on my 386sx)?

This is pretty cool btw.
 
I can't build one myself, I'm too much of a nub with a soldering iron..

Is there any chance you'd make one that had a switch to go from XT->AT to AT->XT for me? I'd pay..
 
To do one that went both ways, I'd probably have to move up to a microcontroller with more I/O pins and do some redesign. Yes, it could be done, but it'd be a one-off as XT keyboards aren't particularly common nowadays and you'd probably be the only one to use the feature.

I'll think about it, though if there's much interest in this one.
 
Back
Top