Also ich habe auch die io.h included, aber es bleibt der gleiche Fehler.
Die Standard Timer0 und Timer2 funktionieren ja auch, aber arum meiner nicht???
hier nochmal der minimal veränderte Code.
Bitte helft mir!!!Code:ISR (TIMER0_COMP_vect) { // Blocking delay (100µs): delay_timer++; // All 1ms based timing stuff if(ms_timer++ >= 10) { // 10 * 100µs = 1ms // 16bit Stopwatches: if(stopwatches.watches & STOPWATCH1) stopwatches.watch1++; if(stopwatches.watches & STOPWATCH2) stopwatches.watch2++; if(stopwatches.watches & STOPWATCH3) stopwatches.watch3++; if(stopwatches.watches & STOPWATCH4) stopwatches.watch4++; if(stopwatches.watches & STOPWATCH5) stopwatches.watch5++; if(stopwatches.watches & STOPWATCH6) stopwatches.watch6++; if(stopwatches.watches & STOPWATCH7) stopwatches.watch7++; if(stopwatches.watches & STOPWATCH8) stopwatches.watch8++; // Sound generation timing: if(controlStatus.beep) { if(sound_timer < 1) { // sound_timer * 1ms TCCR2 = 0; controlStatus.beep = false; } else sound_timer--; } ms_timer = 0; } } /*########################################################################################## OWN TIMER ADDITION ############################################################################################*/ volatile uint16_t fast_timer; ISR (TIMER1_COMP_vect) { fast_timer++; TCNT1 = 175; // Nachladen } void setFastTimer(uint16_t time) { fast_timer = time; } uint16_t getFastTimer(void) { return fast_timer; } //...weiter Unten in void initRP6Control(void) /*########################################################################################## OWN TIMER ADDITION ############################################################################################*/ volatile uint16_t fast_timer; ISR (TIMER1_COMP_vect) { fast_timer++; TCNT1 = 175; // Nachladen } void setFastTimer(uint16_t time) { fast_timer = time; } uint16_t getFastTimer(void) { return fast_timer; }
mfg WarChild
Lesezeichen