hey…am trying to vary the intensity/speed of a led/motor.. it seems i need to be using PWM..the only difference between an led and motor would be the use of a transistor.. how ever, can any one of you explain the basic logic of generating the PWM signal..to be precise, about the prescalar to be used as well as the output compare resgister..am using an atmega328.. Thank you
The datasheet should have equations relating the period, duty cycle and the prescalar to be used to get the required waveform. Kindly go through them in detail