[Notice]Excuse me in advance if i'm out of topic, i started Electronics a week ago, and just received my Arduino 2 days ago[/Notice]
As far as i understand your question, you want to change the frequency from the actual vanilla arduino PWM frequency to a custom one? There would be two distinct solutions, which of course involves that you first look for the actual PWM frequency of an un-hacked arduino. Once you know that, here would be the two solutions which popped into my mind:
- Software hack: a fast search gave me this link: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1152547089
It apparently involves hacking a little bit of the wiring software source code and re-compiling it for your purpose.
- Hardware extension: Here, two different solutions. Lets's say the Arduino PWM native frequency is lower than the one you're trying to get, you'll need a Frequency Multiplier. If the opposite case (Which i think would be correct), you'll need a Frequency Divider. i have found one which divides by two and preserves duty cycle here: http://analog-innovations.com/SED/Div2PercentSame.pdf
. You might be lucky if the native Arduino PWM frequency is a multiple of two of the one you're aiming (Eg. 8 or 16 are both luck), because then you would have to modify those schematics or chain them together.
About this matter, i don't really know where to start, but i found plenty of answers on google.
Again: Please someone not novice confirms or informs my thoughts, i never tried any of that myself.