pwm_au_choix
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
pwm_au_choix [2022/07/27 23:39] – Tag0 Added: arduino,sylvain Mushussu | pwm_au_choix [2022/07/28 05:38] (Version actuelle) – Mushussu | ||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
<code C++> | <code C++> | ||
- | ISR(TIMER2_OVF_vect) { | + | ISR(TIMER2_OVF_vect) { // Routine d' |
PORTB |= (1 << PB5); | PORTB |= (1 << PB5); | ||
} | } | ||
- | ISR(TIMER2_COMPA_vect) { | + | ISR(TIMER2_COMPA_vect) { // Routine d' |
PORTB &= ~(1 << PB5); | PORTB &= ~(1 << PB5); | ||
} | } | ||
Ligne 18: | Ligne 18: | ||
TCCR2B |= (1 << CS21) | (1 << CS20); // Prescaler /32 | TCCR2B |= (1 << CS21) | (1 << CS20); // Prescaler /32 | ||
TIMSK2 |= (1 << OCIE2A); // Activation de l' | TIMSK2 |= (1 << OCIE2A); // Activation de l' | ||
- | TIMSK2 |= (1 << TOIE2); // Activation de l' | + | TIMSK2 |= (1 << TOIE2); // Activation de l' |
sei(); | sei(); | ||
} | } | ||
Ligne 34: | Ligne 34: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | [[https:// | ||
{{tag> | {{tag> |
pwm_au_choix.1658965179.txt.gz · Dernière modification : 2022/07/27 23:39 de Mushussu