thannara123
Advanced Member level 5
I am confusing the following code which working in feedback control of an inverter
see more about the code
The above code is updating the ADC values repeatedly in a while loop and change the dutycyle with the "adder" b
My doubt is that the adder value is varying from 0 to 384 .
Then how achive the voltage stabilization ?
can anybody clear my doubt ?
C:
FBV = ADC_Get_Sample(FBCh);
if (FBV < 512){
FB_Step++;
if (FB_Step > 12) FB_Step = 12;
}
else{
if (FB_Step > 0){
FB_Step--;
}
}
adder = FB_Step << 5;
TMR1L = 0;
TMR1H = 0;
T1IF_bit = 0;
see more about the code
The above code is updating the ADC values repeatedly in a while loop and change the dutycyle with the "adder" b
My doubt is that the adder value is varying from 0 to 384 .
Then how achive the voltage stabilization ?
can anybody clear my doubt ?