home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s078 / 1.img / KEYBOARD.PLD < prev    next >
Encoding:
CUPL PLD Program format  |  1991-12-08  |  8.8 KB  |  174 lines

  1. Name      Keyboard;
  2. Partno    CA0023;
  3. Date      10/3/86;
  4. Revision  01;
  5. Designer  Kahl;
  6. Company   Personal CAD Systems, Inc.;
  7. Assembly  Keyboard Interface;
  8. Location  IC4;
  9. Device      F100;
  10.  
  11. /************************************************************************/
  12. /*                                                                      */
  13. /* Keyboard Encoder                                                     */
  14. /*                                                                      */
  15. /* This chip takes as its input the rows and columns of a matrix        */
  16. /* keyboard and generates the corresponding ASCII code required for the */
  17. /* key.                                                                 */
  18. /************************************************************************/
  19. /* Allowable Target Device Types: Signetics 82S100                      */
  20. /************************************************************************/
  21.  
  22. /** Inputs **/
  23.  
  24. Pin 9 = shift_key;            /* Shift Key Input        */
  25. Pin 8 = control_key;            /* Control Key Input        */
  26. Pin [7..2] = [row0..5];            /* Keyboard Row Inputs        */
  27. Pin [27..20] = [col0..7];        /* Keyboard Column Inputs    */
  28.  
  29. /** Outputs **/
  30.  
  31. Pin [18..15,13..10] = [ascii0..7];    /* ASCII Code Output            */
  32.  
  33. /** Declarations and Intermediate Variable Definitions **/
  34.  
  35. Field row   = [row5..0];        /* Define Field for Row Inputs  */
  36. Field col   = [col7..0];        /* Define Field for Col Inputs  */
  37. Field ascii = [ascii7..0];        /* Define Field for ASCII Inputs*/
  38.  
  39. shifted =  shift_key & !control_key;
  40. control = !shift_key &  control_key;
  41. normal  = !shift_key & !control_key;
  42.  
  43. /** Logic Equations **/
  44.  
  45. ascii = control & row:4 & col:0 & 'h'00        /* ASCII NUL          */
  46.       # control & row:4 & col:1 & 'h'01        /* ASCII SOH        */
  47.       # control & row:4 & col:2 & 'h'02        /* ASCII STX        */
  48.       # control & row:4 & col:3 & 'h'03        /* ASCII ETX        */
  49.       # control & row:4 & col:4 & 'h'04        /* ASCII EOT        */
  50.       # control & row:4 & col:5 & 'h'05        /* ASCII ENG        */
  51.       # control & row:4 & col:6 & 'h'06        /* ASCII ACK        */
  52.       # control & row:4 & col:7 & 'h'07        /* ASCII BEL        */
  53.       # control & row:4 & col:8 & 'h'08        /* ASCII BS        */
  54.       # control & row:4 & col:9 & 'h'09        /* ASCII HT        */
  55.       # control & row:4 & col:A & 'h'0A        /* ASCII LF        */
  56.       # control & row:4 & col:B & 'h'0B        /* ASCII VT        */
  57.       # control & row:4 & col:C & 'h'0C        /* ASCII FF        */
  58.       # control & row:4 & col:D & 'h'0D        /* ASCII CR        */
  59.       # control & row:4 & col:E & 'h'0E        /* ASCII SO        */
  60.       # control & row:4 & col:F & 'h'0F        /* ASCII SI        */
  61.       # control & row:5 & col:0 & 'h'10        /* ASCII DLE        */
  62.       # control & row:5 & col:1 & 'h'11        /* ASCII DC1        */
  63.       # control & row:5 & col:2 & 'h'12        /* ASCII DC2        */
  64.       # control & row:5 & col:3 & 'h'13        /* ASCII DC3        */
  65.       # control & row:5 & col:4 & 'h'14        /* ASCII DC4        */
  66.       # control & row:5 & col:5 & 'h'15        /* ASCII NAK        */
  67.       # control & row:5 & col:6 & 'h'16        /* ASCII SYN        */
  68.       # control & row:5 & col:7 & 'h'17        /* ASCII ETB        */
  69.       # control & row:5 & col:8 & 'h'18        /* ASCII CAN        */
  70.       # control & row:5 & col:9 & 'h'19        /* ASCII EM         */
  71.       # control & row:5 & col:A & 'h'1A        /* ASCII SUB        */
  72.       # control & row:5 & col:B & 'h'1B        /* ASCII ESC        */
  73.       # control & row:5 & col:C & 'h'1C        /* ASCII FS        */
  74.       # control & row:5 & col:D & 'h'1D        /* ASCII GS        */
  75.       # control & row:5 & col:E & 'h'1E        /* ASCII RS        */
  76.       # control & row:5 & col:F & 'h'1F        /* ASCII VS        */
  77.       # normal  & row:1 & col:0 & 'h'20        /* ASCII SPACE        */
  78.       # shifted & row:2 & col:1 & 'h'21        /* ASCII !        */
  79.       # shifted & row:2 & col:2 & 'h'22        /* ASCII "        */
  80.       # shifted & row:2 & col:3 & 'h'23        /* ASCII #        */
  81.       # shifted & row:2 & col:4 & 'h'24        /* ASCII $        */
  82.       # shifted & row:2 & col:5 & 'h'25        /* ASCII %        */
  83.       # shifted & row:2 & col:6 & 'h'26        /* ASCII &        */
  84.       # shifted & row:2 & col:7 & 'h'27        /* ASCII '        */
  85.       # shifted & row:2 & col:8 & 'h'28        /* ASCII (        */
  86.       # shifted & row:2 & col:9 & 'h'29        /* ASCII )        */
  87.       # shifted & row:2 & col:A & 'h'2A        /* ASCII *        */
  88.       # shifted & row:2 & col:B & 'h'2B        /* ASCII +        */
  89.       # shifted & row:2 & col:C & 'h'2C        /* ASCII ,        */
  90.       # shifted & row:2 & col:D & 'h'2D        /* ASCII -        */
  91.       # shifted & row:2 & col:E & 'h'2E        /* ASCII .        */
  92.       # shifted & row:2 & col:F & 'h'2F        /* ASCII /        */
  93.       # normal  & row:2 & col:0 & 'h'30        /* ASCII 0            */
  94.       # normal  & row:2 & col:1 & 'h'31        /* ASCII 1        */
  95.       # normal  & row:2 & col:2 & 'h'32        /* ASCII 2        */
  96.       # normal  & row:2 & col:3 & 'h'33        /* ASCII 3        */
  97.       # normal  & row:2 & col:4 & 'h'34        /* ASCII 4        */
  98.       # normal  & row:2 & col:5 & 'h'35        /* ASCII 5        */
  99.       # normal  & row:2 & col:6 & 'h'36        /* ASCII 6        */
  100.       # normal  & row:2 & col:7 & 'h'37        /* ASCII 7        */
  101.       # normal  & row:2 & col:8 & 'h'38        /* ASCII 8        */
  102.       # normal  & row:2 & col:9 & 'h'39        /* ASCII 9        */
  103.       # normal  & row:2 & col:A & 'h'3A        /* ASCII :        */
  104.       # normal  & row:2 & col:B & 'h'3B        /* ASCII ;        */
  105.       # normal  & row:2 & col:C & 'h'3C        /* ASCII <        */
  106.       # normal  & row:2 & col:D & 'h'3D        /* ASCII =        */
  107.       # normal  & row:2 & col:E & 'h'3E        /* ASCII >        */
  108.       # normal  & row:2 & col:F & 'h'3F        /* ASCII ?        */
  109.       # shifted & row:4 & col:0 & 'h'40        /* ASCII @        */
  110.       # shifted & row:4 & col:1 & 'h'41        /* ASCII A        */
  111.       # shifted & row:4 & col:2 & 'h'42        /* ASCII B        */
  112.       # shifted & row:4 & col:3 & 'h'43        /* ASCII C        */
  113.       # shifted & row:4 & col:4 & 'h'44        /* ASCII D        */
  114.       # shifted & row:4 & col:5 & 'h'45        /* ASCII E        */
  115.       # shifted & row:4 & col:6 & 'h'46        /* ASCII F        */
  116.       # shifted & row:4 & col:7 & 'h'47        /* ASCII G        */
  117.       # shifted & row:4 & col:8 & 'h'48        /* ASCII H        */
  118.       # shifted & row:4 & col:9 & 'h'49        /* ASCII I        */
  119.       # shifted & row:4 & col:A & 'h'4A        /* ASCII J        */
  120.       # shifted & row:4 & col:B & 'h'4B        /* ASCII K        */
  121.       # shifted & row:4 & col:C & 'h'4C        /* ASCII L        */
  122.       # shifted & row:4 & col:D & 'h'4D        /* ASCII M        */
  123.       # shifted & row:4 & col:E & 'h'4E        /* ASCII N        */
  124.       # shifted & row:4 & col:F & 'h'4F        /* ASCII O        */
  125.       # shifted & row:5 & col:0 & 'h'50        /* ASCII P        */
  126.       # shifted & row:5 & col:1 & 'h'51        /* ASCII Q        */
  127.       # shifted & row:5 & col:2 & 'h'52        /* ASCII R        */
  128.       # shifted & row:5 & col:3 & 'h'53        /* ASCII S        */
  129.       # shifted & row:5 & col:4 & 'h'54        /* ASCII T        */
  130.       # shifted & row:5 & col:5 & 'h'55        /* ASCII U        */
  131.       # shifted & row:5 & col:6 & 'h'56        /* ASCII V        */
  132.       # shifted & row:5 & col:7 & 'h'57        /* ASCII W        */
  133.       # shifted & row:5 & col:8 & 'h'58        /* ASCII X        */
  134.       # shifted & row:5 & col:9 & 'h'59        /* ASCII Y        */
  135.       # shifted & row:5 & col:A & 'h'5A        /* ASCII Z        */
  136.       # shifted & row:5 & col:B & 'h'5B        /* ASCII [        */
  137.       # shifted & row:5 & col:C & 'h'5C        /* ASCII \        */
  138.       # shifted & row:5 & col:D & 'h'5D        /* ASCII ]        */
  139.       # shifted & row:5 & col:E & 'h'5E        /* ASCII ^        */
  140.       # shifted & row:5 & col:F & 'h'5F        /* ASCII _        */
  141.       # normal  & row:4 & col:0 & 'h'60        /* ASCII `        */
  142.       # normal  & row:4 & col:1 & 'h'61        /* ASCII a        */
  143.       # normal  & row:4 & col:2 & 'h'62        /* ASCII b        */
  144.       # normal  & row:4 & col:3 & 'h'63        /* ASCII c        */
  145.       # normal  & row:4 & col:4 & 'h'64        /* ASCII d        */
  146.       # normal  & row:4 & col:5 & 'h'65        /* ASCII e        */
  147.       # normal  & row:4 & col:6 & 'h'66        /* ASCII f        */
  148.       # normal  & row:4 & col:7 & 'h'67        /* ASCII g        */
  149.       # normal  & row:4 & col:8 & 'h'68        /* ASCII h        */
  150.       # normal  & row:4 & col:9 & 'h'69        /* ASCII i        */
  151.       # normal  & row:4 & col:A & 'h'6A        /* ASCII j        */
  152.       # normal  & row:4 & col:B & 'h'6B        /* ASCII k        */
  153.       # normal  & row:4 & col:C & 'h'6C        /* ASCII l        */
  154.       # normal  & row:4 & col:D & 'h'6D        /* ASCII m        */
  155.       # normal  & row:4 & col:E & 'h'6E        /* ASCII n        */
  156.       # normal  & row:4 & col:F & 'h'6F        /* ASCII o        */
  157.       # normal  & row:5 & col:0 & 'h'70        /* ASCII p        */
  158.       # normal  & row:5 & col:1 & 'h'71        /* ASCII q        */
  159.       # normal  & row:5 & col:2 & 'h'72        /* ASCII r        */
  160.       # normal  & row:5 & col:3 & 'h'73        /* ASCII s        */
  161.       # normal  & row:5 & col:4 & 'h'74        /* ASCII t        */
  162.       # normal  & row:5 & col:5 & 'h'75        /* ASCII u        */
  163.       # normal  & row:5 & col:6 & 'h'76        /* ASCII v        */
  164.       # normal  & row:5 & col:7 & 'h'77        /* ASCII w        */
  165.       # normal  & row:5 & col:8 & 'h'78        /* ASCII x        */
  166.       # normal  & row:5 & col:9 & 'h'79        /* ASCII y        */
  167.       # normal  & row:5 & col:A & 'h'7A        /* ASCII z        */
  168.       # normal  & row:5 & col:B & 'h'7B        /* ASCII {        */
  169.       # normal  & row:5 & col:C & 'h'7C        /* ASCII |        */
  170.       # normal  & row:5 & col:D & 'h'7D        /* ASCII }        */
  171.       # normal  & row:5 & col:E & 'h'7E        /* ASCII ~        */
  172.       # normal  & row:5 & col:F & 'h'7F        /* ASCII DELETE        */
  173.       ;
  174.