English
Language : 

MEGA128CAN Datasheet, PDF (158/413 Pages) ATMEL Corporation – Microcontroller WITH 128K BYTES OF ISP FLASH AND CAN CONTROLLER
Timer/Counter2
Prescaler
Figure 73. Prescaler for Timer/Counter2
AS2
EXCLK
TOSC2
TOSC1
Enable
32 kHz
Oscillator
clkI/O
0
1
0
clkT2S
1
EXCLK
AS2
Clear
PSR2
CS20
CS21
CS22
10-BIT T/C PRESCALER
0
TIMER/COUNTER2 CLOCK SOURCE
clkT2
The clock source for Timer/Counter2 is named clkT2S. clkT2S is by default connected to
the main system I/O clock clkIO. By setting the AS2 bit in ASSR, Timer/Counter2 is asyn-
chronously clocked from the TOSC oscillator or TOSC1 pin. This enables use of
Timer/Counter2 as a Real Time Counter (RTC).
A crystal can then be connected between the TOSC1 and TOSC2 pins to serve as an
independent clock source for Timer/Counter2. The Oscillator is optimized for use with a
32.768 kHz crystal. Setting AS2 and resetting EXCLK enables the TOSC oscillator.
Figure 74. Timer/Counter2 Crystal Oscillator Connections
12 - 22 pF
32.768 KHz
12 - 22 pF
TOSC2
TOSC1
GND
A external clock can also be used using TOSC1 as input. Setting AS2 and EXCLK
enables this configuration.
Figure 75. Timer/Counter2 External Clock Connections
NC
External
Clock
Signal
TOSC2
TOSC1
158 AT90CAN128
4250E–CAN–12/04