What you have to remember that only at specific frequencies can you get the full range of duty cycles from the PWM. So while you can set the frequency to what you like the range of duty cycle control is limited.
it part of my school project so, i really dont have a choice.
So they are setting school projects on impossible things now. What school is it Hogwarts?