Hi
Inspired by Vellemans K8071 led driver, I tried something similar.
As of now, I turned it upside down, as n-channel fets are cheaper and easier to control. This means, that I have a resistor on top, so my measurement for the current is set as VCC -0.3V. My reference is similar, slightly below VCC.
Now, say power is 12V so my Vref is 11.75, but here is the question:
How well do opamps and comparators work with that high input? I tried TL082 and LM2903 (same as LM393 used in K8071) and the LM2903 will never change its output. TL082 seems to work somehow....
WBR Sonnich