Building a universal keyboard adapter

From: Dave Dunfield <>
Date: Tue Feb 8 18:35:52 2005

>I don't use the BASIC stamp, sicne AFAIK the development tools are PC
>only. I'd probably use something like an 8051 derivative or a PIC
>microcontroller. The PC/AT keyboard interface is pretty well docuemnted,
>you need to make a look-up table in the micorcontoller's ROM to turn
>keycodes into the signals to drive the muxes/crosspoint array.

Sometime last fall, I put together a quickie serial keyboard translator for
a friend - this is a little 8031 based box which takes a PC(AT) keyboard on
one side, and an RS-232 serial channel on the other - keys pressed on the
keyboard get sent out the serial link (as scancodes) and control codes sent
in the serial line get sent to the keyboard (lights etc.)

The code is small - the source file is 244 lines, however a lot of them
are comments... there are 91 code generating lines. The binary image is
241 bytes in size (Almost 1-1 with the source file!)

Pretty straight forward, but could save a bit of "figuring" if you have not
interfaced with the PC keyboard before - you are welcome to it (the source
file) if you would like...

dave04a (at)    Dave Dunfield
dunfield (dot)  Firmware development services & tools:
com             Collector of vintage computing equipment:
Received on Tue Feb 08 2005 - 18:35:52 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:37:36 BST