#define T1 15 #define T2 15 #define T3 28 uint16_t TV = 10; int main() { Setup(); // horloge volontairement à 25 MHz : ... // Initialisation du Timer : // choix de l'horloge, mode continu TACTL = TASSEL_2 + ID_1 + MC_2; // clock à 25 MHz = 0.04 uS TACCR0 = 25000; // 25'000 * 0.04 us = 1 ms TACCTL0 = CCIE; // interruption de comparaison CCR0 __enable_interrupt(); // Active l'ensemble des interruption while (1) { // boucle infinie } } // Timer A0 interrupt service routine (CCR0) #pragma vector=TIMER0_A0_VECTOR __interrupt void Timer_A0 (void) { CCR0 += 25000; // prochaine interruption dans 1 ms cptMs ++; // compte les ms if (cptMs