Is there an easy way with a small parts count, something like one or two transistors and a very few resistors to make either a NOT gate or a buffer gate with a reasonably precise threshold at whatever voltage one desires? Hysteresis not required, but ok if it can be added with no increase in part count.
A typical logic gate IC will, depending on the logic family, have either a wide or narrow input range where the state changes, may or may not have hysteresis, and will always have this range where the change occurs centred either on a fixed voltage or a fixed proportion of Vcc. But if one wants to create pre-gate inputs to systems of standard logic gates, is there a way to do it?
Say you want a logical inverter which takes Vcc=5V, and then has it's output stay high (at 5V or close) while the input is under 4V (+/-0.3V, semi-precision as I said, doesn't need a perfect threshold +/-0.01V or anything like that), and the output go low (<0.5V, hopefully very near Gnd) when the input gets above this fairly high threshold. Or 4/5ths Vcc if this is a better way to think of it than 4V. Is there a circuit design which will behave like this for any given threshold you select, perhaps subject to the constraint that the threshold selected must be > Gnd+1*(diode or transistor drop) and < Vcc-1*(diode or transistor drop)?
I'm interested in ways to do this with generic parts, not special specific ICs designed as custom threshold logic inputs. Comparators don't seem so great an option either, as they don't seem to have standardised pin positions the way op amps often do (atleast for quad op amp packages).
Thanks