I'm controlling a BLDC motor with an inverter/driver IC doing the switching work. I need to provide 6 PWM signals for the driver all at the same frequency. The exact frequency doesn't really matter, as long as its between 5kHz to 10kHz and all the PWM pins are the same.
I'm currently using an Arduino Uno, I'm not sure how to program each PWM pin (3, 5, 6, 9, 10, 11) for all the same frequency as the timers(0, 1 and 2) for particular pins have different clock speeds.
- Pins 5 and 6: controlled by timer0, base frequency 62500Hz
- Pins 9 and 10: controlled by timer1, base frequency 31250Hz
- Pins 11 and 3: controlled by timer2, base frequency 31250Hz
timer1 and timer2 will be okay and can be scaled down by the prescaler value 8 (7812.5Hz). Not sure how to get timer0 to the same frequency?
http://playground.arduino.cc/Main/TimerPWMCheatsheet
I'm sure a work around is relatively simple. Is it possible to divide the frequency for timer0 by a number which is not a prescaler value, say 40?
Thanks in advance.
Pat.