changing PWM frequency

For better understanding Timers and their usage, I collected some knowledge and additional links (including georgew77 s link) in those two articles - hope it helps:
How to set prescalers, some background on bit-Math, how to control a strong motor:
http://www.embedded.arch.ethz.ch/Examples/TimerDcMotorBackground
Use a photointerrupter as external clock at T1 and count the slots passed:
http://www.embedded.arch.ethz.ch/Examples/Photointerrupter
please do NOT post comments / improvements here, feel free to email (contact in articles) thanks.