TEST SYSTEM FOR KEYBOARD INTERFACE CIRCUIT

Abstract: A test system of this invention is capable of distinguishing interface circuit trouble from keyboard trouble. For diagnosis, an inhibit signal is generated to supply a test clock signal to an output shift register (10) and an input shift register (8) of the interface circuit (2) instead of a clock signal generated from the keyboard (40), and test data are loaded into the output shift register (10). If the test data are transferred from the output shift register (10) to the input shift register (8) correctly. It is deteded that the interface circuit (2) does not have trouble.

Description: This invention relates to a Test System according to the preamble of claim 1. It is known to use shift registers for enhancing testability of large-scale integrated circuits via test points and additional logic. However, in the known prior art cases, the additional hardware required to perform the large-scale integrated circuit testing is permanently incorporated into the circuits under test in such a manner that during normal operation of the logic circuits, the additional testing hardware adds unnecessary circuit delays. The incorporation of the hardware testing circuitry directly into the logic flow also creates another problem in that it must be compatible with the monolithic implementation of the logic circuits under test. An object of this invention is to provide a test system which is capable of distinguishing trouble of the keyboard interface circuit from trouble of the keyboard. To achieve said object, the invention comprises a means connecting, for at least a test period, input of first shift register which receives data signals from a keyboard and supplies them to another device such as a microprocessor to output of second shift register which supplies the data signals to the keyboard, a means for generating inhibit signals when testing, a means for generating test clock signals, a clock switching means responsive to the inhibit signals to supply test clock signals to the first and second shift registers instead of clock signals from the keyboard, a means responsive to the inhibit signals for inhibiting the data signals from being supplied from the keyboard to the first shift register, a means for supplying test data signals to the second shift register, and a means comparing signals being output from the first shift register with the test data signals supplied to the second shift register. During testing, the first and second shift registers of interface circuit are not supplied with data and clock signals from the keyboard. Instead, both registers are supplied with test clock signals from outside, and the second shift register is supplied with test data signals. That is, output of the second shift register is directly entered to the first shift register. If the output signals from the first shift register does not match the original test data signals, it is judged that the interface circuit has some trouble. The invention performs the test of interface circuit without using data and clock signals output from the keyboard, so that it can detect trouble of interface circuit itself without mixing up it and that in the keyboard. Brief Description of the Drawing: Figure 1 is a block diagram showing an embodiment of a test system for keyboard interface circuit. Figure 2 shows an embodiment of the invention. In the embodiment, output signals of the keyboard 40 are supplied to a serial input terminal of a serial-parallel converting input shift register 8 of the interface circuit 2 through an OR gate 28. Clock signals being output from the keyboard 40 are inverted by an inverter 22, and supplied to one of input terminals of AND gate 23. The input terminal of inverter 22 is connected to an output terminal of inverter 21 of an open collector. Although the open collector 21 transfers the clock signals being output from the keyboard 40 as they are if input signals (voltage) to the collector are at a low level, it maintains output signals (voltage) at a low level if the input signals are at a high level, and prevents clock signals output from the keyboard 40 from transferring to the inverter 22. An inhibit signal generating means 62 consisting of hardware and programs of the microprocessor 60 supplies input signals to the open collector 21. The generating means 62 provides inhibit signals of high level to the open collector 21 during testing of the interface circuit 2, and inhibits the clock signals output from the keyboard 40 from being supplied to the input and output registers 8 and 10. The keyboard 40 is arranged to stop generating of output data when signals (voltage) at the output terminal of clock or that of open collector 21 are maintained at a low level for a predetermined period or more. This is easily accomplished by combination of a timer and a switch. In normal operation, the inhibit signal generating means 62 generates low level signals allowing transfer of the clock signals output from the keyboard 40 to the inverter 22. Another input terminal of AND gate 23 is connected to a test clock 64 which is constituted by the hardware and program of microprocessor 60. The test clock 64 generates test clock signals as clock signals for shifting the input and output shift registers 8 and 10 when testing of the interface circuit 2, and generates rates high level signals in the normal operation to allow the clock signals output from the keyboard 40 to be supplied to the input and output shift registers 8 and 10 through the AND gate 23. As seen from the above description, the open collector 21, the inverter 22 and the AND gate 23 constitute a means for switching the clock signals output from the keyboard 40 and the test clock signals output from the test clock 64. The parallel input terminal of a parallel-serial converting output shift register 10 of the interface circuit 2 is connected to the microprocessor 60, while its serial output terminal is connected to the data input terminal of keyboard 40 and one of input terminals of AND gate 27. Another input terminal of AND gate 27 is connected to the inhibit signal generating means 62, and its output terminal is connected to the other input terminal of OR gate 28. The output shift register 10 is provided with various commands such as request for retransmission from the microprocessor 60 in the normal operation, and, when testing of the interface circuit 2, with test data from a test data generating means 66 which is constituted by the hardware and program of microprocessor 60. A comparison means 68 constituted by the hardware and program of microprocessor 60 is to compare data being output from the test data generating means 66 when testing with data which are returned through the output shift register 10 and the input shift register 8. Now, description is made on the operation of embodiment of Figure 2 thus constituted. In the normal operation, the inhibit signal generating means 62 and the test clock 64 generate low and high level signals, respectively. Therefore, the clock signals being output from the keyboard 40 are supplied to the clock terminals of the input and output shift registers 8 and 10 through the inverter 22 and the AND gate 23. Thus, data being output from the keyboard 40 are supplied to the microprocessor 60 after serial-parallel conversion in the input shift register 8 according to the clock signals of the keyboard. On the other hand, data output from the microprocessor 6 are supplied to the keyboard 40 after parallel-serial conversion in the output shift register 10. Since the AND gate 27 is supplied with low level signal from the inhibit signal generating means 62, the output signal in output shift register 10 is not provided to the input shift register 8. When testing of the interface circuit 2, the inhibit signal generating means 62 generates high level inhibit signals. This makes the output side of open collector 21 low level. The keyboard 40 stops outputting of data by detecting that the output signals at the clock output terminal are low level for a predetermined period. On the other hand, the test clock 64 supplies test clock signals to one of the input terminals of AND gate 23. Since the other input terminal of AND gate 23 is supplied with high level signals from the inverter 22, the test clock signals are supplied to the clock terminals of input and output shift registers 8 and 10. Then, the test data generating means 66 provides test data to the output shift register 10. The output shift register 10, if there is no trouble, converts the test data from parallel to serial according to the test clock signals, and outputs them to one of the input terminals of AND gate 27. Since the other input terminal of AND gate 27 is supplied with high level inhibit signals, the output signals of the output shift register 10 are supplied to the serial input terminal of input shift register through the AND gate 27 and the OR gate 28. The input shift register, if there is no trouble, converts the test data from serial to parallel according to the test clock signals, and provides them to the comparison means 68 of microprocessor 6. The means 68 compares the output signals of input shift register 8 with the output signals of test data generating means. If the comparison means generates matching signals, it is judged that the interface circuit 2 has no trouble. If the comparison means generates nonmatching signals, it is judged that the interface circuit 2 has some trouble. Figure 1 shows another embodiment of the invention. In this embodiment, the serial output terminal of the output shift register 10 is connected to an input terminal of an open collector 24, an output terminal of which is connected to the data terminal of keyboard 40 and to the serial input terminal of the input shift register 8 through the inverter 25, so that the keyboard has a common input/output lines instead of separate lines. The reason of provision of the open collector 24 is that data from the microprocessor 60 have priority, if data are output from the keyboard 40 and the microprocessor 60 simultaneously. That is, when the keyboard 40 and the output shift register 10 generate high level signals simultaneously, the output of open collector 24 becomes low level, and the data from the output register 10 or the microprocessor 60 have priority. Then, the keyboard 40 stops generating of data by detecting that the signal level at the data terminal is low although the keyboard 40 wants to generate high level signals. Since the open collector 24 does not forcedly make the output signals (voltage) of keyboard 40 low level if the output signals of output register 10 are at low level, the output data of keyboard 40 are supplied to the input register 8 through the inverter 25. Because the components of embodiment in Figure 1 having like reference numerals to those of embodiment in Figure 2 have same construction and functions to the corresponding components in Figure 2, description is not repeated here. When testing, the inhibit signal generating means 62 generates high level signals. This makes the output of open collector 21 low level, and the keyboard 40 stops generating of data by detecting that the output signals of clock terminal are low level for a predetermined period. On the other hand, the test clock 64 supplies test clock signals to the input and output shift registers 8 and 10 through the AND gate 23, and the test data generating means 66 supplies test data signals to the parallel input terminal of output shift register 10. The output shift register, if there is no trouble, supplies the test data to the serial input terminal of input shift register 8 through the open collector 24 and the inverter 25. The input shift register 8, if there is no trouble, outputs the test data to the comparison means 68 of microprocessor 60 as they are. The comparison means 68 compares the output signals of test data generating means 66 with the output signals of input shift register 8. If the comparison means 68 generates matching signals, it is judged that the interface circuit 2 has no trouble, otherwise it is judged that there is some trouble. The test is performed, for example, when the keyboard 40 sends only error signals even if the microprocessor 60 sends data resending request signals to the keyboard several times, but, of course, is not limited to such case. Since, in the embodiment of Figure 1, data being sent from the microprocessor 60 to the keyboard 40 in the normal operation are supplied to the input shift register 2 through the inverter 25, and then returned to the microprocessor 60, it is required to distinguish data output from the microprocessor 60 from those output from the keyboard 40, for example by attaching a flag to their top indicating that the data is output from the microprocessor 60. In addition, although, in the above-described embodiments, supplying output data to the input register 8 from the keyboard 40 is inhibited by stopping generation of data from the keyboard 40 when it is detected that the signal level at the clock terminal of keyboard 40 is maintained at low level over a predetermined period, it may be possible to inhibit output data signals of keyboard 40 from being supplied to the input shift register by ANDing the output data signals of keyboard 40 and the inverted signals of inhibit signals. Furthermore, although, in the above-described embodiments, the inhibit signal generating means 62, the test clock 64, the test data generating means 66 and the comparison means 68 are constituted by combination of hardware and programs of the microprocessor 60, it may be possible to constitute them with hardware that is completely different from the microprocessor. In addition, although, in the above-described embodiments, the interface circuit is constituted by the serial-parallel and parallel-serial converting shift registers, the invention is not limited to them, but may be applied to interface circuits that are constituted by various shift registers such as serial-in/serial-out or parallel-in/parallel-out.

Claims: Test system for testing existence of trouble in an interface circuit (2) having a first shift register (8) for storing data signals output from a keyboard (40) and shifting and outputting them according to clock signals output from said keyboard, and a second shift register (10) for storing data signals to be supplied to said keyboard and shifting and outputting them according to the clock signals output from said keyboard, characterized by means for connecting, for at least a test period, output of said second shift register (10) to input of said first shift register (8); means (62) for generating inhibit signals when testing; means (64) for generating test clock signals; clock switching means (21-23) responsive to said inhibit signals for inhibiting said clock signals from being supplied from said keyboard (40) to said first and second shift registers, and for supplying said test clock signals to said first and second shift registers; means (24; 25) responsive to said inhibit signals for inhibiting said data signals from being supplied from said keyboard to said first shift register; means (65) for supplying test data signals to said second shift register; and means (68) for comparing said test data signals supplied to said second shift register with signals output from said first shift register to determine existence of trouble in said first and second shift registers.

Inventors: SUETA, YOSHIHISA
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1985
Main classification: G01R31
IPC codes: G06F11, G06F3