A MATRIX SWITCHING APPARATUS FOR PREVENTING PSEUDO INPUT

Abstract: A matrix switching apparatus for preventing a pseudo input condition caused by a detour of a signal as well as output of an erroneous signal caused by a noise intruding into an apparatus and the like, in which a plurality (10) of lines (11, 12) of keys (13) having a plurality of switches are arranged in the first and second directions respectively. The apparatus includes a detector (14, 15, 16, 17) for detecting an ON condition of the plurality of the switches by a time-sharing detection, a counter (21) for counting up a number of the switches which are in the ON condition simultaneously, both totally and respectively with the key lines, a storage means (20) for storing a first, second, third and fourth statuses which represent the condition of the switches respectively, and a controller (16) for inverting the second status into the first status.

Description: The present invention relates to a matrix switching apparatus used for input apparatus such as a keyboard, and more particularly relates to a matrix switch for preventing pseudo input conditions caused by a detour of a signal as well as the output of erroneous signals caused by noise interference in the apparatus and the like. The known type of keyboard with a matrix of switches is used as signal input apparatus for various types of electronic machines e.g. typewriters. However, using the aforementioned type of keyboard e.g. as shown in Fig. 6, a so-called detour of a signal can occur when a plurality of key switches are operated simultaneously, resulting in pseudo input conditions in which non-operative keys are falsely detected as operative. For example, and referring to Fig. 6, a matrix switch circuit is connected to a scan-type encoder so as to output a scanning signal with level '0' sequentially to the driving line, and, in accordance with detected voltage on a sensing line, encodes key switches operated. The above driving and sensing lines are arranged in a matrix, respectively. When switches SWl, SW2 and SW3 are turned ON simultaneously, the application of the scan signal to DLl causes an electric current to flow via a resistance R2 through SW3, then back through SW2, and further through SWl into driving line DLl. Consequently, a voltage V2 on a sensing line SL2 becomes 'O' so that it seems as if a switch SW4 was ON. That is to say, assuming a square or an elongated square with four key switches in the matrix at each corner, when three switches of the square are turned ON, the remained one is brought into a pseudo input condition. Attempts have been made in the prior art to solve the above problem. For example, as shown in Fig. 7, diodes Dl-D6 for preventing reverse of current may be connected in series with the key switches SWl - SW6 respectively in order to avoid the detour of a signal. Published unexamined Japanese Patent Application No. 60 - 39718 discloses a matrix switch circuit in which resistances are connected in series with key switches respectively, so that a logical circuit detects the difference between two voltages caused on a signal detection side both when a plurality of switches are operated simultaneously and when a pseudo input switch is really operated, so as to remove a detour signal. The prior matrix switch circuit with diodes, however, fails to miniaturise and simplify the key switches, and causes its cost to be high. The circuit with resistances discloses in the above Patent Application has problems such as an increase in the number of parts and manufacturing processes. Moreover, the input apparatus with key switches, regardless of a contact or contactless switch types, generally have likelihood of generating erroneous function signals owing to a chattering phenomenon and the effect of noise intruding into the apparatus, which causes an erroneous signal and the like. It is an advantage of the present invention to provide a matrix switching apparatus in which a microprocessor and the like can prevent a pseudo input condition of a switch caused by a detour when a plurality of switches are simultaneously turned ON. It is another advantage of the present invention to provide a matrix switching apparatus in which constructions of a sheet switch and a mechanical switch are simplified since it is not necessary to connect diodes or resistors in series with the switches respectively like the prior arts. It is a further advantage of the present invention to provide a matrix switching apparatus in which an erroneous function is certainly prevented not only since a pseudo input condition can be cancelled as described in the first advantage, but also since a chattering phenomenon and the like can be prevented. A matrix switching apparatus according to the present invention in which a plurality of lines of keys having a plurality of switching means are arranged in the first and second directions respectively, includes detecting means for detecting an ON condition of the plurality of switching means by a time-sharing detection, counting means responsive to the detecting means for counting the number of the switching means which are in the ON condition simultaneously, totally and regarding with the key lines respectively, storage means for storing a first status representative of condition where an OFF condition is continuously detected twice by the detecting means, a second status representative of transition from the OFF condition to the ON condition, a third status representative of condition where the ON condition is continuously detected twice by the detecting means, and a fourth status representative of transition from the ON condition to the OFF condition of the switching means, and control means connected to the counting means and the storage means for inverting the switching means in the second status into the first status when the number of the switching means in the ON condition simultaneously is more than four and when the switching means in the ON condition are more than two in each one key line in the transverse and longitudinal directions based upon one of the switching means in the ON condition simultaneously. Thus, according to the present invention, when the detour is detected during the second scan after the ON condition of the switching means is detected during the first scan, the status of the switch is inverted so that the signal ON is made invalid. Also, in the case of chattering and the like, i.e., when the OFF condition of the switching means is detected after the ON condition of the switching means is detected , the status is returned to the first, i.e. a status word '0', and the signal ON is made invalid. Moreover, when the signal OFF appears momentarily during the ON condition owing to the chattering and the like, the signal OFF is made invalid as far as the the signal OFF is not detected during the subsequent scan. The above and other objects, features and advantages of the present invention will become more apparent from reading the following description of the preferred embodiments taken in connection with the accompanying drawings in which: Fig. 1 is a block diagram illustrating a construction of a matrix switching apparatus according to the present invention; Fig. 2 is a flow chart showing the function of the apparatus; Fig. 3 is a view showing the transition of the status of a key switch; Figs. 4 and 5 are diagrams of matrix circuits showing examples of a detour; and Figs. 6 and 7 are diagrams of matrix circuits applied to the prior arts. Referring to Fig. 1, there is shown in a block diagram a matrix switching apparatus according to the invention. In a matrix switch circuit 10, there are provided a plurality of driving lines 11 and sensing lines 12 respectively in transverse and longitudinal directions, and a plurality of key switches 13 which are provided at each point of intersection of the above two lines 11 and 12 and open and close the above two lines 11 and 12. Each driving line 11 is connected with a decoder 14 which outputs a scanning pulse signal, and each sensing line 12 is connected with a multiplexer 15 which receives the scanning pulse signal sent via each switch 13 from the driving line 11 to each sensing line 12 sequentially and selectively. A microprocessing unit ( MPU ) 16 outputs the scanning pulse signal to the decoder 14, and controls the selective operation of the multiplexer 15, so that it detects ON conditions of the key switches 13 by a time-sharing detection, and in accordance with the detection, counts the numbers of the key switches 13 in the ON condition simultaneously on all the driving and sensing lines 11 and 12, and on each lines 11 and 12 respectively. In a read only memory ( ROM ) 17, there is stored the operation program of this keyboard apparatus. In a random access memory ( RAM ) 18 which can both read and write, there are provided a key position buffer 19, a status buffer 20, a depressed key number buffer 21, a depressed key position buffer 22 and a key buffer 23, respectively. The key position buffer 19 memorizes all the positions of the key switches 13 currently depressed. The status buffer 20, which is provided with a memory areas, each of which is in response to each memory area of the buffer 19, memorizes the ON/OFF data of each key switch 13 at every scan in accordance with the scanning signals which are sequentially selected and appear on each sensing line 12. The buffer 20 also memorizes the condition of each key switch 13 by means of one of the status words, as shown in Fig. 3, such as '0', '1', '2' and '3' which represent the first, second, third and fourth statuses respectively. The first status, which is represented as the status word '0', indicates that the key switch 13 is OFF during the continuous two scans. The second status, i.e., '1', indicates that the key switch 13 turns ON from OFF. The third status, i.e., '2', indicates that the key switch is kept ON. The fourth status, i.e.,'3', indicates that the key switch 13 turns OFF from ON. The depressed key number buffer 21 memorizes the number of the key switches 13 in the ON condition. The depressed key position buffer 22 memorizes the positions of the key switches 13 which are newly turned ON. The key buffer 23 memorizes the key switches 13 which have been determined to be operated for printing and the like. Referring now to Fig. 2, there is shown in a flow chart the function of the matrix switching apparatus. The program shown in the flow chart of Fig. 2 proceeds under the control of the MPU 16. The MPU 16 waits for the ON condition of the key switch 13 at steps S1 and S2. At that time, the status word '0' is written in each memory area of the buffer 20. Then the program proceeds to step S3 where the MPU 16 searches in the buffer 19, and determines whether the position of the key switch 13 in the ON condition has been already written there. In the case where the position is not written, that is to say, the key switch 13 is newly turned ON, the program proceeds to step S4 where it is determined whether the number of the key switches 13 currently depressed is more than four. If the determination is NO, it indicates that the detour does not occur. Then the program proceeds to step S5. Namely, the detour does not occur when the ON conditions are not detected with respect to four or more key switches 13. That is because, as described before, assuming a square or a rectangle with four key switches 13 in the matrix at each corner, the detour causes the pseudo input condition when three key switches 13 of the square are actually turned ON. At step S5, the MPU 16 registers an information about the key switches 13, which were turned ON, to the buffer 19, as well as the status word '1' to the corresponding areas of the buffer 20. Then the program returns to step S1. When the ON conditions of the key switches 13 are detected again at the subsequent step S1, that is to say, during the subsequent scan, the determination of the step S3 is YES, since the positions of the depressed key switches 13 have been already registered. Then the program proceeds to step S6 where the status word '1' is rewritten to '2', and the operation is determined in response to the key switches 13 in the ON condition, and registered in the buffer 23. The status word '2' is continued so long as the corresponding key switch 13 keeps the ON condition. Also, in the case where the ON condition of the key switch 13 is not continuously detected twice during the continuous two scans, that is to say, the determination of the step S1 during the first scan is accidentally YES owing to the chattering and noise intruding into the apparatus, the determination of the step S1 during the second scan is NO, and the status word '1' is rewritten to '0' again, so that the ON condition during the first scan is regarded as nonexistent. Furthermore, in the case where the determination of step S4 is YES, namely the key switches 13 simultaneously depressed are apparently four or more, and the likelihood of the detour occurs, the program proceeds to step S7. At step S7, there is executed the determination whether, based upon the last depressed key switch 13, the other key switch 13 is ON or not on the sensing line 12 which includes the above last depressed key switch 13. If the determination is NO, the program proceeds to step S5, since there is no likelihood of the detour. At step S5, the position of the newly depressed key switch 13 is registered in the buffer 19 as well as its status word '1' is registered in the corresponding area of the buffer 20. Also, in the case where the determination is NO at the above step S7, that is to say, the key switches 13 simultaneously depressed are more than two on the same sensing line 12, the program proceeds to step S8. At step S8, it is determined whether, based upon the last depressed key switch 13, the other key switch 13 is ON or not on the driving line 11 which includes the above last depressed key switch 13. If the determination is NO, the program returns to the above step S5. If YES, for example, as shown in Figs. 4 and 5, the key switch 13 within the circle of dotted line is brought into the pseudo input condition and the detour occurs when the three key switches 13 within the circles of solid lines are ON, the program proceeds to step S9. At step S9, the MPU 16 erases the information about the last depressed key switch 13 from the buffer 22 as well as all the information about the other depressed key switches 13 from the buffer 19, and inverts the corresponding status word '1' in the buffer 20 to '0'. Furthermore, the MPU 16 subtracts a certain number from the buffer 21. The above 'certain number' represents the number of the key switches 13 the information of which was erased from the buffer 19. With the above operation, the detour can be detected as soon as it occurs, and the corresponding signal is made invalid so that the operation of erroneous printing and the like can be prevented. Furthermore, the generation of the erroneous function signal caused by the chattering phenomenon and the like, can be prevented by the process described below. Namely, in the case where the OFF condition is detected during the newly scan with respect to a certain key switch 13 with the status word '2', the MPU rewrites the status word '2' to '3' once. Afterwards, the status word '3' is rewritten to '0' when the OFF condition is detected again during the subsequent scan. On the contrary, the status word '3' is rewritten to '2' again when the ON condition is detected at this time. The present invention is not limited to the above embodiment in which the ON condition of the key switch 13 is detected by the serial scans. The matrix switching apparatus according to the present invention may have another constructions described below. Namely, the serial scans continues until the ON condition of the key switches are detected. Upon the above first detection, the MPU writes the status word '1' in the status buffer and establishes a waiting time of a certain period. The second detection is executed after the waiting time lapses. Then, the above status word '1' can be rewritten to either '2' or '0' in response to the result of the second detection. While the preferred embodiment of the present invention has been described, it is to be understood that the invention is not limited thereto, and may be otherwise embodied within the scope of the following claims.

Claims: 1. An apparatus for matrix switching comprising: a plurality of key lines (ll, l2) arranged in first (ll) and second (l2) directions respectively, and a plurality of switching means (l3) for connecting key lines where they intersect, and detecting means (l4, l5, l6, l7) for detecting an ON condition of said switching means (l3) by time-sharing detection; characterised in that it further comprises: counting means (2l) responsive to said detecting means for counting the total number and the number on each key line of said switching means simultaneously in said ON condition; storage means (20) for storing for each switching means (l3) one of: a first status representative of the condition where an OFF condition is detected twice successively by said detecting means (l4, l5, l6, l7); a second status representative of a transition from said OFF condition to said ON condition; a third status representative of the condition where said ON condition is detected twice successively by said detecting means; and a fourth status representative of transition from said ON condition to said OFF condition of said switching means; and control means (l6) connected to said counting means (2l) and said storage means (20) for changing the stored status of said switching means (l3) from said second status into said first status when said number of said switching means (l3) detected as being in said ON condition is four or more and when any one of said switching means (l3) simultaneously in said ON condition is in a line in the first direction including at least one other switching means in said ON condition and in a line in said second direction including at least one other switching means (l3) in said ON condition. 2. An apparatus for matrix switching according to claim l characterised in that a driving line (ll) is provided in said first direction. 3. An apparatus for matrix switching according to claim l or 2 characterised in that a sensing line (l2) is provided in the second direction. 4. An apparatus for matrix switching according to claim l, 2 or 3 characterised in that said apparatus further comprises a multiplexer (l5). 5. An apparatus for matrix switching according to any one claims l to 4 characterised in that said apparatus further comprises a decoder (l4). 6. An apparatus for matrix switching according to any one of the preceding claims characterised in that said storage means (2l) includes a random access memory. 7. A method for matrix switching comprising the steps of: providing a plurality of key lines (ll, l2) having a plurality of switches (l3) arranged in first and second directions respectively, detecting an ON condition of one or more of said plurality of switches by a time-sharing detection; counting the total number and the number on each key line of said switches having said ON condition simultaneously, storing for each switch one of: a first status representative of condition where an OFF condition is continuously detected twice; a second status representative of transition from said OFF condition to said ON condition; a third status representative of condition where said ON condition is continuously detected twice; and a fourth status representative of transition from said ON condition to said OFF condition of said switch; and changing said stored status of switches from said second status into said first status when said number of said switches simultaneously in said ON condition is four or more and when one of the switches in the ON condition is in a line in the first direction including at least one other switch also in the ON condition and in a line in the second direction including at least one other switch also in the ON condition.

Inventors: MORI, MASAHARU C/O BROTHER KOGYO K.K., TAKENAKA, SAE C/O BROTHER KOGYO K.K.
Applicants: BROTHER KOGYO KABUSHIKI KAISHA
Application year: 1987
Main classification: H03M11
IPC codes: H03M11, G06F3