V G wrote: > What happens when both inputs of an analog voltage comparator are > equal in voltage? What will the output be? Wikipedia says: > > - > + : output is negative > + > - : output is floating This is misleading since it assumes a open collector output. Many comparators do have open collector outputs, but that is a implementation detail not inherent to being a comparator. > But it doesn't say what happens when the inputs are equal. There is no such thing as two equal voltages. The comparator output will b= e high when + > -, and low when - > +. For a ideal comparator, there is no equals case to consider. Every voltage has some inherent noise, even if it's just the noise inside the chip that is measuring it. A perfect comparator with the inputs tied together will therefore produce a random sequence of high and low outputs as the two signals after the noise is adde= d flip between the +>- and ->+ cases. However, real comparators have a characteristic known as the input offset voltage. That is the error band within which the output value is not guaranteed. For example, if a comparator has a 2mV input offset voltage, then there is no guarantee what the output will do when one input is at 1.000V and the other at 1.001V since they are within the 2mV limit of each other. The comparator still has a threshold somewhere, but you don't know where it is this minute at this power voltage at this common mode voltage and this temperature within the input offset voltage band specified in the datasheet. Real comparators also have finite gain, unlike a ideal comparator, which ha= s infinite gain. If you managed to hold the two inputs of a real comparator just at the threshold, then you will see the inherent noise amplified on th= e output. It could also oscillate, since some portion of the noise comes fro= m coupling from the output. In short, you don't know what will happen within the input offset voltage band, and need to design your circuit accordingly. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .