So, if I understand it correctly, it should look like this?
I am still concerned about sinking the current to the negative supply. As I said, I want to use a PWM voltage inverter, which is a very weak supply and can generate only couple of mA. If I sink the 12.5 mA to this supply, isn't it basicaly the same process as if the supply itself sourced equivalent opposite current? I fear, that by sinking too much current into this supply, the negative voltage will drop and the supply will no longer be able to go close to 0V at the output. Is this a valid concern?
Another thing, more for the sake of curiosity, about the full digital control of the constant current, as Kleinstein wrote:
Software control is not a good idea - it is slow and resolution is limited. For a lab supply one would want something like a 100 kHz control loop bandwidth and maybe 16-24 Bit of amplitude resolution. SO nothing easy to do in software.
I was thinking about this. I plan to use an ATXMEGA mcu running at 32 MHz. It has 12 bit DAC capable of 1 Msps and a 12 bit ADC capable of 2 Msps. I do not need more than 12 bits of precision. What if I dedicated this mcu to just running the control loop and nothing else, and handled the rest like reading rotary encoders and writing to an LCD somewhere else? I know this is probably a bad idea, but I am just curious.