Question:

What *voltage range* do you want it to work over?

Because it's intrinsically impossible to state that a voltage is *exactly* 2.3000... V, which your reference certainly isn't to begin with! It's reality's version of:

`double num = 15.0d;`

if (num == 3.0d * 5.0d) {

printf("equal");

}

Which might never execute, because in general, floating point operations are not self-consistent on the bit level (which the equality test demands), even if printing the numbers shows them to be equal (i.e., "15.000000000000000", usually rounded to just "15").

In reality, there is noise when you try to zoom in very very far, normally in the microvolt to nanovolt range if you have very good devices in an electrically clean environment. A signal might be "equal", but only momentarily, and randomly.

In pure mathematics, there is *absolutely no notion of equality among real numbers*, unless the two numbers have been constructed in an exactly equivalent way. Using rationals (i.e., anything that can be expressed as a decimal or fraction), as the above example does, is one such example. Another is equating the infinite series for pi with the ratio of a circle's circumference to diameter: it's an equivalent definition (although why that should be equivalent is a very interesting but unrelated question).

So in short, be very, very careful when you talk about equality or inequality of real numbers: this is, at its heart, a deep mathematical subject, worthy of some discussion!

On a much more practical note, you should want a range anyway, because inevitably there will be voltage loss along the wires, and errors in source, path and measurement. So you definitely need a window comparator (from practical as well as theoretical grounds). If you're okay with splitting it down the middle, between the Vrefs, then technically you only need three comparators, but you need logic to resolve the two LEDs from that, so you might as well build two separate window comparators, which is handy enough anyway, because four is a standard package size (as mentioned -- a single LM339 or etc.).

ADCs and bargraph displays are equivalent: these convert real numbers to integers, in effect. Necessarily, each step is a range, not an ideal voltage level. The steps are obviously wider in a 10-bar bargraph display than a 10+ bit ADC, but they still act the same -- indeed, you could call the window comparator idea a two-bit ADC. The ADC has enough steps that you'd probably have to resolve a range of them (using inequalities in the software) for practical use, and might have to combine a few states to use the bargraph route as well.

The LM3914 being an ADC is interesting, as it's a unary converter: when configured for bar (versus "dot") mode, the number of active outputs corresponds to the numerical count (unary counts 1, 11, 111, ..., while binary counts 0, 1, 10, 11, ...). Which can be very useful for certain applications, if you think about it.

Tim