I have been reading many tutorials and posts on timers , but am still a little confused.
I want to produce a square wave where I have control of both frequency and duty cycle of a square wave.
I understand the prescaler etc. but the OCR1A etc. seems to be used for duty cycle and for adjusting to the exact frequency from the prescaler values.
Could someone explain how this is done. I would appreciate a snippet of code if possible.
Thanks