I've read about comparators and from my understanding, you've got 2 voltage inputs: reference voltage usually connected at the inverting input and Vin i.e. voltage you want measured usually connected at the non-inverting input. The output voltage will depend on your V+ and V- values and whether it's Vin>Vref (V+ is the output) or Vin<Vref (V- is the output).
My goal was to use a comparator (LM393A) that will output either a HIGH (5V) or LOW (0V) signal depending on the value of the Vin I've used as the input for the non-inverting input, but here is what happened instead:
I was expecting the output to be at 5v once V7 has surpassed V6 (V7 > 3.7V) but instead, Vout looks like this (graph fitted for your convenience):
Is there something I did wrong?