AT To XT Keyboard Adapter

If you got an old PC/XT stored somewhere in basement and want to use a newer keyboard, here’s a little project you might like. [Matt] built an AT2XT keyboard adapter on a prototype board using an AT to PS/2 keyboard cable. An AT2XT keyboard adapter basically allows users to attach AT keyboards to XT class computers, since the XT port is electronically incompatible with PC/AT keyboard types. For those retro computing fans with a lot of old PCs, this trick will be great to connect the XT machines to a KVM (keyboard/Video/Mouse) switch.

[Matt] found schematics for the project on the Vintage Computer Federation Forum, but used a PIC12F675 instead of the specified PIC12F629. He does provide the .hex file for his version but unfortunately no code. You could just burn the .hex file or head up to the original forum and grab all files to make your own version. The forum has the schematics, bill of materials, PCB board layout and firmware (source code and .hex), so you just need to shop/scavenge for parts and get busy.

And if you are felling really 31337, you can make a PS/2 version of the binary keyboard to justify the use of your new adapter.

[via DangerousPrototypes]

18 thoughts on “AT To XT Keyboard Adapter

  1. if im not mistaken, there is no need for source-code?

    we do not need to sign any legal forms to download the hex file, doesnt that mean we are legally allowed to de-compile it ???
    (as long as we dont distribute the de-compiled source-code)
    … i thought PIC16F was a simple matter to “decode” into assembler. even if it was coded in C ???

  2. It’s the keycodes that are different, not the interface.

    AT brought in more keys, and different keycodes. For a while, there were keyboards that could do both, a switch telling the keyboard which keycodes to use. I’ve even seen older keyboards where the switch was inside, I assume leftover stock late enough that nobody wanted an XT keyboard.

    PS/2 keyboards use the same keycodes and interface, but the connector is different so an adapter, to rearrange the lines to the different connector, or changing the connector, fixes that.

    So it’s mow winder a computer is needed to translate here, it’s mot an issue of serial format or speed or level.

    Though at this late a date, who’s using an XT? There are a lot more recent computer that are better and still cheap. And people with XTs lying around probably have the XT keyboards. I know I did, and scrapped them at the same time.

    The other way, XT to AT makes sense, fewer keys, but maybe a greater chance at a mechanical keyboard.

    Michael

    1. The A20 gate is another reason the PC and PC/XT keyboards need an adapter or had to have a mode switch. The PC/AT and later keyboard controllers controlled the A20 gate.
      https://en.wikipedia.org/wiki/A20_line

      Crazy place to put a new part of the additional memory control system in IBM’s newest, fastest business computer for 1984, one of, if not the slowest parts of the motherboard, and in the process of doing so, making the hardware incompatible with the previous two models’ keyboards. So why not toss in software incompatibility by changing scancodes too? If IBM had put A20 somewhere else, they could have just added two more function keys and two more press and two more release scancodes to the PC/XT standard instead of making so many changes.

      Then came AT clones and “fast a20” BIOS options that allowed for switching it from the slow keyboard interface to somewhere faster.

      Lack of A20 support is likely why some PS/2 keyboards flat out will not work with an adapter on old 286/386/486 computers without a fast A20 option. At some point PC manufacturers quit implementing a ‘slow’ mode A20 emulation through the keyboard interface. So there was no point in including the keyboard’s contribution to the A20 system.

      Some of the latest PC systems don’t have an A20 gate at all, so they can’t run operating systems that need it off all the time, or expect it to be there and off at boot, then will switch it on. No A20 = fatal error, cannot boot. No A20 gate to switch = no emulation of the old limited memory space of the PC and PC/XT. No MS-DOS or Windows 9x or Me for them, probably not NT, 2000 or XP either. Perhaps not even Vista or 7. (Would be an interesting test to see how far back of an OS an A20 free PC can boot.)

      I’d say the whole A20 thing qualifies as a hack for retro tech on HaD. Not a great hack but an example of a kludge causing extra complication when a simpler solution could and should have been done.

      1. Galene, thank you for explaining the A20 Gate option. I had seen that in BIOS settings for years and never knew what it was about. In those days, BIOS help was laughable: “choices are ENABLED and DISABLED”

  3. I’m mystified as to why I see a greater proportion of PIC projects where the author offers just the .hex file as opposed to the AVR (not just Arduino) people that tend to offer up source code.

    It may just be just the particular types of projects, I dunno. I’ve come across “open” PIC projects when the author says “email me for the source” and they never respond or say they lost it.

    At least this guy links to the source code (though you need to register to download it).

      1. That’s true, When I started with them I used to program PICs in pure assembly. You can probably convert HEX files directly to ASM because it’s basically the same code, just another representation of it. It’s possible this project was also written in assembler.

        Eventually I had a hard project with several interrupts I couldn’t get right and I found a C-compiler, turns out I could write it in half the time and the compiler was so efficient it made the project about 1/3 of the size :) Never went back to ASM after that. I had no prior experience with assembly before I started with the PIC but lots with C so I probably just didn’t do it right :)

    1. I am 50/50 on sharing the source, if its a small project, or hobby project then I will, however, this is how I make my living, and to be honest, I have never made a single penny from open source, and have seen my open software go right into commercial open source products than make others money. I am working on a new commercial product, and will give away the .hex file for personal use, but I can not give the source, unless someone wants to pay my rent for me.

  4. I build tjis and it wotks fine. Except after a CTRL-ALT-DEL. Then the keyboard either locks the CTRL or the ALT or both. This is easy solved bij pressing CTRL or ALT once. This maybe a bug in the code?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.