j'ai une question concernant la configuration d'un timer sur un PIC24F.
(ww1.microchip.com/downloads/en/DeviceDoc/39704a.pdf#9):
/* The following code example will enable Timer1 interrupts, load the Timer1 Period register and start Timer1. When a Timer1 period match interrupt occurs, the interrupt service routine must clear the Timer1 interrupt status flag in software.
*/ T1CON = 0x00; //Stops the Timer1 and reset control reg. TMR1 = 0x00; //Clear contents of the timer register PR1 = 0xFFFF; //Load the Period register with the value 0xFFFF IPC0bits.T1IP = 0x01; //Setup Timer1 interrupt for desired priority level // (This example assigns level 1 priority) IFS0bits.T1IF = 0; //Clear the Timer1 interrupt status flag IEC0bits.T1IE = 1; //Enable Timer1 interrupts T1CONbits.TON = 1; //Start Timer1 with prescaler settings at 1:1 and //clock source set to the internal instruction cycleJe vous remercie par avance !