Abstract:
An integrated circuit has at least one input terminal and at least one output terminal, respectively, for receiving and transmitting digital and/or analog signals, being associated with discrete circuit portions of the integrated circuit which implement different logic functions. Advantageously, such terminals are coincident with a single pin, and an electronic circuit is arranged within the integrated circuit to detect the logic state of the pin.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to a semiconductor integrated circuit incorporating a bidirectional pin. 
     2. Discussion of the Related Art 
     As is well known, external connection pins provide the terminations for a package containing an electronic semiconductor integrated circuit. They allow the package to be mounted in a quick-connect fashion on a carrier board while electric connections are made. 
     It is desirable in this field for the number of the external pins be minimized, both to bring down the package manufacturing costs, and to enhance the efficiency and reliability of the incorporated electronic device. 
     This desire clashes with the requirements of the integrated circuit designer who is called upon to consolidate and implement a number of logic functions the circuit, but has a limited number of pins for externally coupling the circuit. Another problem for the designer is that the circuit must meet the requirements of the manufacturer&#39;s packaging line. It can thus be appreciated that the current trend toward a decreased number of external pins adds to the designer&#39;s work. 
     For these reasons, the designer is seldom afforded a sufficient number of external pins to provide for all the functions that he or she may desire. Often the designer must accept limitations on the circuit performance and/or the potential for interfacing with external circuits. 
     Understandably, it would be desirable if a single pin could serve multiple functions. This has not been feasible because disturbance or interaction might occur between functions. 
     For example, consider FIG. 1, which shows an integrated circuit having a first digital output pin A where a voltage value may be present which corresponds to either a logic low (0-2.5 volts) or a logic high (3.5-5 volts). A second pin B is desired for digital or control input, and its state may either be, for example, an open circuit or of grounded connection. It is apparent that if pins A and B coincided, a control signal received on pin B would interfere with the proper operation of the output at pin A. 
     It would be desirable to provide an improved integrated circuit which overcomes the limitations of prior approaches, and which allows a smaller number of external pins to be used. 
     SUMMARY OF THE INVENTION 
     An object of the invention is to provide an integrated circuit having at least one bidirectional pin, i.e., a pin adapted to operate in a dual mode--as an output terminal or as an input terminal. 
     A further object of this invention is to arrange for at least two discrete circuit functions to be provided at one pin having different digital or analog logic functionalities, and for the operability of one function to be unrelated to that of the other function. 
     According to the present invention, a single pin serves as a digital output and as a digital input, while an electronic circuit detects the logical state of the pin. 
     The pin is preferably coupled to ground through an external resistance and a switch. The circuit preferably includes/an actuator block coupled to the pin and to an internal resistance. The output of the actuator block is an input to one terminal of a comparator, the other terminal being coupled to a reference voltage. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The features and advantages of a circuit according to the invention will be apparent from the following detailed description of an embodiment thereof, given by way of example and not of limitation with reference to the accompanying drawings in which: 
     FIG. 1 is a schematic of a prior art integrated circuit; 
     FIG. 2 is a schematic of an integrated circuit embodying this invention; 
     FIG. 3 is a schematic showing FIG. 2 in more detail; and 
     FIG. 4 is a schematic of an embodiment of the circuit in FIG. 3. 
    
    
     DETAILED DESCRIPTION 
     Referring to FIG. 2, a semiconductor integrated circuit 1 has a dual-function, bidirectional external pin 2 in accordance with the invention. Circuit 1 may be, for example, an audio device known by the trade name of TDA 7337, produced by the assignee of the present invention. 
     Pin 2 is connected, via an inverter 4, to an output terminal of a first circuit portion 3 marked AMS (Automatic Music Sensor). The output has typical CMOS threshold voltage levels, i.e., the voltage value supplied on that output is in the 0-5 volt range. Pin 2 is also connected to an input terminal of a second circuit portion 24 marked MUTE and is intended to activate and deactivate a &#34;mute&#34; function of audio circuit 1. 
     In accordance with the invention, the pin can be coupled to another circuit portion intended for implementing another function, e.g., to enable a &#34;standby&#34; function of the audio circuit. 
     Externally of circuit 1, pin 2 is connected to ground through resistance R ext  whose value is known and is preferably about 40 kohms. In series between R.sub. ext  and ground is a normally open microswitch 5 provided either by an external open-collector circuit or by a gate of a microprocessor. 
     The voltage level on pin 2 defines the logic state of the digital output. When switch 5 is closed by grounding external resistance R ext , the voltage applied to pin 2 represents the logic state of a control input, and accordingly, provides the corresponding digital command to the digital input function. 
     Referring to FIG. 3, according to the invention, a circuit 10 is provided within circuit 1 to detect the logic state of pin 2 and to locate its operative functions as digital output or digital input. Circuit 10 has an actuator block 6 and a comparator 7 having a first inverting input 8 at which a reference voltage V ref  is provided, and a second non-inverting input 9 connected to an output terminal of actuator block 6. Block 6 has at least one pair of normally open electronic switches 11, 12 which are tied operatively to the voltage value on pin 2, i.e., the voltage signal at pin 2 is picked up and transmitted to actuator block 6 to allow switches 11, 12 to be driven. 
     An internal impedance R int  is connected between pin 2 and ground, and allows variations in the voltage value appearing on pin 2 to be detected. Switches 11, 12 parallel connect the opposing ends of the internal impedance R int  to non-inverting input 9 of comparator 7. The comparator has an output terminal 16 for coupling to an input terminal of a circuit such as MUTE 24 (FIG. 2). 
     Circuit 10 is described in more detail with reference to the embodiment shown in FIG. 4. Internal resistance R int  has a set of resistors R1, R2, and R3 connected in series between a signal ground and pin 2. Preferably, these resistors have values of 6, 30, and 6 kohms, respectively. The first resistor, R1, has one end connected to ground and another end connected to the drain terminal of a first field-effect transistor M1, preferably an MOS type, as well as to the resistor R2. Transistor M1 has a source terminal connected to non-inverting input 9 of the comparator 7 and to the source terminal of a second MOS transistor M2. 
     This second transistor M2 has a drain terminal connected between the resistors R2 and R3, and a gate terminal connected to the input of an inverter 13 whose output is connected to the gate terminal of transistor M1. Transistors, M1, M2 perform basically the same functions as the Two switches 11, 12 of FIG. 3. 
     Resistors R1, R2, and R3 are in a network 14 which also includes a fourth resistor R4 and a third MOS transistor M3. Resistor R4, preferably about 40 kohms, is connected between ground and the source of transistor M3 which has a drain terminal connected to pin 2. 
     The gate terminal of transistor M3 is connected to the gate terminal of a fourth transistor M4 which is further connected to transistor M3 by the coupling of the respective source and drain terminals. A biasing resistor R5 of about 120 kohms is connected between the drain and the source of fourth transistor M4. A current source A1 connects a positive 8-volt supply voltage V dd  to the drain of the transistor M4. 
     The inverter 4 has an input terminal 18 coupled to an output terminal of a circuit such as AMS 3 (FIG. 2), and an output terminal 19 connected to the gate terminals of the transistors M3 and M4 and to the gate of the transistor M2. 
     By operating microswitch 5, a change is produced in internal impedance R int  depending on whether external resistance R ext  is connected or unconnected to ground. 
     The change in the internal impedance is detected by comparator 7 leased upon a current to voltage conversion. Thus, comparator 7 changes the logic state of its output and sends a control signal 16 to certain internal circuitry (not shown) of circuit 1. The change in internal impedance brings about a change in the voltage value present on pin 2. In particular, the voltage drops when the external resistance is grounded. 
     Understandably, it is necessary to arrange for this change to occur within a range of values consistent with the conditions for MOS technology circuit operation. However, the connection of the external resistance causes no change to occur in the logic state of output pin 2. 
     The operation of the circuit according to the invention is worth reviewing in the light of the embodiment shown in FIG. 4. Four different conditions of its operation are analyzed below based on the output voltage applied to inverter 4, and whether switch 5 is open or closed. 
     1) A high output voltage value with resistance R ext  unconnected to ground. In this case, transistor M1 would be on and the other transistor M2 is off. The current from source A1 flows through transistor M4 to resistors R3, R2, and R1. 
     The value of this current is such that the voltage value transferred to input 9 of comparator 7 from transistor M1 is higher than threshold value V ref . Thus the comparator output is a logic high. The voltage value at pin 2 is also high consistent with voltage values that are typical of CMOS technology. 
     2) A high output voltage value with resistance Rex t  connected to ground. This case is similar to the previous one, except that resistance R ext  causes the current flowing through the series of R1, R2, and R3 to decrease. Therefore, the voltage value at the comparator input 9 is inadequate to switch the comparator. Compared to the previous case, the voltage at comparator output terminal 16 is at a logic low and depends on the parallel connection of resistors R1, R2, and R3 and external resistance R est . By appropriate selection of the resistive values, it is possible to keep within the range of CMOS consistency for the digital thresholds. 
     Pin 2 is at all times held at a logic high equal to A1*[(R1+R2+R3)//R ext  ]; thus, the connection of the external resistance may be said to only have caused a change in the voltage value at the comparator output terminal 16. 
     3) A low output voltage value with the resistance unconnected to ground. Current from source A1 flows through the resistors R3, R2, and R1, as well as through resistor R5. Transistor M2 is on, while transistor M1 is off. 
     The voltage at comparator input 9, which is connected to the resistor R2, is higher than the reference threshold V ref , and the output of comparator 7 is at a logic high. The voltage value at pin 2 is low, however, and is equal to A1*[(R1+R2+R3)//R4] because of the parallel connection between the series resistors R1, R2 and R3, and resistor R4. 
     4) A low output voltage value with the resistance connected to ground. Some current from source A1 is redirected toward the external resistance R ext  connected to ground. The voltage at input 9 of the comparator 7 is lower than V ref , and the voltage at output terminal 16 is at a logic low. The voltage at pin 2 is fixed by the parallel connection of resistor R4, external resistance R ext , and the series of R1, R2, and R3. Therefore, the voltage at pin 2 is different from that of case (3) above, but is still at a logic low consistent with the CMOS technology circuits. 
     When the external resistance is connected to ground, a change occurs in the logic state of the comparator without the logic value at pin 2 being altered. The voltage value present on pin 2 varies slightly according to whether the external resistance is connected, but this variation is tolerable within consistent values of CMOS technologies. 
     Inasmuch as the connection of the external resistance represents a control signal received on pin 2, it may also be seen that pin 2, although operated as a control input, undergoes no alteration in its logic value when functioning as an output terminal. 
     Thus, the input voltage from comparator 16 depends on whether switch 5 is open or closed, and does not depend on the output voltage or the voltage on pin 2. The voltage on pin 2 depends on the output voltage and does not depend on switch 5 or on comparator output 16. 
     The integrated circuit of this invention solves the technical problem and affords a number of advantages, among which is the fact that a single pin can now be used to serve two discrete digital functions that would otherwise require two different control pins if embodied as in the prior art. The two functions using the same pin are wholly independent of each other and retain CMOS consistency for the value of the output logic state. Thus, the digital command on pin 2 is unrelated to the digital output function served by that pin. 
     Advantageously, the inventive circuit could be applied to the measurement of variations in the output voltage from a digital output, following connection of an external impedance of known value. 
     Having described an embodiment of the present invention, it should be understood that changes and modifications may be made is the circuit described above without departing from the scope of the invention as defined by the appended claims. For example, the inventive circuit could alternatively be provided with a delay circuit to avoid switching spikes. The comparator 7 could be embodied by a single bipolar npn transistor, and the STANDBY function could be substituted for the digital control MUTE function.