Due to the continuing interest in connecting XT keyboards and LCD displays to
microprocessors I have collected information on a demo I built for a
microprocessor course last year. The project is designed around an 8051 but
some of the information will be useful for other projects. The code is
documented and the comments are applicable to other processors.

A few of the non data keys are implemented...
    Left Shift - While left shift is held down the shifted key is entered
    F1 - toggles cursor blink on and off
    F2 - toggles underline cursor on and off
    Backspace - backs up one character and erases
    Home - goes to the start of data memory (start of display)  
All other non data keys are ignored. If you want to see how it is done or 
change anything "use the Source Luke".
 
The hardware was wire wrapped so there is no board available. The design uses
the external interrupt 0 (P3.2) for the keyboard clock. The data is on P3.4
so external interrupt 1 can be used. The read (P3.7) and write (P3.6)
functions are used for the LCD in memory mapped mode. The other bits of P3 are
not used in anticipation of possible future serial I/O use.

The J2 connections to port 1 and the 74LS244 are designed to simulate the data
out and status in of a printer port. This is to allow some printer port
projects to be migrated to microprocessor control. J2 is a 2X13 header for a
ribbon cable connect to a 25 pin D connector. These can be omitted if desired
since none of the demo code uses them.

To minimize chip count some shortcuts were taken. The 74LS244 is addressed as
ROM and will respond anytime a read is done to a ROM address with A13 high.
The LCD has no address decode other than A0 and A1 so will respond to any
address in the read/write address space. That's the breaks if you want to
get by with only 5 chips. The whole circuit fits on a Radio Shack 276-168A
board if you cut some of the 3 across tie points.

One addition not on the schematic is to add a three pin jumper block for VDD/-EA
so that it can be jumpered high or low. When low (as on the schematic) external
ROM is used (8031 mode). When jumpered high internal ROM on a 8751 is used
and the external ROM is ignored. The supplied code will run in either mode.

Files contained in the package are:

PCKEYLCD.ASM              assembly code for XT keyboard and LCD display
PCKEYLCD.LST              listing of above
PCKEYLCD.OBJ              Intel hex file of code
PCKEYLCD.PLT              Schematic of hardware in HP plotter format
PCKEYLCD.PS               Schematic of hardware in PostScript format
PCKEYLCD.TXT              This file

Dennis DeLorme  yuslord@millcomm.com
