Abstract:
A voltage monitor circuit for biasing a well region of a CMOS circuit includes a self-biased comparator which compares first (INP) and second (INN) input signals. The comparator includes first (MN 1 ) and second (MN 2 ) N-channel transistors with grounded sources, a drain of the first N-channel transistor and a gate of the second N-channel transistor being coupled to a first output (OUTN), and a drain of the second N-channel transistor and a gate of the first N-channel transistor being coupled to a second output (OUTP). First (MP 1 ) and second (MP 2 ) P-channel transistors are operated to couple the second or first input signal to the second or first output, respectively, by controlling the gate-to-source voltage of the first or second P-channel transistor according to the polarity of a voltage difference between the first and second input signals.

Description:
BACKGROUND OF THE INVENTION  
         [0001]    The present invention relates generally to supply voltage monitoring circuits for use in detecting that of two supply voltages is higher in an integrated circuit containing circuitry which otherwise can be damaged if the two supply voltages are increased or “powered up” in the wrong sequence. More particularly, the invention relates to monitoring and switching circuitry that automatically connects the N-type well regions of P-channel transistors to the higher of the two or more supply voltages.  
           [0002]    In a mixed-signal system, i.e., a system including both digital signals and analog signals, it is common for the associated digital circuitry and analog circuitry to be powered by separate power supply voltage sources having different voltage levels, for example 5 volts for the analog circuitry and 3.3 volts for the digital circuitry. However, often the digital circuitry that interfaces with the mixed-signal system is powered by a 5 volt supply voltage. The 3.3 volt digital input/output circuitry of the mixed-signal system must be “tolerant” to the 5 volt digital signals received from the above-mentioned external digital circuitry. That is, the 5 volt digital signals must not damage the 3.3 volt digital input/output circuitry. Translation buffer circuits can be used that translate the 5 volt output signals produced by such digital circuitry to the 3.3 volt level required by the digital circuitry in the mixed-signal system. However, use of such translation buffer circuits involves additional cost. In order to accomplish this, the 3.3 volt digital circuitry in the mixed-signal system must be powered by a 5 volt supply.  
           [0003]    [0003]FIG. 1A shows a schematic view of a typical 3.3V I/O cell  10  which is connected to a generalized I/O cell control circuit. In I/O (input/output) cell  10  the bulk terminal BP and the source terminal SP of a P-channel output driver transistor  13  are connected to a 3.3V digital power supply voltage DVDD. The drain terminal DP of transistor  13  is coupled to a static protection device and to an I/O pad and also to the drain terminal DN of an N-channel transistor  14 , the bulk terminal BN and source terminal SN of which are connected to ground.  
           [0004]    [0004]FIG. 1B shows a cross-sectional view of I/O cell  10  formed in a P-type substrate  12 . N-channel transistor  14  has its source and drain comprised of two N-type regions NP formed in substrate  12 , the gate of transistor  14  being designated by GN. Electrical contact to P-type substrate  12  is accomplished through heavily doped contact region PP designated by reference numeral  12 A. An N-type “well” region  11  is formed in substrate  12 , and P-channel transistor  13  is formed by two P-type regions PP formed in well region  11 . N-type well region  11  constitutes the bulk terminal of P-channel transistor  13 . Electrical contact to well region  11  is accomplished by a heavily doped N-type region NP designated by reference numeral  11 A. PN junctions that are formed by the P-type source and drain regions PP of transistor  13  and the N-type well region  11  constitute the two parasitic PN junction diodes D 1  and D 2 , respectively.  
           [0005]    I/O cell  10  is not tolerant to a 5 volt input signal applied to the I/O pad because the parasitic diode D 1  will become forward-biased every time the I/O pad voltage rises above the DVDD level of 3.3 volts. The forward-biasing of parasitic junction diode D 1  will not only conduct a large amount of current through it but it may also cause latch-up and/or permanent damage to the I/O cell. As is well-known to those skilled in the art, integrated circuit structures often include parasitic bipolar transistors that interact in a regenerative fashion to switch a parasitic latch circuit into a high-current mode as a result of forward-biasing of a parasitic PN junction. The resulting high current may damage the integrated circuit. In any case, the parasitic latch device can be switched off so as to eliminate the high current only by removing power from the circuit before turning the power back on to continue operation of the circuit.  
           [0006]    Referring to FIG. 1C and the corresponding integrated circuit sectional view in FIG. 1D, in order to make the 3.3V I/O cell  10 A tolerant to a 5 volt input, N-type well  11  must be at the 5 volt supply level AVDD to avoid forward biasing parasitic diode D 1 , and this can be accomplished by simply connecting the bulk terminal BP of transistor  13  to the 5 volt analog power supply AVDD. However, this connection requires the user to turn on the analog supply voltage AVDD before the digital supply voltage DVDD during the power-up sequence, and also to turn off the digital supply DVDD before the analog supply AVDD during the power-down sequence. If the foregoing power-up and power-down sequences are not observed, parasitic junction diode D 2  will become forward-biased, causing it to conduct a large amount of current through the diode D 2 , and may also cause latch-up and/or permanent damage to I/O cell  10 . The foregoing restriction on the power-up sequence and power-down sequence of the analog and digital power supply voltages limits the convenience of using the dual supply mixed-signal system of FIG. 1C. In a system wherein the sequence of activating power supply voltages cannot be readily controlled, the usefulness of the circuit shown in FIG. 1C is limited. To remove this restriction, it is necessary to have a circuit to keep N-type well  11  at the higher of the two power supply voltages at all times.  
           [0007]    [0007]FIG. 1E shows a 3.3 volt I/O cell  10 B with the bulk terminal BP of the P-channel output driver transistor  13  connected to a monitor circuit  15  which monitors both the 3.3 volt digital supply DVDD and the  5  volt analog supply AVDD and outputs the higher of the two supply voltages to the bulk terminal BP of transistor  13 . In I/O cell  10 B the parasitic PN junction diodes D 1  and D 2  can never become forward-biased. I/O cell  10 B therefore is “5 volt tolerant” and imposes no restriction on the AVDD and DVDD power-up and power-down sequences  
           [0008]    A prior art implementation of monitor circuit  15  of FIGS. 1E and 1F for keeping the N-type well region  11  at the higher of two power supply voltages VA and VB is shown in FIG. 2. The circuit includes cross-coupled P-channel transistors MP 1  and MP 2  having their drains connected to VABMAX conductor  15 A. The gate of transistor MP 1  and the source of transistor MP 2  are connected to VB, and the gate of transistor MP 2  and the source of transistor MP 1  are connected to VA. In this circuit, if VA is larger than VB by at least one threshold voltage VTP of the transistor MP 1  then VABMAX will be connected to VA through transistor MP 1  and similarly, if VB is greater than VA by at least VTP, then VABMAX will be connected to VB through MP 2 . By connecting the N-type well region(s) 15 of the P-channel transistors in the input/output circuitry of a mixed-signal integrated circuit, the N-type well region  11  will be maintained at the higher of VA and VB. Unfortunately, the circuit of FIG. 2 exhibits a “dead-zone” of VTP volts and does not function effectively if one of the two supply voltages VA and VB is not greater than the other by at least VTP volts.  
           [0009]    [0009]FIG. 3 shows another prior art implementation of supply voltage monitor circuit  15  of FIGS. 1E and 1F for maintaining the N-type well region  11  at the higher of VA and VB. Supply voltage monitor circuit  15  includes a conventional comparator  20 , outputs of which are connected to gates of P-channel transistors MPD 1  and MPD 2 , the drains and bulk electrodes of which are connected to conductor  15 A. The sources of transistors MPD 1  and MPD 2  are connected to VA and VB, respectively. In the circuit of FIG. 3, if the supply voltage VA is turned on first to a voltage level that is high enough for the bias current generator to function properly, then the output voltage VABMAX on conductor  15 A will select the higher of the VA and VB supply voltages without exhibiting a dead-zone such as that in the circuit of FIG. 2. However, the supply voltage monitor circuit of FIG. 3 has the disadvantage that the supply voltage VA must be turned on first before the comparator circuitry therein can function properly, because if VB is turned on first, the comparator  20  does not function and the circuit operation is equivalent to that of the circuit of FIG. 2.  
           [0010]    Thus, there is an unmet need for a power supply voltage monitoring/control circuit that automatically connects an N-type well region of a CMOS integrated circuit to the highest of a plurality of supply voltages provided in the integrated circuit.  
           [0011]    There is another unmet need for a power supply voltage monitoring/control circuit that automatically connects an N-type region or substrate of an integrated circuit to the highest of a plurality of supply voltages provided in the integrated circuit with minimum restriction on the magnitudes of the power supply voltages and the sequences in which the various power supply voltages must be turned on and off.  
           [0012]    There is another unmet need for a power supply voltage monitoring/control circuit that continuously automatically connects an N-type well region of a CMOS integrated circuit to the highest of a plurality of supply voltages provided in the integrated circuit.  
           [0013]    There is another unmet need for a power supply voltage monitoring/control circuit that avoids producing a “dead zone” in which the higher of a plurality of supply voltages is not reliably connected to an N-type well region of a CMOS integrated circuit.  
           [0014]    There is another unmet need for a power supply voltage monitoring/control circuit that avoids the need users predetermined sequences to power up and power down multiple supply voltages applied to an integrated circuit.  
           [0015]    There is another unmet need for a power supply voltage monitoring/control circuit that operates reliably irrespective of the magnitude of voltage differences between various supply voltages utilized in an integrated circuit including the monitoring/control circuit.  
         SUMMARY OF THE INVENTION  
         [0016]    Accordingly, it is an object of the present invention to provide a power supply voltage monitoring/control circuit that automatically connects an N-type well region of a CMOS integrated circuit to the highest of a plurality of supply voltages provided in the integrated circuit.  
           [0017]    It is another object of the invention to provide a power supply voltage monitoring/control circuit that automatically connects an N-type region or substrate of an integrated circuit to the highest of a plurality of supply voltages provided in the integrated circuit with minimum restriction on the magnitudes of the power supply voltages and the sequences in which the various power supply voltages must be turned on and off.  
           [0018]    It is another object of the present invention to provide a power supply voltage monitoring/control circuit that continuously automatically connects an N-type well region of a CMOS integrated circuit to the highest of a plurality of supply voltages provided in the integrated circuit.  
           [0019]    It is another object of the present invention to provide a power supply voltage monitoring/control circuit that continuously automatically connects or reconnects an N-type region or substrate of an integrated circuit to the highest of a plurality of supply voltages provided in the integrated circuit even for a relatively low voltage difference between the highest and next-highest supply voltages.  
           [0020]    It is another object of the present invention to provide a power supply voltage monitoring/control circuit that avoids producing a “dead zone” in which the higher of a plurality of supply voltages is not reliably connected to an N-type well region of a CMOS integrated circuit.  
           [0021]    It is another object of the present invention to provide a power supply voltage monitoring/control circuit that avoids the need to power up and power down multiple supply voltages applied to an integrated circuit according to predetermined sequences.  
           [0022]    It is another object of the invention to provide a power supply voltage monitoring/control circuit having a predetermined amount of hysteresis that continuously automatically connects an N-type well region of a CMOS integrated circuit to the highest of a plurality of supply voltages provided in the integrated circuit  
           [0023]    Briefly described, and in accordance with one embodiment, the present invention provides a voltage monitor circuit for biasing a well region of a CMOS circuit including a self-biased comparator which compares first (INP) and second (INN) input signals. The comparator includes first (MN 1 ) and second (MN 2 ) N-channel transistors with grounded sources, a drain of the first N-channel transistor and a gate of the second N-channel transistor being coupled to a first output (OUTN), and a drain of the second N-channel transistor and a gate of the first N-channel transistor being coupled to a second output (OUTP). First (MP 1 ) and second (MP 2 ) P-channel transistors are operated to couple the second or first input signal to the second or first output, respectively, by controlling the gate-to-source voltage of the first or second P-channel transistor according to the polarity of a voltage difference between the first and second input signals. In one embodiment, a self-biased comparator circuit ( 20 ) includes first (INP) and second (MNN) inputs, first (OUTP) and second (OUTN) outputs and a reference voltage conductor (GND), first (MN 1 ), second (MN 2 ), third (MN 3 ) and fourth (MN 4 ) N-channel transistors and first (MN 3 ) and second (MN 4 ) current sources, first (MP 1 ) and second (MP 2 )P-channel transistors, and first (MP 3 ) and second (MP 4 ) level shifters. The sources of the first (MN 1 ) and second (MN 2 ) N-channel transistors are coupled to the reference voltage conductor (GND), a gate of the first (MN 1 ) N-channel transistor is coupled to the first output (OUTP), a drain of the second N-channel transistor (MN 2 ) and a drain of the second P-channel transistor (MP 2 ), and a gate of the second (MN 2 ) N-channel transistor is coupled to the second output (OUTN), a drain of the first N-channel transistor (MN 1 ) and a drain of the first P-channel transistor (MP 1 ). The source and a bulk electrode of the third P-channel transistor (MP 3 ) and a source and a bulk electrode of the second P-channel transistor (MP 2 ) are coupled to the first input (INM), a source and a bulk electrode of the fourth P-channel transistor (MP 4 ) and a source and a bulk electrode of the first P-channel transistor (MP 1 ) are coupled to the second input (INN), a first conductor (n 1 ) is coupled to a gate of the first P-channel transistor (MP 1 ), a gate and a drain of the third P-channel transistor (MP 3 ), and a first terminal of the first current source (MN 3 ), a second conductor (n 2 ) is coupled to a gate of the second P-channel transistor (MP 2 ), a gate and drain of the fourth P-channel transistor (MP 4 ), and a first terminal of the second current source (MN 4 ), and a second terminal of the first current source and a second terminal of the second current source are coupled to the reference voltage conductor. In the described embodiments, the first and second level shifters include third (MP 3 ) and fourth (MP 4 ) P-channel transistors, respectively, and the first current source includes a third N-channel transistor (MN 3 ) having a source coupled to the reference voltage conductor, a gate coupled to the gate of the first output (OUTP) and a drain coupled to the first conductor (n 1 ), and the second current source includes a fourth N-channel transistor (MN 4 ) having a source coupled to the reference voltage conductor, a gate coupled to the gate of the second output (OUTN) and a drain coupled to the second conductor (n 2 ).  
           [0024]    In one embodiment, the self biased comparator is included in a voltage monitor circuit ( 15 ) including a first voltage input (VA), a second voltage input (VB), and a voltage output (VABMAX). A first P-channel drive transistor (MPD 1 ) has a source coupled to the first voltage input (VA) and the first input (INP), a gate coupled to the second output (OUTN), and a source and a bulk electrode coupled to the voltage output (VABMAX). The second P-channel drive transistor (MPD 2 ) has a source coupled to the second voltage input (VB) and the second input (INN), a gate coupled to the first output (OUTP), and a source and a bulk electrode coupled to the voltage output (VABMAX), wherein the output voltage (VABMAX) is equal to the greater of the first (VA) and second (VB) voltage inputs.  
           [0025]    In one embodiment, a CMOS integrated circuit avoids forward biasing of parasitic PN junctions by using the voltage monitor circuit to bias N-type regions at the highest supply voltage coupled to the CMOS integrated circuit.  
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0026]    [0026]FIG. 1A is a schematic diagram of a prior art I/O cell powered by a digital supply voltage DVDD.  
         [0027]    [0027]FIG. 1B is a sectional view of the structure of an integrated circuit implementation of the I/O cell in FIG. 1A.  
         [0028]    [0028]FIG. 1C is a schematic diagram of a prior art  10  cell powered by both a digital supply voltage DVDD and an analog supply voltage AVDD.  
         [0029]    [0029]FIG. 1D is a sectional view of the structure of an integrated circuit implementation of the I/O cell in FIG. 1C.  
         [0030]    [0030]FIG. 1E is a schematic diagram of a prior art  10  cell powered by both a digital supply voltage DVDD and an analog supply voltage AVDD wherein in N-type well region is biased by a monitor circuit which applies the higher of the supply voltages DVDD and AVDD to the N-type well region.  
         [0031]    [0031]FIG. 1F is a hybrid sectional view of the monitor circuit and the structure of an integrated circuit implementation of the I/O cell in FIG. 1E.  
         [0032]    [0032]FIG. 2 is a schematic diagram of a prior art monitor circuit.  
         [0033]    [0033]FIG. 3 is a schematic diagram of another prior art monitor circuit.  
         [0034]    [0034]FIG. 4 is a schematic diagram of a basic self-biased comparator circuit of the present invention.  
         [0035]    [0035]FIG. 5 is a schematic diagram of an improved version of the self-biased comparator circuit of FIG. 4.  
         [0036]    [0036]FIG. 6 is a schematic diagram of a further improved version of the self-biased comparator circuit of FIG. 5.  
         [0037]    [0037]FIG. 7 is a diagram of an improved monitor circuit of the present invention.  
         [0038]    [0038]FIG. 8 is a hybrid diagram of the monitor circuit of FIG. 7 and the structure of an integrated circuit implementation of the I/O cell in FIG. 1E.  
         [0039]    [0039]FIG. 9 is a diagram of a monitor circuit that produces an output voltage equal to the highest of 4 supply voltages.  
         [0040]    [0040]FIG. 10 is a timing diagram useful in explaining the operation of the basic self-biased comparator circuit of FIG. 4.  
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0041]    The invention provides several new self-biased comparator circuits and several supply voltage monitor circuits that include any of the new comparator circuits. The new supply voltage monitor circuits are utilized to bias a N-type well region of an integrated circuit to prevent forward biasing of parasitic PN junctions during power-up sequencing of multiple power supply voltages connected to the integrated circuit.  
         [0042]    [0042]FIG. 4 shows a basic self-biased comparator circuit  20 A, and FIGS. 5 and 6 show modified versions  20 B and  20 C, respectively, of the basic comparator  20 A with additional features. FIG. 7 shows a supply voltage monitor circuit  15 - 1  that includes any of the comparators of FIGS. 4-6 and functions to select the higher of two supply voltages VA and VB and applies the higher of the two supply voltages via conductor  15 A as an output voltage VABMAX to be used to bias an N-type well region. FIG. 8 shows the supply voltage monitor circuit  15 - 1  of FIG. 7 with its output voltage VABMAX applied via conductor  15 A to bias the N-type well region  11  of the integrated circuit I/O cell shown in FIG. 1F.  
         [0043]    The basic self-biased comparator circuit  20 A of FIG. 4 has two input terminals INP and INN, two output terminals OUTN and OUTP, and a ground power supply rail GND. Since comparator  20 A is self-biased, the input terminals INP and INN also function as its power supply terminals. INP is connected to the source and bulk electrodes of a P-channel transistor MP 3 , the gate and drain of which are connected to both the drain of an N-channel transistor MN 3  and the gate of a P-channel transistor MP I. INP also is connected to the source and bulk electrodes of a P-channel transistor MP 2 , the gate of which is connected by a conductor n 2  to the gate and drain of a P-channel transistor MP 4 . INN is connected to the source and bulk electrodes of transistor MP 4  and to the source and bulk electrodes of transistor MP 1 . The source of transistor MN 3  is connected to ground, and its gate is connected to the gate of an N-channel transistor MN 1  having its source connected to ground. The drain of transistor MN 1  is connected to OUTN, the drain of transistor MP 1 , and the gate of an N-channel transistor MN 2  and the gate of an N-channel transistor MN 4 , both of which have their sources connected to ground. The drain of transistor MN 2  is connected to the gates of transistors MN 1  and MN 3 , the drain of transistor MP 2  and to OUTP. Parasitic capacitances on conductors n 1  and n 2  are indicated by dashed lines.  
         [0044]    The operation of comparator  20 A is described next. Comparator  20 A starts functioning as soon as the voltage of one of INN and INP exceeds the threshold voltage VTP of the P-channel transistors MP 1 -MP 4 . If the input terminal INP is at a higher voltage than input terminal INN, then output terminal OUTP follows the voltage of input terminal INP while the output terminal OUTN is maintained at a low voltage level. If the input terminal INN is at a higher potential than input terminal INP, then output terminal OUTN follows input terminal INN while the output terminal OUTP is at a low voltage level.  
         [0045]    The illustrated parasitic capacitances associated with conductor n 2  tend to keep its voltage low when INN is held at 0 volts, so transistor MP 2  turns on when the voltage of INP ramps up if INN is maintained at 0 volts. In a worst-case situation, conductor n 2  is limited in how far positive it can go (when INN is maintained at ground) by the forward biasing of a parasitic PN junction diode formed by the N-type source region of transistor MP 4  and the N-type well region in which that source region is formed. In any case, transistor MP 2  is guaranteed to turn on when INP reaches the sum of the approximately 0.6 volt forward bias voltage of the above-mentioned parasitic diode plus the threshold voltage of transistor MP 2 .  
         [0046]    In order to understand the details of the comparator operation, assume that initially both inputs INN and INP are at zero volts and input INP then ramps up to 2 volts. As INP exceeds VTP, transistor MP 2  turns on and pulls OUTP up to the voltage level of MNP. This causes transistors MN 1  and MN 3  to turn on. With transistor MN 3  turned on, bias current is established in the branch formed by transistors MP 3  and MN 3 , which in turn establishes the voltage level of conductor n 1  near ground. Transistor MP 1  is in its off state since the voltage of its source is near ground. Output terminal OUTN is kept near zero volts by transistor MN 1 , which is turned on. Since OUTN is near zero volts, transistors MN 2  and MN 4  are turned off.  
         [0047]    Assuming next that input INP remains constant at 2 volts and input INN ramps up from 0 volts to (for example) 3 volts. As INN approaches 2 volts, transistor MP 1  starts to turn on. Since transistor MN 1  is also turned on, a current path from INN to ground is established in the branch formed by transistors MP 1  and MN 1 . As INN increases, the current through transistors MP 1  and MN 1  increases and the voltage of OUTN also increases. As the voltage of OUTN increases, transistor MN 2 , which starts to turn on, begins to pull the voltage of OUTP lower, which causes transistor MN 1  to start turning off. As the voltage of INN increases past 2 volts (assuming a hysteresis of zero volts), the positive feedback action in the latch formed by transistors MN 1  and MN 2  causes OUTP to approach zero volts and causes OUTN to approach the voltage of INN.  
         [0048]    The hysteresis of self-biased comparator  20 A of FIG. 4 is controlled by choosing appropriate W/L ratios (i.e., channel-width to channel-length ratios) between transistors MN 1  and MN 3  (or transistors MN 2  and MN 4 ), and by choosing appropriate W/L ratios between transistors MP 1  and MP 3  (or transistors MP 2  and MP 4 ). If the W/L ratios of transistors MN 3  and MP 3  (or MN 4  and MP 4 ) are denoted as 1X, then the hysteresis of the comparator is controlled by choosing the correct W/L ratio multiplicative factors M for MP 1  (MP 2 ) and N for MN 1  (MN 2 ), as indicated in FIG. 4. Thus, the W/L ratios of transistors MP 1  and MP 2  are denoted as MX, and the W/L ratios of transistors that MN 1  and MN 2  are denoted as NX. Usually, the multiplicative factors M and N are chosen to be at least 10, as the 1X sized transistors are designed to be a small as possible in order to minimize power consumption. If N&gt;M then comparator  20 A will exhibit positive hysteresis. If M=N, then comparator  20 A will have zero hysteresis. In this case, the transfer function of comparator  20 A is such that OUTP is equal to INP if INP is greater than INN but otherwise is equal to zero volts, and is such that OUTN is equal to INN if INN is greater than INP but otherwise is equal to zero volts. An advantage of the invention is that positive hysteresis is usually insured by merely ensuring that the ratio N/M exceeds 1. In the described embodiments, the ratio of N to M was chosen to be approximately 2.  
         [0049]    If N&lt;M then comparator  20 A will exhibit negative hysteresis. Negative hysteresis is generally undesirable for power supply monitoring applications because if INP and INN are within the negative hysteresis region, then the outputs OUTP and OUTN comparator  20 A may oscillate. For example, if INP is at 2 volts, and the amount of hysteresis is +0.1 volts, then INN would have to increase to 2.1 volts in order to cause comparator  20 A to change state. More generally, the voltage of one of INP and INN must exceed the voltage of the other by at least the amount of positive hysteresis in order to cause the comparator to switch. This is important because if the amount of hysteresis is negative, the comparator may tend to oscillate. Note that if the two power supply voltages, when established, have very similar levels that differ by less than the positive hysteresis of the comparator, the one that is established first will be the “winner”, but no switching of the comparator will occur when the other one is established even if it is slightly higher. However, this is not problematic because the small voltage difference between the two supply voltages in this case is not large enough to cause any parasitic PN junction to become forward biased.  
         [0050]    Reliable operation of the basic self-biased comparator  20 A of FIG. 4 is assured as long as the final established voltage difference between INP and INN is larger than one threshold voltage of PMOS transistor MP 2  (or MP 1 ). If this condition is not met, the higher of the two outputs OUTP or OUTN is held high by parasitic capacitance and, over time, may be delayed in the causing of an error, because if either OUTP or OUTN is being held high by a voltage stored by a parasitic capacitance, any leakage current from the corresponding conductor (n 1  or n 2 ) may slowly change the voltage on that conductor and eventually cause an output error.  
         [0051]    To illustrate this susceptibility, suppose that INP is at 2 volts and IN is at 0 volts. With these conditions transistor MP 2  will be turned on and will pull OUTP to 2 volts. Next, suppose that INN ramps up to 1.8 volts and stays at 1.8 volts. As INN ramps up to 1.8 volts, parasitic effects will cause the voltage of conductor n 2  to ramp up also. As conductor n 2  ramps up, transistor MP 2  will turn off. If there is any leakage current from OUTP to GND then the voltage of OUTP will discharge to a potential lower than 2 volts, possibly all the way down to 0 volts. Under these conditions the basic comparator of FIG. 1 cannot provide reliable operation.  
         [0052]    [0052]FIG. 5 shows an improved version  20 B of the basic comparator circuit  20 A of FIG. 4 that has been obtained by adding P-channel cross-coupled pull-up transistors MP 5  and MP 6  to basic self-biased comparator circuit  20 A. The source and bulk terminals of transistor MP 5  are connected to INN and the source and bulk terminals of transistor MP 6  are connected to INP. The gate of transistor MP 5  is connected to the drain of transistor MP 6  and OUTP. The gate of transistor MP 6  is connected to the drain of transistor MP 5  and to OUTN. The function of pull-up transistors MP 5  and MP 6  is to keep OUTP and OUTN at a correct voltage even when the difference between INP and INN is less than VTP. To illustrate the function of the pull-up transistors MP 5  and MP 6 , assume the same scenario described above. That is, initially INP is at 2 volts and INN is at 0 volts. Under these conditions MP 2  will be turned on and will pull OUTP to 2 volts. OUTN will be at 0 volts. Next, assume that INN ramps up to 1.8 volts and stays at that level. As INN ramps up to 1.8 volts, parasitic effects will cause node n 2  to ramp up also. As node N 2  ramps up MP 2  will turn off. However, with the pull-up transistors MP 5  and MP 6  in place, the gate of MP 6  will still be at 0 volts and its source will be at 2 volts. Pull-up transistor MP 6  will therefore be turned on and will keep OUTP at 2 volts. Thus, it can be seen that the pull-up transistors MP 5  and MP 6  ensure that comparator  20 B of FIG. 5 functions reliably even when the voltage difference between INP and INN is less than VTP.  
         [0053]    [0053]FIG. 6 shows a comparator  20 C which is a further improvement of the comparator circuit  20 B of FIG. 5. In addition to the pull-up transistors MP 5  and MP 6  it also includes P-channel transistors MP 7  and MP 8 . The gate of transistor MP 7  is connected to INP, its source and bulk electrodes are connected to INN, and its drain is connected to OUTN. The gate of transistor MP 8  is connected to INN, its source and bulk electrodes are connected to INP, and its drain is connected to OUTP. The function of transistors MP 7  and MP 8  is to enhance the start-up response of comparator  20 C. In self-biased comparator circuit  20 C of FIG. 6, the addition of transistors MP 7  and  8  provides an “early definition” for the circuit when one of its inputs INP or INN ramps up before the other. For example, if INN is held at ground and INP is ramped up, since INN is connected to the gate of transistor MP 8 , the source of which is connected to INP, transistor MP 8  turned on as soon as the voltage of INP exceeds the threshold voltage VTP of transistor MP 8 . That provides a conduction path to transistors MN 1  and MN 2  which causes the latch circuit formed by them to switch states consistently. Instead of relying on the parasitic capacitance on conductor n 2  to hold it at ground so transistor MP 2  turns on as INP ramps up and causes OUTP to follow INP, comparator  20 C of FIG. 6 relies on INN being held at ground and transistor MP 8  being turned on as INP increases to cause OUTP to follow INP. Thus, it can be seen that with MP 7  and MP 8  in place, transistors MP 7  and MP 8  function as the equivalent of a set input and a reset input of the latch. Therefore, comparator  20 B is guaranteed to start-up as soon as the difference between INP and INN exceeds the P-channel threshold voltage VTP. It should be noted that the addition of transistors MP 5 ,  6 ,  7 ,  8   2  the basic comparator  20 A shown in FIG. 4 does not affect the hysteresis of the basic comparator.  
         [0054]    Referring to FIG. 7, a power supply voltage monitor circuit  15 - 1  for selecting the higher of two voltages VA and VB can use any of the above described self-biased comparators  20 A,  20 B or  20 C as its main building block. Although any one of the three disclosed comparators  20 A,  20 B and  20 C (any one of which is referred to by reference numeral  20  in FIGS. 7-9) can be used, comparator  20 C of FIG. 6 provides the most reliable operation. The input INP of comparator  20  is connected to supply voltage VA and to the source of a P-channel transistor MPD 1 . The output OUTN of comparator  20  is connected to the gate of transistor MPD 1 , the drain and bulk electrodes of which are connected to conductor  15 A. Similarly, the input INN of comparator  20  is connected to supply voltage VB and to the source of a P-channel transistor MPD 2 . The output OUTP of comparator  20  is connected to the gate of a P-channel transistor MPD 2 , the drain and bulk electrodes of which are connected to conductor  15 A.  
         [0055]    Monitor circuit  15 - 1  takes advantage of the characteristics of comparator  20  to selectively turn on one of the P-channel driver transistors MPD 1  or MPD 2 . When supply voltage VA is larger than supply voltage VB, output OUTN is at 0 volts and output OUTP is at the same voltage as VA. Consequently, transistor MPD 1  is turned on and transistor MPD 2  is turned off and the resulting voltage VABMAX produced on output terminal  15 A is at the same voltage as VA. Similarly, when supply voltage VB is larger than VA, output OUTP is at 0 volts and output OUTN is at the same level as supply voltage VB. Consequently, transistor MPD 2  is turned on and transistor MPD 1  is turned off and the voltage VABMAX produced on output terminal  15 A is at the same potential as VB. The voltage VABMAX therefore follows the higher of the two power supply voltages VA and VB. FIG. 10 illustrates the operation of voltage monitor circuit  15 - 1 , by showing waveforms for the output signals OUTP and OUTN and VABMAX for two hypothetical input waveforms for the input signals INP and INN.  
         [0056]    [0056]FIG. 8 shows the output voltage VABMAX of power supply monitor circuit  15 - 1  of FIG. 7 connected to I/O cell  10 B of FIGS. 1E and 1F, with the analog power supply voltage AVDD and the digital power supply voltage DVDD being connected to the VA input and the VB input, respectively, of power supply monitor circuit  15 - 1 . The output voltage VABMAX is connected by conductor  15 A and heavily doped N-type contact region  11 A to bias N-type well region  11  at VABMAX volts in order to prevent either of parasitic PN junction diodes D 1  or D 2  from becoming forward biased during transitions of the power supply voltages AVDD and DVDD. The N-type well region (not shown) in which P-channel driver transistors MPD 1  and MPD 2  are formed (i.e., the bulk electrodes of transistors MPD 1  and MPD 2 ) are connected the output terminal VABMAX to keep the that N-type well region at the higher of the AVDD and DVDD power supply voltages and thus prevent forward biasing of the parasitic PN junction diodes associated with transistors MPD 1  and MPD 2 .  
         [0057]    The functionality of the circuit of FIG. 7 for selecting the higher of two inputs can be expanded, within practical limits, to an arbitrary number of power supply voltage inputs. For example, by using three comparators  20 - 1 ,  20 - 2  and  20 - 3 , the circuit of FIG. 8 compares four power supply input voltages VA, VB, VC, and VD and outputs the highest one as the voltage VABCDMAX on the output terminal  15 A.  
         [0058]    If a semiconductor manufacturing process is utilized that provides P-well regions, the substrate needs to be electrically coupled to the highest power supply voltage provided to the chip. The above described monitor circuit can also be utilized to operatively connect the N-type substrate used in such a manufacturing process to the highest power supply voltage.  
         [0059]    Transistors MN 3  and MN 4  in the comparators described above perform the function of providing bias currents to transistors MP 3  and MP 4 , respectively, and therefore could be replaced by suitable current sources or resistors. However, the hysteresis of the described comparators could not be as easily established by simply selecting the values of M and N as described above.  
         [0060]    While the invention has been described with reference to several particular embodiments thereof, those skilled in the art will be able to make various modifications to the described embodiments of the invention without departing from its true spirit and scope. It is intended that all elements or steps which are insubstantially different from those recited in the claims but perform substantially the same functions, respectively, in substantially the same way to achieve the same result as what is claimed are within the scope of the invention. For example, diode-connected transistors MP 3  and MP 4  in FIGS. 4-6 function as level shifters, and the level shifting function can be performed by other level shifting devices or circuits, such as PN junction diodes or diode-connected N-channel transistors.