I'm making a ramp ADC: the comparator should compare the input voltage with a ramp. The output of the comparator is used as memory_enable signal to store the ramp-value in a memory.
For now, I'm just using an open-loop amplifier as a comparator. If the voltage-difference is to small, the output of the comparator will be Vdd/2+small signal, and will do something weird to the memory?! I want the comparator to output a 0 or a 1 if the voltage difference is to small ( 0 or 1 does not matter, since the quantization error will only be ±Vlsb/2).
What circuit can realize this need?