1. Field of the Invention
This invention relates to an input-output interface for an electrical device, and more particularly to an input-output interface disposed between a sensor which generates a binary code signal and an electrical circuit for changing the binary code signal of the sensor into an acceptable signal for the electrical circuit.
2. Statement of the Prior Art
Various input-output interfaces such as buffers, inverters, comparators, hysteresis buffers, etc. are known in the art. The hysteresis buffer is, for example, shown in FIG. 3. The output of a sensor SEN1 is connected to one end of a resistor Rx while the other end of resistor Rx is connected to an input of a hysteresis buffer BU2. The output of the hysteresis buffer BU2 is connected to an input port of a central processing unit CPU comprising a microcomputer. The resistor Rx serves to protect the hysteresis buffer BU2 from overcurrent. The central processing unit CPU relates voltages over VIHCPU volts to a high level, and voltages under VILCPU volts to a low level. The hysteresis buffer BU2 generates an output signal according to the input signal, as shown in FIG. 4. While the output voltage VSEN of sensor SEN1 is increasing, if the output voltage VSEN is greater than the voltage corresponding to VIH, then the ouput voltage VCPU of hysteresis buffer BU2 is increased to a voltage corresponding to VOH. While the output voltage VSEN is decreasing, if the output voltage is less than the voltage corresponding to VIL, then the output voltage VCPU is decreased to a voltage corresponding to VOL. The voltage VIH is larger than the voltage VIHCPU, and the voltage VIL is smaller than the voltage VILCPU. So, while the output voltage VSEN of the sensor SEN1 is increasing from 0 volts, the voltage VSEN is still greater than VIH volts, and the input voltage VCPU of the central processing unit CPU is lower than VILCPU voltage, then, the central processing unit CPU regards the input signal as a low level. While the output voltage VSEN is decreasing, the voltage VSEN is still greater than the VIL voltage, and the input voltage VCPU is greater than VIHCPU voltage, then the central processing unit CPU regards the input signal as a high level.
In these input-output interfaces, at least nine components are necessary. These components include a resistor to protect from over current; a terminal at the sensor side of the resistor; a terminal at the buffer side of the resistor; a buffer; a terminal at the output side of the buffer; a signal line to connect the output of the sensor to a terminal at the sensor side of the resistor; a signal line to connect a terminal at the buffer side of the resistor to an input terminal of the buffer; and a signal line to connect the output terminal of the buffer with the input port of the electric circuit. Since each terminal serves to connect one component to another, it must be strong to assure a reliable conection. Accordingly, it is necessary to be able to provide for a large capacity. For example, in an integrated circuit of the dual-in-line package type, the volume of the package generally depends on the number of the terminals.