For my solar charge controller i want to generate a 20khz square wave signal and i need to vary the ON/OFF timing of that signal. As i searched some people said to use timer . I want to know how to use the timer to generate the 20khz signal and vary the duty cycle . if u have any sketch or useful link about my issue please reply.
Thanks in advance