Browse Prior Art Database

Byte Wide Processing for Keyboard Scanning

IP.com Disclosure Number: IPCOM000051439D
Original Publication Date: 1981-Jan-01
Included in the Prior Art Database: 2005-Feb-10
Document File: 3 page(s) / 96K

Publishing Venue

IBM

Related People

Dahl, JP: AUTHOR [+3]

Abstract

A variety of current keyboards utilize a single-chip microcomputer for key actuation scanning, data encoding and a variety of other keyboard functions such as automatic repeat keys, etc. The single-chip microcomputer used often has a limited amount of program storage and is relatively slow in operation. Using sequential positions of memory for a key scanning program will quickly exhaust program space given a fairly large set of keys and functions assigned to them. This article presents methods for allowing shorter program statements and shorter execution time than sequential processing of the key information, by processing the information in byte-wide increments.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 43% of the total text.

Page 1 of 3

Byte Wide Processing for Keyboard Scanning

A variety of current keyboards utilize a single-chip microcomputer for key actuation scanning, data encoding and a variety of other keyboard functions such as automatic repeat keys, etc. The single-chip microcomputer used often has a limited amount of program storage and is relatively slow in operation. Using sequential positions of memory for a key scanning program will quickly exhaust program space given a fairly large set of keys and functions assigned to them. This article presents methods for allowing shorter program statements and shorter execution time than sequential processing of the key information, by processing the information in byte-wide increments.

Eight-bit sections of register space were partitioned for this task. In Fig. 1, the overall keyboard scanning routine is illustrated with a flow chart of the operation. First, an initialization of memory, setting of timers, the definition of a starting point for register banks and memory banks and the resetting of other registers and flags are performed (block 1). Following these operations, the keyboard scan routine is executed to scan all of the keys on a keyboard at least once (block 2). If any keys are detected as depressed for the first time and require that data be sent, a click operation may be performed to indicate to the operator that the data has been sent or the key detected (block 3). In block 4, any key data loaded into the data buffer is sent at a time when the interface is free. A check is made in block 5 as to whether 12 milliseconds of time have elapsed, 12 milliseconds being the allotted time to complete the entire routine in preparation for scanning the keyboard array again.

Fig. 2 presents the detailed contents of block 2 in Fig. 1. In Fig. 2, the scanning routine begins at block 6 where the accumulation register is cleared and the register bank 1 is selected. Register bank 1 will have been initialized to contain an indication of which column or subset of keys is to be scanned first. Block 7 sets a matrix drive bit in register 1 and initializes the status of the sense amplifier connected to the matrix for proper sensing of the first key in the row or column designated in the matrix drive bit. The sense amplifier initialization bits are fed out to the sense amplifier to adjust the sensitivity and activate the appropriate gate for sensing on the rows or columns intersected by the column or row being presently driven (block 8). In block 9, the drive signals are actually applied to the column or row identified by the matrix drive bit in register 1, as set in block 7, and any outputs from the sense amplifier are collected and stored. A count is kept in block 10 to determine whether 8 key locations (1 byte of data) have been scanned and when they have been. The key analysis routine in block 11 is activated by storing the sense amplifier outputs that have been collected and entering a check data buffer routine beginn...