attiny167-esxz ATMEL Corporation, attiny167-esxz Datasheet - Page 96

no-image

attiny167-esxz

Manufacturer Part Number
attiny167-esxz
Description
8-bit Avr 8-bit Microcontroller Microcontroller With 16k Bytes In-system Programmable Flash And Lin Controller
Manufacturer
ATMEL Corporation
Datasheet
10.10 Timer/Counter0 Prescaler
10.11 8-bit Timer/Counter Register Description
10.11.1
96
ATtiny167
Timer/Counter0 Control Register A – TCCR0A
Figure 10-12. Prescaler for Timer/Counter0
The clock source for Timer/Counter0 is named clk
system I/O clock clk
clocked from the XTAL oscillator or XTAL1 pin. This enables use of Timer/Counter0 as a Real
Time Counter (RTC).
A crystal can then be connected between the XTAL1 and XTAL2 pins to serve as an indepen-
dent clock source for Timer/Counter0.
A external clock can also be used using XTAL1 as input. Setting AS0 and EXCLK enables this
configuration.
For Timer/Counter0, the possible prescaled selections are: clk
clk
Setting the PSR0 bit in GTCCR resets the prescaler. This allows the user to operate with a pre-
dictable prescaler.
• Bit 7:6 – COM0A1:0: Compare Match Output Mode A
These bits control the Output Compare pin (OC0A) behavior. If one or both of the COM0A1:0
bits are set, the OC0A output overrides the normal port functionality of the I/O pin it is connected
to. However, note that the Data Direction Register (DDR) bit corresponding to OC0A pin must be
set in order to enable the output driver.
Bit
Read/Write
Initial Value
T0S
/128, clk
XTAL2
XTAL1
T0S
COM0A1
R/W
/256, and clk
7
0
Oscillator
IO
EXCLK
. By setting the AS0 bit in ASSR, Timer/Counter0 is asynchronously
COM0A0
PSRn
CSn0
CSn1
CSn2
R/W
6
0
clk
0
1
T0S
I/O
/1024. Additionally, clk
ASn
R
5
0
0
1
clk
TnS
R
4
0
Clear
T0S
. clk
3
R
0
TIMER/COUNTERn CLOCK SOURCE
T0S
T0S
as well as 0 (stop) may be selected.
0
is by default connected to the main
10-BIT T/C PRESCALER
R
2
0
clk
T0S
Tn
WGM01
/8, clk
R/W
1
0
T0S
WGM00
/32, clk
R/W
7728A–AUTO–07/08
0
0
TCCR0A
T0S
/64,

Related parts for attiny167-esxz