Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
projets:chimeres-orchestra:pwm-motor:pwm-mega:accueil [2015/02/12 19:14] resonance |
projets:chimeres-orchestra:pwm-motor:pwm-mega:accueil [2016/05/28 15:02] (Version actuelle) resonance |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Arduino MEGA / PWM Hz ====== | ====== Arduino MEGA / PWM Hz ====== | ||
- | + | <code cpp> | |
//Note: Divide the PWM frequency by 2 for an 8MHz clock, multiply by 1.25 for a 20MHz clock. | //Note: Divide the PWM frequency by 2 for an 8MHz clock, multiply by 1.25 for a 20MHz clock. | ||
//For Arduino Mega1280, Mega2560, MegaADK, Spider or any other board using ATmega1280 or ATmega2560 | //For Arduino Mega1280, Mega2560, MegaADK, Spider or any other board using ATmega1280 or ATmega2560 | ||
Ligne 56: | Ligne 56: | ||
//TCCR5B = TCCR5B & B11111000 | B00000100; | //TCCR5B = TCCR5B & B11111000 | B00000100; | ||
//TCCR5B = TCCR5B & B11111000 | B00000101; | //TCCR5B = TCCR5B & B11111000 | B00000101; | ||
+ | </ |