Implemented PWM using Timer callback.