Thabisa
Newbie level 3

I'm witting a feedback code for a boost converter, to ensure that the output voltage of the boost converter remains at a constant voltage of 48volts.The input voltage varies between 12-24 volt ,How would i write a Mikro C code to get the adc value for the voltage divider in the circuit and compare it to a set voltage eg 3volt ,if its not 3 volt the duty cycle will have to change until its 3 volts .?