2 Calculation

Given the frequency of the watch crystal, the user can determine the time for each Timer/Counter tick, by selecting the desired pre-scaling factor. As shown in the following table, CS02, CS01, and CS00 in the TCCR0 (Timer/Counter0 Control Register) define the Timer/Counter prescaler source. In the table, clkT0S denotes the frequency of the Timer/Counter0 clock source. For example, if clkT0S equals 32.768kHz, as in our case, the Timer/Counter will tick at a frequency of 256Hz with a prescaler of 128.

Table 2-1. Timer/Counter0 Prescaler Select
CS02CS01CS00Description (1)Overflow period
000Timer/Counter0 is stopped
001clkT0S1/128s
010clkT0S/81/16s
011clkT0S/321/4s
100clkT0S/641/2s
101clkT0S/1281s
110clkT0S/2562s
111clkT0S/10248s
Note:
  1. clkTOS = 32.768kHz.