YOu have done quite a bit of job.And how are you reading the adc i.e. the output feedback.
I mean what is the shape on pin4 /an2.Is it half recified sine?
Earlier there was a suggestion in the same forum to have anther array of error corrction and add a term to
CCPR1L = sine_wave[index];
like CCPR1L = sine_wave[index]+sinewave_corr[err];
with no load check at each oint what is the reading on adc and then with load check the same .the differen ce will give an idea of how to frame error array.
then keep updating the error array based on feedback.
also it is not clear what is the update time(timer0 interrupt).
may be you can contact me at [email protected],since i happen to check forum rarely.
Bookmarks