Abstract:
A comparator comprises transistors to turn on/off an input terminal and a control circuit to enable the transistors in a high impedance input state. The high impedance input state can be detected by the above construction without additionally providing any wire and connector.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The invention relates to a comparator. 
     2. Related Background Art 
     FIG. 3 shows an example of a circuit of a conventional comparator. V 3  denotes a reference voltage source; I 7  indicates a constant current source; Q 21  to Q 25  transistors; and R 1  and R 2  resistors. 
     A circuit which is constructed by the constant current source I 7  and the transistors Q 21  to Q 24  is a simple comparator. An input terminal IN and the resistor R 2  are connected to a base of the transistor Q 21  and a base of the transistor Q 25  through wires and connectors from another electronic circuit board, respectively. 
     The operation of the comparator of FIG. 3 will now be described hereinbelow. 
     In the case where the input terminal IN and the resistor R 2  are respectively connected to the above transistors Q 21  and Q 25 , the transistor Q 25  is turned off and the circuit operates as an ordinary comparator. 
     When the terminal IN and the resistor R 2  are not connected, an output of the comparator is an output in a state in which a high level signal has been applied to an input. In this state, if a problem logically occurs, the transistor Q 25  connected by the resistor R 1  is set into a saturation state by a power source V cc , thereby fixing a base potential of the transistor Q 21  to a low level and satisfying the logic. 
     The conventional comparator, however, has the following technical problems to be solved. 
     (1) Since the wires or connectors must be added to know the coupling state, the costs rise. 
     (2) Since the wires or connectors are needed to know the coupling state in addition to a purpose of the input of the comparator, it is impossible to know the coupling states of both of them. Then a disconnection to each wire or a damage of the connector occurs, the normal operation cannot be performed and there is a fear of malfunction. 
     SUMMARY OF THE INVENTION 
     It is an object of the invention to provide a comparator which can solve the foregoing problems. 
     Another object of the invention is to provide a comparator comprising transistors to control the state of an input terminal and a control circuit to enable the transistors in a high impedance input state. 
     According to the invention, the high impedance input state can be detected by the above construction without additionally providing any wire and connector. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a circuit diagram of a comparator according to an embodiment of the invention; 
     FIG. 2 is a circuit diagram of a comparator according to another embodiment of the invention; and 
     FIG. 3 is a circuit diagram of a conventional comparator. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 is a circuit constructional diagram showing most preferably a feature of the invention. In FIG. 1, V 1  denotes a reference voltage source; I 1  to I 3  indicate constant current sources; and Q 1  to Q 10  indicate transistors. 
     A circuit which is constructed by the constant current source I 2  and the transistors Q 4  to Q 7  is a comparator. Current mirror circuits are constructed by the transistors Q 2  and Q 3  and the transistors Q 8  and Q 9 . The constant current source I 1  and the transistor Q 1  supply a constant current to the current mirror circuit. The constant current source I 3  and the transistor Q 10  supply a constant current to the current mirror circuit. 
     It is now assumed that the transistors Q 1 , Q 4 . Q 5 , and Q 10  are equal PNP transistors and that the transistors Q 2 , Q 3 , Q 8 , and Q 9  are equal NPN transistors. There are the relations of I 1  =I 3   and I 1  &gt;I 2  among the constant current sources I 1  to I 3 . 
     The operation of the comparator of FIG. 1 will now be described hereinbelow. 
     In the case where some input exists at the input terminal IN which is connected to a base of the transistor Q 4 , a collector of the transistor Q 3  current of the transistor Q 1  from the base of the transistor Q 4  and the terminal IN. At this time, the circuit operates as an ordinary comparator. 
     The operation in a disconnected state of the input terminal IN, which is a problem in the conventional comparator, in the case of the embodiment will now be described. When no input exists at the input terminal IN, the collector of the transistor Q 3  tries to pull in all of the currents which are equivalent to the base current of the transistor Q 1  from the base of the transistor Q 4 . Since the relation between the constant current sources I 1  and I 2  is now set to I 1  &gt;I 2 , the, base current of the transistor Q 1  should equal the collector current of the transistor Q 3  according to the well known operation of current mirror circuitry. But the collector current of the transistor Q 3  cannot be greater than the base current of the transistor Q 4 . Since transistor Q 3  cannot pull in sufficient current from base of Q 4  to equal the base current of transistor Q 1 , the transistor Q 3  is set into the saturating state. A base potential of the transistor Q 4  , therefore, is determined by a voltage between the collector and the emitter of the transistor Q 3  and is fixed to a low level. 
     FIG. 2 is a circuit constructional diagram showing another embodiment of the invention. In FIG. 2, V 2  denotes a reference voltage source; I 4  to I 6  constant current sources; and Q 11  to Q 20  transistors. 
     A circuit which is constructed by the constant current source I 5  and the transistors Q 14  to Q 17  is a comparator. Current mirror circuits are constructed by the transistors Q 12  and Q 13  and the transistors Q 18  and Q 19 . The constant current source I 4  and the transistor Q 11  function as a constant current source which is supplied to the current mirror circuit. The constant current source I 6  and the transistor Q 20  function as a constant current source which is supplied to the current mirror circuit. 
     It is now assumed that the transistors Q 11 , Q 14 , Q 15 , and Q 20  are equal NPN transistors and that the transistors Q 12 , Q 13 , Q 18 , and Q 19  are equal PNP transistors. There are the relations of I 4  =I 6  and I 4  &gt;I 5  among the constant current sources I 4  to I 6 . 
     The operation of the comparator of FIG. 2 will now be described hereinbelow. 
     In the case where some input exists at the input terminal IN which is connected to a base of the transistor Q 14 , a collector of the transistor Q 13  supplies a current which is equivalent to a base current of the transistor Q 11  to the base of the transistor Q 14  and the terminal IN. At this time, the circuit operates as an ordinary comparator. 
     In the case where no input exists at the input terminal IN, which becomes a problem in the conventional comparator, the collector of the transistor Q 13  tries to supply all of the currents equivalent of the base current of the transistor Q 11  to the base of the transistor Q 14  . Since the relation between the constant current sources I 4  and I 5  is set to I 4  &gt;I 5 , the base current of the transistor Q 11  should equal the collector current of the transistor Q 13  according to the well known operation of current mirror circuitry. But the collector current of the transistor Q 13  cannot be greater than the base current of the transistor Q 14 . Since transistor Q 13  cannot supply sufficient current to the base of Q 14  to equal the base current of transistor Q 11 , the transistor Q 13  is set into the saturating state. Therefore, the base potential of the transistor Q 14  is determined by the voltage between the collector and the emitter of the transistor Q 13  and is fixed to a high level. 
     As described above, according to the embodiments, since none of the wires and connectors is additionally needed, the input disconnection state can be certainly known without increasing the costs.