TCCR1A =0; TCCR1B =0;
TIMSK1=TIMSK1 & ~_BV(TOIE1); // Interrupt disabilitato (usare attachInterrupt_ovf)
TCCR1A =TCCR1A | bit(COM1A0);
TCCR1A =TCCR1A & ~bit(WGM10); // Set mode 14: pwm fast
TCCR1A =TCCR1A | bit(WGM11);
TCCR1B =bit(WGM12) | bit(WGM13);
Questo e' il codice di inizializzazione che mi sembra corretto per il mode 14.
Non ho l'interrupt di ovf.
Col medesimo codice ma impostando il mode 8:
TCCR1A = 0;
TCCR1B = _BV(WGM13); // mode 8
ho l'interrupt di ovf
Eppure il rimanente codice e' il medesimo.
Mi chiedo qualcuno e' riuscito ad usarlo in mode 14?
Giorgio Padoan