Thanx alot HankMSpank and arrati, i did what you said and my problems have been solved.
I want to add something in this code, i want after the duty cycle being constant to giveout this duty cycle for 3ms and then to put off duty cycle for 1.5ms
Please do me a favour for this too