摘要 |
PROBLEM TO BE SOLVED: To provide a method for generating a key code for avoiding the problem that the size of a RAM required for a key code is increased by the number of switches when the number of switches is increased in this constitution that plural switches are respectively connected to the plural terminals of a microcomputer, and that the simultaneous depression of at least two keys frequently exists (the simultaneous depression on the same terminal does not exist in this case). SOLUTION: When a switch connected to each terminal of a microcomputer is depressed, a prime number corresponding to the switch is outputted, and in the other case, 1 is outputted in this quantization processing to be operated to each terminal, and a product obtained by multiplying the outputs of all the terminals is generated as a key code. Thus, it is possible to reduce the size of the RAM which stores the key code with the specific number of multiple depression and the specific number of switches.
|