First page Back Continue Last page Overview Text
Let's look at the timer registers by first asking ourselves what control flags we will need in order to use the counter.
First, we need the counter itself. Since it is 16 bits wide, we need two registers to hold its value. They are TCNTH located at 0x0084 and TCNTL at 0x0085. These registers together are comprise the two-byte counter register TCNT. Note that the higher byte of the counter register has the lower address.
Like the maskable interrupts, the timer can be enabled or disabled. We would disable the timer for a different reason however. Disabling the timer reduces power consumption. The timer is enabled or disabled using the Timer Enable Bit (TEN) of the Timer System Control Register (TSCR) which is located at 0x0086. It can be read or written at any time.