- Keyboard encoder ICs
Keyboard encoder ICs
The table below is based on the National Semiconductor databooks digitised by Bitsavers. Owing to uncertainty as to the completeness of their collection, the models in question could have been introduced or discontinued in the years in between known databooks. However, this table still gives a general idea of when the different encoders were available.
|MM5704||32-key dual mode matrix||•|
|MM5740||90-key quad-mode matrix||•||•||90||4||9||2KRO/NKRO||Parallel||Model-specific (see table below)||9×10 matrix; bits 0–4 and 8 are common to all modes|
|MM5745||2-of-13 code quad-mode||•||78||4||10||2KRO/NKRO||Parallel||Custom||2-of-13 input (non-matrix); listed as 2KRO/NKRO but no explanation is given regarding how NKRO works without matrix scanning|
|MM57499||96/144-key quad mode matrix||•||96/144||3||8||2-key lockout||Serial||ASCII and special codes||96 keys natively (12×8 matrix), and 144 keys with an external decoder (12×12 matrix); serial input permits output passthrough or eight bits of status display|
MM5704 is a 32-key calculator keypad encoder, designed to operate in multiple with additional MM5704 chips for larger panels. Each key has two modes, each with a 9-bit output code, and two-key rollover is provided. Application note AN-52 in National’s MOS Integrated Circuits databook from February 1972 indicates that this chip can also be used to drive an ASCII keyboard, with four 32-character ranges: 0–31, 32–63, 64–97 and 98–127. Each key would cover all four of those ranges, using appropriate modifier keys. Thus, a single key would provide all of space, NUL, “@” and “\”. Likewise, “!”, SOH, “A” and “a” would share a key. Thus, the full 128-code 7-bit ASCII is supported, but not a conventional typewriter layout: “1” and “Q” share a key, but “!”—normally shift+1 on a US keyboard—is on the “A” key. Carriage return is control+M unless a separate key is wired up specially to the control and M keys.
National’s 1974 MOS Databook mentions MM5704 only in a footnote of sorts, suggesting that it was discontinued in favour of the MM5740, introduced by the time of that databook.
MM5740 is a 90-key encoder supporting 9-bit key codes. It is a pseudo–quad mode encoder: bits 0–4 and 8 are common to all modes, and bits 5–7 are mode-specific.
MM5740 was present in National’s MOS Integrated Circuits databook from April 1974, but not listed in the February 1972 databook, suggesting that it was introduced between 1972 and 1974. It is also listed in the MOS/LSI Databook from 1977, but not in the MOS Databook from 1980.
The encoder supports electronic shift lock: a birectional shift lock pin is connected to both the shift lock key and its indicator lamp. Pressing shift lock enables shift lock mode, and the encoder then powers this pin to illuminate the lamp. Pressing shift will clear the shift lock state and extinguish the lamp. There are also dedicated inputs for the shift and control keys. A repeat key is also supported, and this too has a dedicated input pin.
This encoder was used in the HAL DKB-2010 communications keyboard. The reprinted manual lists model MM5740AAA/N, but discovered examples such as Jacob Alexander’s have model MM5740AAE/N. Cherry used part MM5740FDL/N in keyboard model B80-08AC; this has customer part 495306036-001 and numerous special-purpose (non-ASCII) keys, and thus “FDL” is likely to indicate the custom mask used for Cherry’s variant. Datanetics used MM5740AAE in some of their keyboards, including those used with and made for early Apple keyboards. Datanetics were selling these encoders for $13.50 each in February 1978, according to a letter from Datanetics to Joe Torzewski. This would be $55.90 in December 2020 prices.
Each part number has a suffix of “/N” or “/D”, indicating that the chip is packaged as moulded or cavity (ceramic) respectively.
|MM5740AAA||HAL DKB-2010 (officially; MM5740AAA/N)|
|MM5740AAC||Binary sequential N-ney rollover|
|MM5740AAD||Binary sequential 2-key rollover|
|MM5740AAE||ASR-33 N-ney rollover||HAL DKB-2010 (MM5740AAE/N); various Datanetics keyboards including those made for Apple|
|MM5740AAF||ASR-33 2-key rollover|
|MM5740FDL||Custom?||Cherry B80-08AC, customer part 495306036-001, ca. 1979 (MM5740FDL/N)|
The differences between AAA and AAB versus AAE and AAF are not known.
MM5745 and MM5746
MM5745 and MM5746 are two-of-N encoding converters. MM5745 outputs 10-bit codes, while MM5746 outputs 9-bit codes. These encoders are perfectly suited to Hall effect keyboards with dual-output sensors. For any other keyboard type, existing wiring or circuitry is required to generate a unique 2-of-13 code for each key. Four modes are supported, using two input pins. These two inputs could be connected to the control and shift keys (allowing unshifted, control, shift and control+shift modes), or there could be four fully-independent modes selected by additional circuitry. Up to three contact switches can be debounced using three dedicated inputs and corresponding outputs; these keys are not processed in any way.
Output from the encoder is parallel; there are nine or ten output lines depending on the model. The specific encoding is mask programmed and thus customer-specific.
MM5745 and MM5746 are seen in the 1977 MOS/LSI Databook, but not in the databooks from 1974 or 1980.
MM57499 is a keyboard encoder with serial ASCII output. Natively it supports direct connection to a 12×8 position (96-key) matrix; by connecting strobe line 4 to ground and strobe lines 0–3 to a 4-to-12 decoder, the matrix size can be extended to 12×12 for 144 keys. ASCII itself only provides 128 characters, which with shift and control taken into account is a maximum of 76 keys. The 96-key limit is made up by including separate keys for the likes of escape and return, a dedicated break key (0xFF), and output codes in the range 0x80–0x98 which are mapped to keys such as FN1–FN7 and four cursor keys. With the complete 144-key matrix, the range 0x99–0xC8 is added to the controller’s repertoire. (That is, a numeric keypad would be expected to share the same matrix positions as the regular number row.)
A serial input pin permits the host to drive an 8-bit status display connected directly to the keyboard controller. This display could be a bank of up to eight LEDs, or it could be a two-digit hexadecimal LED or LCD readout. The host sends a single 8-bit code to the keyboard controller’s serial receive pin; this code is then fed into an optional external shift register to provide the eight separate output bits. The ability of the keyboard controller to provide output information allows it to be used in a control unit—such as a wall keypad or a data entry terminal—that is connected to a remote host in a different room or building. This concept is discussed in detail in Steve Ciarcia’s Circuit Cellar, in the article Build a Low-Cost, Remote Data-Entry Terminal, published in Circuit Cellar Volume 3, 1982. In theory the keyboard controller could be connected to a printer, forming a printing terminal, or even a CRT with additional circuitry such as RAM and a character generator.
An unusual feature of MM57499 is that shift lock and caps lock (curiously described as “shift loc” and “caps loc”, as if by confusion with block/bloc and sack/sac) are both reported to the host. A keypress of code 0xFE is transmitted when shift lock is enabled, and 0xFD is transmitted when shift lock is released (by pressing either shift lock or shift). Likewise, caps lock status is reported with the codes 0xFC and 0xFB. This allows the host to visually report the lock status, such as with in-key LEDs; in particular, the status of the lock keys can be transmitted back to the keyboard controller to provide local status to the operator. Processing of control and shift is performed internally regardless, i.e. pressing A outputs 0x61 (“a”) and pressing shift+A outputs 0x41 (“A”): reporting of lock key state is provided for convenience only.
The MM57499 also allows recording and playback of a single 14-character macro. Programming commences with control+escape and terminates with control+; upon which the string is transmitted to the computer. Further invocations of control+; will transmit the macro again. Just as with shift and caps lock status, start and finish of macro recording is reported to the host (with character codes of 0xFA and 0xF9 respectively). This allows the host to report on this status, such as with an LED or on-screen indication; the status display connected to the keyboard controller can also be used, so long as the status word is sent within 10 ms of the start of recording. It is not possible to program the macro without also transmitting it to the host immediately afterwards.
MM57499 was listed under IEEE’s Recent IC Annnouncements for June 1980, with a price of $6.15/piece for a lot of 100 ($19.35 in November 2020).
The Tatung TPC-2000 keyboard is documented to have an MM57499 keyboard encoder, but when examined, the IC was found to be marked “SMC 8426C”, suggesting that SMC produced a compatible part. No documentation for such a part seems to exist.
Models MM54C922/MM74C922 and MM54C923/MM74C923 are 16-key and 20-key keypad encoders. Details on these ICs are included in the catalogue excerpt listed below.
The following documents cover National Semiconductor keyboard encoder ICs: