# comparator isn't behaving as it should

simulate this circuit – Schematic created using CircuitLab

The output is always outputting 5V, and I have no idea why. I have checked the inputs to the comp, I even switch them around its never hits 0 volts. Yes I am double checking that input from the OPA350 is greater than the Vrf.

• is the ground pin connected? – Jasen Oct 24 '18 at 5:08
• Yeah, weirdest thing, Pin 4 grounded VSS – Pllsz Oct 24 '18 at 5:11
• What did you do with the CSn pin of the MCP6548? – The Photon Oct 24 '18 at 5:21
• Needing to know details like this is why you should post a complete schematic of your circuit, not just the parts you think might be important. – The Photon Oct 24 '18 at 5:28
• Oh, sorry I didnt know that was important I left it floating (Unconnected) – Pllsz Oct 24 '18 at 5:29

It seems most likely that you have either tied the $$\\rm\overline{CS}\$$ input high, or you left it unconnected and it randomly drifted high due to static charge or capacitive coupling to nearby objects.
With $$\\rm\overline{CS}\$$ high, the output goes into a high-impedance state as described on p. 16 of the datasheet, which allows R3 to pull the output high.