diff --git a/code/main.c b/code/main.c index fefc515..9ab4702 100644 --- a/code/main.c +++ b/code/main.c @@ -148,7 +148,7 @@ uint8_t extract_digit(uint32_t value, uint8_t digit_num); ISR(TIMER1_OVF_vect) { cli(); - ++ms; + ms += 8; sei(); } @@ -477,8 +477,8 @@ void simple_init() PORTB = (1 << 1) | (1 << 3) | (1 << 4); #endif - // Prescaler 4 (1 MHz / 256 / 4 ~ 1000) - TCCR1 = (1 << CS11) | (1 << CS10); + // Prescaler 32 (1MHz / 32 / 256 = 8,192 ms) + TCCR1 = (1 << CS12) | (1 << CS11); // Enable Interrupt on overflow TIMSK = (1 << TOIE1);