void init() { AD1PCFG = 0xFFFF; // Initialise les broches en numérique ou digital TRISB = 0; // Initialise le PORTB en sortie LATB = 0; // Initialise toutes les sorties du PORTB à l’état logique BAS PORTB =0; // On fixes les sorties à l’état zéro EnableInterrupts(); // Activations des interruptions IVT ON__T1CON_bit =1; // On active le du TIMER1 TCKPS0_bit =1; // | TCKPS1_bit =1; // | prescaler sur 256 T1IP0_bit =1; // | T1IP1_bit =1; // | Réglage du TIMER1 en priorité 7 T1IP2_bit =1; // | T1IE_bit =1; // On active le TIMER1 en mode interrutpion sur débordement TMR1 = 0; // On met à zéro le TIMER1 pour commencer à compter… } void Timer1_Interruption() // Nom du programme de l’interruption iv IVT_TIMER_1 // Appel de l’interrutpion du TIMER1 ilevel 7 // Propriété niveau 7 { LATB.RB1 = ~ LATB.RB1; LATB.RB4 = ~ LATB.RB4; LATB.RB5 = ~ LATB.RB5; IFS0.T1IF = 0; // On sort de l’interruption et on recommence à compter } void main() { init(); // Initialisation du Mini-32 while (1) { // On ne fait rien dans la boucle... } }