A more complete understanding of exemplary embodiments and advantages thereof may be acquired by referring to the following description taken in conjunction with the accompanying drawings, in which like reference numbers indicate like features, and wherein:
a illustrates sample waveforms for the input voltage and output voltage versus time for the ideal voltage comparator depicted in
b illustrates sample waveforms for the input voltage and output voltage versus time for the hysteresis comparator circuit depicted in
Preferred embodiments and their advantages are best understood by reference to
For the purposes or this disclosure, comparators (or “voltage comparators”) may include any circuit component or device capable of comparing at least one signal or value received at an input, such as a voltage, against one or more other signal or value received at one or more other inputs, such as a voltage, and output one or more discrete signals or values, such as a voltage, based on the relative strengths, intensities, amplitudes or values of the input signals. Comparators may be used in various phases of signal generation and transmission, as well as in automatic control and measurement to implement any number of applications within microprocessors, microcontrollers, integrated circuits and other electronic components and circuits. Comparators are used alone or as part of larger systems, such as analog-to-digital converters, switching regulators, function generators, voltage-to-frequency converters, power-supply supervisors, level detectors, window detectors, pulse-width modulators, Schmitt triggers, and a variety of others.
Comparator circuit 22 may also include one or more biasing elements used to establish the hysteresis width of comparator circuit 22, such as resistor 18 with fixed resistance RB and digitally programmable variable resistor 30 with variable resistance RVAR. Although
In the depicted embodiment, the hysteresis width of comparator circuit 22 may be expressed as:
where ΔVT represents the hysteresis width, VOH represents the maximum output voltage of comparator circuit 22 and VOL represents the minimum output voltage of comparator circuit 22. Hence, in the depicted embodiment, one may vary the hysteresis width of comparator circuit 22 by varying the resistance RVAR of digitally programmable variable resistor 30.
In the illustrated embodiment, variable resistor includes terminals 31 and 32. Variable resistor 30 as depicted also includes an enable bit 33, allowing the user to selectively enable variable resistor 30. Variable resistor 30 as shown further includes one or more control bits, such as control bits 34, 35, and 36 representing BIT0, BIT1 and BIT2 of a digital control signal 37, respectively, as shown in the depicted embodiment.
Variable resistor 30 also includes one or more resistors 51-58 with resistance values of R1, R2, R3, R4, R5, R6, R7 and R8, respectively, and switches 40-48 operable to enable or disable variable resistor 30 or to enable or disable individual resistors 51-58. Switches 40-48 may be any circuit component capable of making or breaking an electrical circuit, or for selecting between multiple circuits. As depicted in
The operation of digitally programmable variable resistor 30 may be described with reference to truth table 80 depicted in
In many applications, it may be desirable for a use to disable hysteresis in comparator circuit 22. Referring again to the equation for determining hysteresis width in comparator circuit 22:
From the equation, it is evident that for RVAR=0, ΔVT=0, and no hysteresis is present in comparator circuit 22. In the depicted embodiment, this can be accomplished by appropriately setting the enable signal on input 33. Referring to the first row of truth table 80, when the enable signal on input 33 is set to 0, switch 40 is closed creating a conductive path between terminals 31 and 32, and the resistance RVAR is equal to zero, meaning ΔVT=0.
However, where it is desirable to include hysteresis in comparator circuit 22, the user may set the enable signal to the appropriate value (e.g., logic 1 in the depicted embodiment). When variable resistor 30 is enabled, control signals such as control signals BIT0, BIT1, and BIT2 may be used to control the resistance RVAR, thus allowing the user to control hysteresis width. In the depicted embodiment, the user may selectively manipulate BIT0, BIT1, and BIT2 to set the resistance RVAR to a desired value. For example, referring to the fourth row of values in truth table 80, enable bit 33 may be set to logic 1, BIT0 (control bit 34) to logic 0, BIT1 (control bit 35) to logic 1, and BIT2 (control bit 36) to logic 0. In such as case, switches 40, 42, 43 and 45 are open, switches 41 and 44 are closed, and a circuit path is completed between terminals 31 and 32 with a resistance RVAR=R1+R2+R3. It is evident from
Although variable resistor 30 is depicted as utilizing three control bits operable to select among eight values for resistance RVAR when enabled, it is understood that variable resistor may comprise any number N of control bits used to select any number 2N of values for resistance RVAR. Accordingly, although variable resistor 30 is depicted as utilizing nine switches and eight resistors, it is understood that variable resistor 30 may comprise an appropriate number of switches and resistors suitable to implement variable resistor 30 with N control bits and 2N possible values of resistance.
Utilizing the methods and systems set forth in this disclosure, one may digitally program a hysteresis comparator to configure a desired hysteresis width. A comparator with digitally programmable hysteresis may be useful for many purposes. For example, digitally programmable hysteresis comparator may be useful to allow a user to fine tune hysteresis width appropriately to the particular application for which the comparator is used. In addition, a user may fine tune hysteresis width to an appropriate level based on the electrical noise present in a circuit.
Although the present disclosure as illustrated by the above embodiments has been described in detail, numerous variations will be apparent to one skilled in the art. It is understood that various changes, substitutions and alternations can be made herein without departing from the spirit and scope of the disclosure as illustrated by the following claims.