Hello everybody I am back on the calculation of SPWM sine table values and the values for
SET_FREQ and shift times.
I referred to Tahmdi blog but really I am not getting good signals for generating the inverter appropriate waveforms working at 50HZ and with a carrier of 12KHZ,I am using a quartz of 12MHZ,but my codes are not giving 50HZ nor 12KHZ as carrier
Instead of getting 50Hz I am getting 7.92Hz and 625.5Hz respectively.please referring to Tahmid calculations could any one help me to determine the good values for my two variables in order to generate 50HZ and 12KHZ?
By now with the following values see the snapshot of proteus simulation
SET_FREQ=533
TBL_POINTER_SHIFT = TBL_POINTER_NEW >>14
PR2=61 with prescaler of 4 at 12MHZ of quartz and wanted to generate 12KHZ
T2CON=0X05
Please help to adjust so that the carrier frequency comes to 12KHZ and the duty cycle as you see on the snapshot are not equal,could you please help??