I have a device which puts out three different voltage-levels on its GPIO pin: Its voltage is either 0v, 0.8v or 3v.
What I need is a clear digital logic high or low, but I need 0.8V to be treated like a logical low. Additionally I would like the result to be inverted. In other words, 0v and 0.8v becomes a logical high at the output and 3v on the input becomes a logical low.
I was thinking of using an inverted buffer, schmitt-trigger and my latest idea was using a LM393 comparator. I'm comparing the voltage from the GPIO with simply 1v (created from a voltage div.). The output should already be inverted, if I feed the 1v into the + Input of the comparator and the GPIO into the - Input.
I just would like to hear some feedback, if the comparator is the best way to implement my needed behavior or is there a more simple/discrete way to do this?
Thank you!