PWM Code to for mosfet gate

Post your code that give you 1kHz