Is there an auto-reload command for timer 1 in interrupt mode? here is my timer function:
void timer_init() { TIMSK |= (1 << OCIE1A); //enable channel 1A interrupt sei(); //enable global interrupts TCCR1B |= (1 << CS10) | ( 1 << CS11); //start timer at Fcpu/64 TCCR1B |= (1 << WGM12);//set up for CTC mode OCR1A = 65000; //Value that the micro will compare with current count } ISR(TIMER1_COMPA_vect) { // would like to autoreload OCR1A with 65000 here }
Any help appreciated.