The input voltages must be between 0V and 4.5V if the chip is powered with 6V. The input range goes fromthe negative supply rail to 1.5V less than the positive supply rail.It is not a rail-to-rail device.
I believe because your LEDs are in sinking mode,they need to be sourced from the comparator to work that way
This is the circuit, i am using 48V on the input but then using voltage divider too,ignore the other blank resistors as i have to make 2 other circuits to compare too, but as you can see comparator is not showing anything
They make sure the output of the divider is at least 1.5V below the LM339 supply voltage at all times.You have forgotten the pull-up resistor to 5V on the output.
a pull-up is a must for every output ?
what do you mean by the output of the divider is below 1.5v?
If you use that output as an input for another device, yes. Not for your LEDs.
does that mean that it can essentially only output ground? and if you want it to provide HIGH voltage 5v etc then you always have to provide it with pull up resistor?
Ten seconds reviewing the LM339 datasheet very clearly shows this fundamental information about the part.
Here's an example of how to use a comparator to drive a led: