Clamp Comparator Output for Analog/Digital Input Pin

I have an opamp as a comparator whose output I want to read with a digital or analog input pin and trigger an action when the comparator output goes high and a different action when low. Currently using +9v/-9v supplies for the opamp and want the comparator output to be compatible with the analog/digital pin (0 - 5v). A 5.1v zener from the comparator output to Gnd clamps the high output to around 5.1v but the low level is -0.7v. Is this -0.7v bad for an analog/digital input and how could I better the circuit to more accurately yield 0-5v comparator output for the analog/digital input?

Use a diode to only allow a + voltage through (via the anode)

you should read 0v out then.

.7 volts negative isn't enough to worry about but If you are really concerned use a 1K series resistor as a current limiter.

Doc

By "in series" I assume you mean with the comparator output into the digital input.

I found (and have a few) comparators with TTL outputs which should work.

And why would a Diode not do the job?

Where does the diode go?

"but the low level is -0.7v. Is this -0.7v bad for an analog/digital input and how could I better the circuit to more accurately yield 0-5v comparator output for the analog/digital input?"

How did you get a -0.7v reading? Where?... well, the same place you take a reading, place a Diode in series there, you should now have a 0v reading there.... is there a circuit here?