yokel
Junior Member level 3
Hi,
I am using dsPIC33J256GP710 for PWM generation. As this device doesn't support any built-in PWM functionality, I am using the output compare PWM mode in this regard.
I am operating the mcu at it's highest speed which is 40MHz. Now I need to generate PWM with variable frequency from 600KHz to 700KHz. But the problem is with the equation PWM Period=(PRy+1)*Fcy I can't get all the frequencies in this range, eg. I can't generate exactly 620KHz if I want. With each increament in PRy value (timer period) the frequency changes by 15-8 KHz.
Please tell me how can I generate any frequency within this range with this speed.
thanks a lot in advance
I am using dsPIC33J256GP710 for PWM generation. As this device doesn't support any built-in PWM functionality, I am using the output compare PWM mode in this regard.
I am operating the mcu at it's highest speed which is 40MHz. Now I need to generate PWM with variable frequency from 600KHz to 700KHz. But the problem is with the equation PWM Period=(PRy+1)*Fcy I can't get all the frequencies in this range, eg. I can't generate exactly 620KHz if I want. With each increament in PRy value (timer period) the frequency changes by 15-8 KHz.
Please tell me how can I generate any frequency within this range with this speed.
thanks a lot in advance