setting frequency to 5KHz