TCCR0 – Timer/Counter Control Register
When using the I/O specific commands IN and OUT, the I/O addresses 0x00 - 0x3F must be used. When addressing I/O Registers as data space using LD and ST instructions, 0x20 must be added to these offset addresses.
Bit7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
CS0n[2:0] | |||||||
Access | R/W | R/W | R/W | ||||
Reset | 0 | 0 | 0 |
Clock Select [n = 2:0]
The three clock select bits select the clock source to be used by the Timer/Counter.
CS02 | CS01 | CS00 | Description |
---|---|---|---|
0 | 0 | 0 | No clock source (Timer/Counter stopped). |
0 | 0 | 1 | clkI/O/(No prescaling) |
0 | 1 | 0 | clkI/O/8 (From prescaler) |
0 | 1 | 1 | clkI/O/64 (From prescaler) |
1 | 0 | 0 | clkI/O/256 (From prescaler) |
1 | 0 | 1 | clkI/O/1024 (From prescaler) |
1 | 1 | 0 | External clock source on T0 pin. Clock on falling edge. |
1 | 1 | 1 | External clock source on T0 pin. Clock on rising edge. |
If external pin modes are used for the Timer/Counter0, transitions on the T0 pin will clock the counter even if the pin is configured as an output. This feature allows software control of the counting.