摘要 |
PURPOSE:To discriminate key switches of the same number by input/output ports whose number is half the conventional ones, by scanning successively (n) pieces of input/output ports, detecting a charge of (m) pieces of capacitors, and recognizing which of the key switches is depressed. CONSTITUTION:First of all, in order to set an initial state of a capacitor 4 to zero voltage, input/output ports Q00-Q03 are set to outputs and L. Subsequently, the port Q00 is set to H. In this case, other input ports are set to a floating state. In case a key switch A is depressed, a key switch on the port Q00 is not depressed, therefore, no capacitor 4 is charged. Next, the ports Q00-Q03 are set to inputs and the input voltage is checked. In this case, the inputs are all L. Subsequently, Q01 is set to H, and thereafter Q00-Q03 are set to inputs and the input voltage is checked. In this case, as well, the inputs are all L. Next when Q02 is set H, only a capacitor C4 is charged. This voltage is impressed to Q03, therefore, only Q03 becomes H. That is to say, when Q02 becomes H, Q03 becomes H consequently, therefore, it can be recognized that the switch A is depressed.
|