Hi all guys,
I need to speed up the PWM frequency on two PWM pins, to drive a pair of DC-motor.
I'm not able to find infos about the Yun internal timers configuration.
I found the definition of the timers for the Leonardo board, which are:
TIMER0B, /* 3 */
TIMER3A, /* 5 */
TIMER4D, /* 6 */
TIMER1A, /* 9 */
TIMER1B, /* 10 */
TIMER0A, /* 11 */
TIMER4A, /* 13 */
I guess them are the same on the yun considering that the two board are based on the same AtMega.
I'm concerned about not change the prescaler of the timer on which the functions millis() and micros() are based!
Can you guys please advice me two pwm pins based on timers different form the ones used by micors() function?
Secondly, are this two line of code ok for setting the pwm frequency on the yun as well (changing the TCCRxx and CSxx)?
// timer 1B: pin 9 & 10
TCCR1B = _BV(CS00); // change the PWM frequencey to 31.25kHz - pins 9 & 10
// timer 0B : pin 3 & 11
TCCR0B = _BV(CS00); // change the PWM frequencey to 31.25 kHz - pin 3 & 11
Thank you so much!