Had an idea yesterday to drive coil like inductor in dc-dc converters or voltage choppers. Comparators would turn upper stage mosfets on and off to maintain desired voltage which could be set from MCU with pwm and lowpass filter. Inductance would be sensed by measuring switching frequency. This frequency would be about 10-100kHz. It's far less demanding on code and inputs. Even 8bit timers can drive it but it requires one timer/counter with external inputs (or external counter).